Primality Certificate for (2008^6781-1)/2007

Andy Steward22,393 digits01 July 2010
Originally by A.A.D.Steward 2010
A066180 #873

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 29.653349% factorization of N-1:

From Factorisation
20082 · 2 · 2 · 251
Φ27 · 7 · 41
Φ33 · 37 · 36343
Φ45 · 233 · 3461
Φ51498121 · 10857361
Φ6109 · 36973
Φ1011 · 1477222522331
Φ1213 · 47917 · 26098873
Φ1561 · 4330753817098175616268381
Φ205 · 102596254021 · 515238196709801
Φ3031 · 3605837341 · 2365691286921331
Φ6015951351206108401 · p37
Φ113227 · p368
Φ22621019 · 1176791725267094863 · c348
Φ3398244953923 · 5204915215417438679231730249317459029 · p694
Φ45219889 · 3394973 · 3487181 · 18768397 · 205675369 · 227845517 · p699
Φ565140409891331 · 25955796240303718051 · p1450
Φ6782074816279 · 93306526979592631 · c714
Φ113035058251 · 14568077521 · c1462
Φ135621612296349855062773 · c1461
Φ16953391 · 8615152771 · 248782502911 · 58759927337611 · 1125886252818550771 · c2903
Φ2260p2960
Φ3390c2960
Φ67806781 · 21499381 · c5908

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

1889221587 6381593592 0672782001 3994653703 0798792292 7200597418 4146121763 3891564169 3131785702 4104123504 5496990084 1489326150 6618459771 6909228538 9934066593 5429873124 7751382594 2726917954 8471911840 9256548917 0784152056 9007933974 4295141370 3510445377 3370168257 9772111978 3284034425 9993357974 7967845855 6527555034 0319490146 1115905411 6820429532 1463092309 0181026613 7873881107 5730858191 6629067228 2292267210 0266550968 7975023146 3364230587 2108019345 3938876734 7405238167 4428853160 6001275842 4810416522 2272999932 7410481966 9115271452 9914513184 8708478472 4388996063 5777832113 6636416824 4978143767 7834448989 2960973535 2773558460 5447813924 2105767971 2252204982 4299790439 4909120478 1261635629 5464267032 4969656380 1430469769 5039065362 8490945232 2932277092 5848782492 3313282674 4866240412 3814726666 0307414702 0793712331 9505103770 6264748376 7951779453 2380352270 8617360972 6282018897 4079038459 9528060868 5415730939 8540385868 3608699163 3596250049 3680966987 9252455607 4867559081 3911746760 1561150263 7251086410 5983931873 0032949532 2607739770 8560512576 6034747447 3892748546 8654823153 3245619215 8790876389 8215791314 0258687637 6746218141 8930415163 6818409857 9807660692 3488380522 8448649905 7260362922 5815487483 0365820796 7878969376 9984553160 5161005993 8494979595 1422054237 9587639527 6530777496 6899595210 8780037303 7484842247 6332359239 5112887039 3899822933 7167721864 6781805717 2906252102 1796362216 4852188493 5001328185 4734452174 0675832685 8513534269 2708688254 2067381400 7389351748 4653862772 4912845708 0959577719 2099379935 2491262229 9559709830 2066997017 7570713427 1173874260 2238531981 3246036935 6699217908 8708822815 0825071974 4021187663 6818833058 8209271778 0705086633 1290603512 0468398041 9250841209 6513408293 3084115355 0303649823 2042853668 6559278133 0907657099 4084050114 8156441987 2787429639 6260764685 8417358815 8725056747 4361754104 3853668329 8694387166 7785927661 3173508386 4496507014 4993720555 6003886369 4565872745 5800517166 2359451762 9039327370 8091019641 0648611384 9903629731 3968205878 9741184801 0787737887 9925118320 5254094589 3732301049 3410980462 9761957899 4314196718 3420001920 7569516055 4105206095 0451450604 1498368097 2381354580 5930449053 9644165169 1820322460 6563774991 2493383703 2896146458 5488354631 1558661959 9224810302 2052406781 4920130608 3158515577 5584688746 8110754379 5953702766 7956859236 8714529679 6351406442 4985639306 8173597171 4877686761 4218683478 1424369345 5373227304 8257740894 1929770633 3571369893 8876408136 5272665696 5244320546 4736738776 2785146365 5027386322 9184759254 3433703360 4802656650 6396277080 9585188252 3824737878 6601736173 4892456117 4459056582 2313192166 0025751292 8967347819 7662083953 6673782018 1329983498 9913438329 4542158030 3615272207 0615220137 2480145862 6899014797 8141245554 2551407290 7014678150 0246491676 7790129779 1327052237 8941935781 7950319112 0259423582 6789853708 7369426367 3152309557 9226725753 0013505534 1508849973 0879970325 6016653422 5369782233 9244341872 5008896495 5898282840 9207392402 4471136868 0172043934 5653160009 8754086230 9187580136 8675825177 4102808609 6375133842 4458219114 3760715223 6503343923 9605963381 6208260572 5370576135 3783329546 3139083841
1192045960 8519752358 9144877918 1149866893 3631194761 1590355145 6743973955 4948356545 8449047927 8372733562 6937560583 7232607607 6306683075 4339084905 1040987045 2250431730 8615731357 0364398204 0089610138 5863036757 5782312183 0243942873 7075809606 0358602877 8924097954 5841067287 6523968997 7996271696 0029843037 4951254698 8076788737 3968841635 6563272825 6539695869 8079769349 2401161487 7678349416 8281042122 4861129965 5126270622 6364125885 1594299729 3607447438 7750208432 2230985474 4898604866 1316996393 6727590660 2018692151 1245298729 1272761455 0947244808 8374176692 8576365396 8405774606 0654126871 7867736471 0256313202 8558693763 0846517861 5571341331 3017092149 5824502441 8478672073 6703414666 5783833052 0707774534 5199231105 8134990467 1837498512 1940429999 2168777549 7845746632 6184899684 2258613654 0387197759 6380201190 2107505411 0297477048 3030549400 0165911596 8494856811 6820292088 5012448064 7638812189 6059771483 9028953714 5460186323 4805236411 9859686839 8296745091 2333611293 5136171627 0029861694 5958253756 5303994354 6025901397 6314231907 4108827550 3009931275 9321777924 3307702777 9655288211 2782472486 2422468757 7448846191 0648257640 3228768944 4526259270 3872250651 5425401519 1044133760 1275406866 9391407474 7065789220 9900201382 9447904600 2663358950 9479023029 1741661790 7692460218 8350207859 6256483346 8377916172 6928606555 9096906375 9153080203 8930572179 6476978512 9682485450 2629619222 6016289161 8677596459 8964269726 1282285971 0898189768 0772656180 0117630411 5810988404 9658621586 1944509002 8861429095 2918827710 4785771709 3240431681
318344150 0220746038 0063332110 8877535596 2953725126 1187560824 6529549878 8541260621 6318666009 3471591973 1006761585 8839767757 4625217140 4895679594 6353168754 3008600111 0519098471 5043918544 5210827336 8154780320 5317974710 3139565904 0858624788 2686378706 0521356051 0882012865 2698771245 3335287448 9953227791 2673809736 7399137566 6241077027 0944055808 9511691523 5730859986 3561471099 0823078881 9464427811 2999279736 1355109257 6582585548 7167009885 9242846623 6368624944 7107999492 6013746760 8611604085 8406520470 9628818365 5927000546 4012151245 0854094362 1128124371 2852517873 6099385705 5249405549 5428008142 7886417764 5202280004 7300560945 1652190110 4009918517 7637940269 1641341353 4431568196 3428532975 2613222945 0447633558 5216923483 4666307529
1535 5093650724 2061346570 5648384048 8184940171 2592374245 2653548753 2463327872 1593535474 4123380032 3460478660 2884253920 6310450718 6364145010 4499176055 8636724543 6036207547 1736259902 0791693280 1050037367 5959292798 3238909556 3049898499 7066551695 0109789727 3145987735 6032088310 2469309930 1455282729 0551518366 7865669135 1818508322 4134061906 3675605817 2084833449 0556747906 1247394541 1500105518 7460189953 2121261350 4882198515 8272754149 6436223861 1211994046 1337092654 3330619724 0767569056 7119620461 0800594272 6352237504 7902307668 4080917922 5949723120 1433521284 8476900367 0441831177 9456500734 3350793405 1721058416 6349168311 4156774489 2549130751 7355498247 6235554294 1383678320 2079097579 7939975968 9090932667 7496759153 1359719063
35787044 0411790997 1500723509 7491313245 5971373228 5346889480 0268675365 6171447415 5775610416 0245116478 4087935744 2068300286 4179876561 7121577070 4009044973 8069492707 7355780888 3331982856 5508693471 9941693880 3795518586 6289666664 1346984173 7746794134 6629804383 3197966922 5527160991 9650734814 9602420866 0391793626 0697544580 0452889342 2693473362 3718753122 0582646270 3529806031 3404720083
5204915 2154174386 7923173024 9317459029
4379474 1387839321 0390152467 1654428241
43307 5381709817 5616268381
2595579624 0303718051
2161229634 9855062773
117679172 5267094863
112588625 2818550771
9330652 6979592631
1595135 1206108401
236569 1286921331
51523 8196709801
5875 9927337611
147 7222522331
24 8782502911
14 0409891331
10 2596254021
1 4568077521
8615152771
8244953923
3605837341
2074816279
227845517
205675369
35058251
26098873
21499381
18768397
10857361
3487181
3394973
1498121
47917
36973
36343
21019
19889
6781
3461
3391
251
233
227
109
61
41
37
31
13
11
72
52
3
23

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) = 29.653349%

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 = 23171 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 ≡ 45 (mod 64) 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 = 7253 significant digits (7250 digits displayed)

