Primality Certificate for (3556^2621-1)/3555

Andy Steward9,304 digits03 March 2010
Originally by A.A.D.Steward 2010

This certificate uses a theorem of Coppersmith and Howgrave-Graham to prove an integer N prime by making use of a partial prime factorization of N-1.

Factorizing N-1

As N is a Generalized Repunit, we make use of the algebraic factorization of N-1 to arrive at the following 26.526157% factorization of N-1:

From Factorisation
35562 · 2 · 7 · 127
Φ23557
Φ42269 · 5573
Φ55 · 11 · 1511 · 1924606741
Φ107151 · 22354147811
Φ2024001 · 6064921 · 7945261 · 22107077341
Φ131263 · 3407 · 33013 · 5853343 · p445
Φ26256743699 · 4441003753 · 608293240351 · 48342087558913 · 1135532676575428633631 · c398
Φ5241049 · c921
Φ655140171 · c1842
Φ131077291 · 22393141 · p1835
Φ26202621 · 18341 · 885578341 · c3677

We need the product F of all the prime factors from this partial factorization:

18280 5545851718 8841648498 3165788959 4865041322 1378196514 1677502089 0372049445 4092077264 2900889685 5421056797 8606609103 2790426349 3090248706 3521430826 0865380267 8375132264 4928257601 9975879123 3139126889 6053189677 0359674244 5767873230 0714034325 0900170112 1010496911 2316876610 8683733900 3685036034 6007950593 0592169378 7031282087 5144863902 8205012671 0346583854 5761598432 9035721997 4537477342 2200637717 0735838604 7236365565 3902392494 9808386397 8207824209 1778665726 7397240773 8502643177 8195458373 2973038875 6290258424 0408731457 7830379398 0502020142 3654763645 9760230116 7468422744 0477909089 1607041021 2133007266 2298860976 7471529305 1283781313 1327780986 9813471112 0687239843 7209273075 7219778339 2548069079 4954307417 9217251456 7014646633 0465300728 5669539911 1448773746 6948032277 4854679259 9915322836 4948869791 6722575957 1769150001 9235418075 3062559678 4071969591 0770544997 5714740790 5734399598 0198654375 0785620681 1509200062 5303876007 3678951360 4997051047 5460062648 8686965798 2581565503 1544357296 7401195223 5111197472 3815359667 7503211429 1338551568 0136904866 4367377257 2375920047 5323067154 6602250911 4175168949 8997863625 5352750723 1278881502 5689625585 6007855901 5507542871 4928830682 1944634227 0103315867 7411473875 7801890444 2793838723 4258029591 6395063549 1637706198 5731576285 2202091790 5876294347 1779533104 5089626585 0466323520 3773407454 2773338942 7228858584 0018605022 4932780841 2872292545 4499733527 5051157499 6444410895 5841565757 7296161896 5146015347 8250306373 5256834488 3256623677 0088896257 6384394594 2949963189 8389205205 8058953366 0167594769 4779762899 9312895910 5614291458 4920671189 4510018948 0943171131 1848007013 0462423008 5656130592 0528460545 5690546670 0005533401 0349700140 2352797789 1566443935 6214425197 6436392341 3354169435 3525365071 0443657714 0214857279 2072813153 2717997559 5205654486 5899245347 6663821980 0825786778 5931171477 3066788161 0444631207 8981136422 6272115044 4082868017 8256958856 3582913171
24363 1308630207 8418588492 8928133227 6004994241 8151087670 1966460416 4829417812 1741254717 7524276349 5617931116 3361510524 4356483988 3699221820 0013616503 3191440274 7215710765 4947289412 0963984850 8459768606 8583372575 4043982754 8525524075 3114715942 9076995636 1380989336 1594655015 9293088167 8737139735 2759136860 3816927788 7236614335 8578668447 9552059578 7499909718 9838196237 2254194950 3148465371 4045118207 9410171873 6182429211 7510890257 7718095242 3008023923 3043182599
11 3553267657 5428633631
4834 2087558913
60 8293240351
2 2354147811
2 2107077341
4441003753
1924606741
885578341
56743699
22393141
7945261
6064921
5853343
140171
77291
33013
24001
18341
7151
5573
3557
3407
2621
2269
1511
1049
263
127
11
7
5
22

Note that all prime factors listed above have been proven. As primes of under 250 decimal digits can be verified in a few seconds, proof of their primality is not included here, in order to save space. Larger prime factors can take from hours to months to prove; certificates for all such factors have been PKZIPped into this file.

We set R = (N-1)/F. Note that GCD(F,R)=1 and Log(F)/Log(N) = 26.526157%

Finding a Witness to Primality

Next, we find an integer witness w such that for each prime factor p of N-1, w(N-1) ≡ 1 mod N and GCD(w(N-1)/p-1,N) = 1. In this case, w = 6 suffices.