Input file is:  IO\07D81A7D.cin
Certificate file is:  IO\07D81A7D.chg
Found values of n, F and G.
    Number to be tested has 22393 digits.
    Modulus has 6641 digits.
Modulus is 29.65334868% 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 = 6, u = 2. Right endpoint has 2473 digits.
        Done!  Time elapsed:  1126922ms.
    Running CHG with h = 5, u = 1. Right endpoint has 1964 digits.
        Done!  Time elapsed:  306547ms.
    Running CHG with h = 5, u = 1. Right endpoint has 1554 digits.
        Done!  Time elapsed:  301375ms.
    Running CHG with h = 5, u = 1. Right endpoint has 731 digits.
        Done!  Time elapsed:  182562ms.
A certificate has been saved to the file:  IO\07D81A7D.chg

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

Testing a PRP called "IO\07D81A7D.cin".

Pol[1, 1] with [h, u]=[4, 1] has ratio=4.135733333 E-1207 at X, ratio=3.680766183 E-1937 at Y, witness=2.
Pol[2, 1] with [h, u]=[4, 1] has ratio=1.325483777 E-824 at X, ratio=1.325483777 E-824 at Y, witness=2.
Pol[3, 1] with [h, u]=[4, 1] has ratio=1.325483777 E-824 at X, ratio=8.70050076 E-411 at Y, witness=2.
Pol[4, 1] with [h, u]=[6, 2] has ratio=1.432394284 E-509 at X, ratio=1.200519384 E-1017 at Y, witness=11.

Validated in 4 sec.


Congratulations! n is prime!

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