Given such a witness, Pocklington's Theorem shows that every prime factor of N ≡ 1 (mod F). As F4>N, N can have no more than three prime factors.

Express N in base F

As F2 < N < F3 and N ≡ 1 (mod F), we can let N = c2·F2 + c1·F + 1.

Brillhart, Lehmer and Selfridge

Brillhart, Lehmer and Selfridge's Theorem shows that N has exactly two prime factors if and only if c12-4·c2 is a perfect square.

Here, c12-4·c2 is ≡ 56 (mod 63) and therefore cannot be a square and this stage of the proof is passed.

Coppersmith and Howgrave-Graham

We are left with two possibilities for N: either it has exactly three prime factors or it is prime. The non-existence of exactly three factors is demonstrated by the Theorem of Coppersmith and Howgrave-Graham, here performed by a Pari/GP script written by John Renze and David Broadhurst. Here is the stdout:

Welcome to the CHG primality prover!
------------------------------------

realprecision = 4007 significant digits (4000 digits displayed)
Input file is:  IO\0DE40A3D.cin
Certificate file is:  IO\0DE40A3D.chg
Found values of n, F and G.
    Number to be tested has 9304 digits.
    Modulus has 2468 digits.
Modulus is 26.52615731% of n.

NOTICE: This program assumes that n has passed
    a BLS PRP-test with n, F, and G as given.  If
    not, then any results will be invalid!

Square test passed for F >> G.  Using modified right endpoint.

Search for factors congruent to 1.
    Running CHG with h = 18, u = 8. Right endpoint has 1901 digits.
        Done!  Time elapsed:  55208844ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1877 digits.
        Done!  Time elapsed:  23156047ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1867 digits.
        Done!  Time elapsed:  23943078ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1855 digits.
        Done!  Time elapsed:  33980219ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1841 digits.
        Done!  Time elapsed:  33638906ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1825 digits.
        Done!  Time elapsed:  36894891ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1807 digits.
        Done!  Time elapsed:  306457531ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1787 digits.
        Done!  Time elapsed:  343048500ms.
    Running CHG with h = 16, u = 7. Right endpoint has 1763 digits.
        Done!  Time elapsed:  64443422ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1747 digits.
        Done!  Time elapsed:  35246937ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1741 digits.
        Done!  Time elapsed:  35323313ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1735 digits.
        Done!  Time elapsed:  34980812ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1727 digits.
        Done!  Time elapsed:  34856891ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1717 digits.
        Done!  Time elapsed:  33981859ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1707 digits.
        Done!  Time elapsed:  33241360ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1694 digits.
        Done!  Time elapsed:  32597546ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1679 digits.
        Done!  Time elapsed:  30689719ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1662 digits.
        Done!  Time elapsed:  22007641ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1642 digits.
        Done!  Time elapsed:  22896578ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1619 digits.
        Done!  Time elapsed:  28373625ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1592 digits.
        Done!  Time elapsed:  31540047ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1560 digits.
        Done!  Time elapsed:  20164344ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1551 digits.
        Done!  Time elapsed:  20823906ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1540 digits.
        Done!  Time elapsed:  21333547ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1527 digits.
        Done!  Time elapsed:  22347640ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1512 digits.
        Done!  Time elapsed:  5682141ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1493 digits.
        Done!  Time elapsed:  6633422ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1471 digits.
        Done!  Time elapsed:  3739547ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1444 digits.
        Done!  Time elapsed:  23620703ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1412 digits.
        Done!  Time elapsed:  28234031ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1371 digits.
        Done!  Time elapsed:  2644875ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1360 digits.
        Done!  Time elapsed:  1459844ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1347 digits.
        Done!  Time elapsed:  1223281ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1330 digits.
        Done!  Time elapsed:  988484ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1309 digits.
        Done!  Time elapsed:  1327657ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1283 digits.
        Done!  Time elapsed:  1244172ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1247 digits.
        Done!  Time elapsed:  1064062ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1200 digits.
        Done!  Time elapsed:  836563ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1146 digits.
        Done!  Time elapsed:  561734ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1127 digits.
        Done!  Time elapsed:  806812ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1103 digits.
        Done!  Time elapsed:  856141ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1069 digits.
        Done!  Time elapsed:  812891ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1018 digits.
        Done!  Time elapsed:  785422ms.
    Running CHG with h = 8, u = 2. Right endpoint has 943 digits.
        Done!  Time elapsed:  182390ms.
    Running CHG with h = 7, u = 2. Right endpoint has 927 digits.
        Done!  Time elapsed:  167344ms.
    Running CHG with h = 7, u = 2. Right endpoint has 916 digits.
        Done!  Time elapsed:  168094ms.
    Running CHG with h = 7, u = 2. Right endpoint has 899 digits.
        Done!  Time elapsed:  168937ms.
    Running CHG with h = 7, u = 2. Right endpoint has 875 digits.
        Done!  Time elapsed:  171891ms.
    Running CHG with h = 7, u = 2. Right endpoint has 838 digits.
        Done!  Time elapsed:  170531ms.
    Running CHG with h = 7, u = 2. Right endpoint has 782 digits.
        Done!  Time elapsed:  161094ms.
    Running CHG with h = 7, u = 2. Right endpoint has 699 digits.
        Done!  Time elapsed:  164703ms.
    Running CHG with h = 5, u = 1. Right endpoint has 558 digits.
        Done!  Time elapsed:  24125ms.
    Running CHG with h = 5, u = 1. Right endpoint has 333 digits.
        Done!  Time elapsed:  14266ms.
    Running CHG with h = 5, u = 1. Right endpoint has 58 digits.
        Done!  Time elapsed:  22671ms.
A certificate has been saved to the file:  IO\0DE40A3D.chg

Running David Broadhurst's verifier on the saved certificate...

Testing a PRP called "IO\0DE40A3D.cin".

Pol[1, 1] with [h, u]=[5, 1] has ratio=3.172204895 E-493 at X, ratio=2.404157831 E-550 at Y, witness=5.
Pol[2, 1] with [h, u]=[5, 1] has ratio=0.3989820506 at X, ratio=9.97252049 E-276 at Y, witness=11.
Pol[3, 1] with [h, u]=[4, 1] has ratio=0.00005783850488 at X, ratio=6.93558104 E-226 at Y, witness=2.
Pol[4, 1] with [h, u]=[7, 2] has ratio=4.345868278 E-143 at X, ratio=6.639368862 E-282 at Y, witness=2.
Pol[5, 1] with [h, u]=[7, 2] has ratio=0.734784381 at X, ratio=1.902663093 E-167 at Y, witness=3.
Pol[6, 1] with [h, u]=[7, 2] has ratio=0.4859387520 at X, ratio=5.864386140 E-112 at Y, witness=7.
Pol[7, 1] with [h, u]=[7, 2] has ratio=0.634184782 at X, ratio=8.12529902 E-75 at Y, witness=2.
Pol[8, 1] with [h, u]=[7, 2] has ratio=0.1181096203 at X, ratio=3.346331925 E-50 at Y, witness=5.
Pol[9, 1] with [h, u]=[7, 2] has ratio=0.4858927868 at X, ratio=1.367278799 E-33 at Y, witness=2.
Pol[10, 1] with [h, u]=[7, 2] has ratio=0.4774573024 at X, ratio=1.131648825 E-22 at Y, witness=2.
Pol[11, 1] with [h, u]=[8, 2] has ratio=0.3090239974 at X, ratio=1.929621954 E-33 at Y, witness=7.
Pol[12, 1] with [h, u]=[9, 3] has ratio=0.1878097415 at X, ratio=6.176213006 E-226 at Y, witness=2.
Pol[13, 1] with [h, u]=[9, 3] has ratio=1.185468155 E-51 at X, ratio=4.411016984 E-153 at Y, witness=5.
Pol[14, 1] with [h, u]=[9, 3] has ratio=6.99231025 E-35 at X, ratio=2.946514483 E-102 at Y, witness=3.
Pol[15, 1] with [h, u]=[9, 3] has ratio=0.03480642215 at X, ratio=1.258902807 E-74 at Y, witness=5.
Pol[16, 1] with [h, u]=[9, 3] has ratio=0.1021373207 at X, ratio=3.001547352 E-56 at Y, witness=2.
Pol[17, 1] with [h, u]=[11, 4] has ratio=0.1277595987 at X, ratio=1.973351050 E-215 at Y, witness=2.
Pol[18, 1] with [h, u]=[11, 4] has ratio=0.3554679190 at X, ratio=1.358283975 E-191 at Y, witness=7.
Pol[19, 1] with [h, u]=[11, 4] has ratio=3.680289159 E-37 at X, ratio=2.145610139 E-144 at Y, witness=7.
Pol[20, 1] with [h, u]=[11, 4] has ratio=1.503956452 E-27 at X, ratio=2.747927995 E-105 at Y, witness=3.
Pol[21, 1] with [h, u]=[11, 4] has ratio=0.856546003 at X, ratio=3.532674355 E-84 at Y, witness=11.
Pol[22, 1] with [h, u]=[11, 4] has ratio=0.605464152 at X, ratio=1.673083203 E-67 at Y, witness=7.
Pol[23, 1] with [h, u]=[11, 4] has ratio=0.2063630369 at X, ratio=3.227634135 E-54 at Y, witness=2.
Pol[24, 1] with [h, u]=[11, 4] has ratio=0.1063524877 at X, ratio=1.924876901 E-43 at Y, witness=3.
Pol[25, 1] with [h, u]=[13, 5] has ratio=1.649003034 E-38 at X, ratio=7.46138199 E-207 at Y, witness=3.
Pol[26, 1] with [h, u]=[13, 5] has ratio=0.1212654133 at X, ratio=6.235962288 E-161 at Y, witness=13.
Pol[27, 1] with [h, u]=[13, 5] has ratio=0.0660459040 at X, ratio=3.395749749 E-134 at Y, witness=2.
Pol[28, 1] with [h, u]=[13, 5] has ratio=0.1304349728 at X, ratio=5.462008330 E-112 at Y, witness=7.
Pol[29, 1] with [h, u]=[13, 5] has ratio=0.2256492224 at X, ratio=1.628580385 E-93 at Y, witness=2.
Pol[30, 1] with [h, u]=[13, 5] has ratio=0.1622928597 at X, ratio=5.06949207 E-78 at Y, witness=2.
Pol[31, 1] with [h, u]=[13, 5] has ratio=0.517216592 at X, ratio=4.138056570 E-65 at Y, witness=5.
Pol[32, 1] with [h, u]=[13, 5] has ratio=0.1629884837 at X, ratio=2.172002735 E-54 at Y, witness=3.
Pol[33, 1] with [h, u]=[13, 5] has ratio=0.2055820036 at X, ratio=2.070284407 E-45 at Y, witness=2.
Pol[34, 1] with [h, u]=[15, 6] has ratio=0.1465651207 at X, ratio=2.222027749 E-191 at Y, witness=7.
Pol[35, 1] with [h, u]=[15, 6] has ratio=0.1096952064 at X, ratio=3.680976357 E-164 at Y, witness=5.
Pol[36, 1] with [h, u]=[15, 6] has ratio=0.4362233852 at X, ratio=9.63969781 E-141 at Y, witness=11.
Pol[37, 1] with [h, u]=[15, 6] has ratio=0.1086308610 at X, ratio=7.023914398 E-121 at Y, witness=2.
Pol[38, 1] with [h, u]=[15, 6] has ratio=0.1323780015 at X, ratio=1.297608077 E-103 at Y, witness=7.
Pol[39, 1] with [h, u]=[15, 6] has ratio=0.4991431890 at X, ratio=5.978309446 E-89 at Y, witness=3.
Pol[40, 1] with [h, u]=[15, 6] has ratio=0.05971401292 at X, ratio=2.474112923 E-76 at Y, witness=3.
Pol[41, 1] with [h, u]=[15, 6] has ratio=0.1355540897 at X, ratio=1.678512815 E-65 at Y, witness=2.
Pol[42, 1] with [h, u]=[15, 6] has ratio=0.2653861745 at X, ratio=2.626091467 E-56 at Y, witness=3.
Pol[43, 1] with [h, u]=[15, 6] has ratio=0.2753838562 at X, ratio=2.420750196 E-48 at Y, witness=5.
Pol[44, 1] with [h, u]=[15, 6] has ratio=0.2535516772 at X, ratio=1.775601159 E-41 at Y, witness=11.
Pol[45, 1] with [h, u]=[15, 6] has ratio=0.1144646458 at X, ratio=1.026466914 E-35 at Y, witness=2.
Pol[46, 1] with [h, u]=[16, 7] has ratio=0.02747781064 at X, ratio=1.321178379 E-112 at Y, witness=11.
Pol[47, 1] with [h, u]=[17, 7] has ratio=0.2330114665 at X, ratio=1.778748317 E-165 at Y, witness=2.
Pol[48, 1] with [h, u]=[17, 7] has ratio=0.3520309658 at X, ratio=7.30293125 E-145 at Y, witness=5.
Pol[49, 1] with [h, u]=[17, 7] has ratio=0.01437257310 at X, ratio=7.83085062 E-127 at Y, witness=3.
Pol[50, 1] with [h, u]=[17, 7] has ratio=0.0773567885 at X, ratio=4.330049726 E-111 at Y, witness=11.
Pol[51, 1] with [h, u]=[17, 7] has ratio=0.2099927951 at X, ratio=2.596111685 E-97 at Y, witness=5.
Pol[52, 1] with [h, u]=[17, 7] has ratio=0.1776814246 at X, ratio=3.175539387 E-85 at Y, witness=11.
Pol[53, 1] with [h, u]=[17, 7] has ratio=0.1211640769 at X, ratio=1.300031901 E-74 at Y, witness=2.
Pol[54, 1] with [h, u]=[18, 8] has ratio=0.1860350619 at X, ratio=1.440351902 E-186 at Y, witness=11.

Validated in 191 sec.


Congratulations! n is prime!

The actual input file containing N and F and the output certificate are included in this file.