Primality Certificate for (13096^5953-1)/13095

Andy Steward24,506 digits04 November 2007
Originally by A.A.D.Steward 2007

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

From Factorisation
130962 · 2 · 2 · 1637
Φ27 · 1871
Φ33 · 211 · 270961
Φ413 · 29 · 454921
Φ6171492121
Φ8617 · 1553 · 30697149257
Φ122017 · 10093 · 1444869061
Φ1617 · 1153 · 193073 · 197457518033 · 1157806234993
Φ241657 · p30
Φ31373 · 8123 · 10781587093 · 3958946957586703123431535054124988510543434443951 · p59
Φ32p66
Φ48193 · 11040215829860384414822352241 · p36
Φ625588993389051069 · 19492887253345230123398887826916733693433981 · p65
Φ64257 · 1409 · 243521 · 316162177 · 383923201 · 472468396499555838377374922745182790401 · p66
Φ936883 · 4045501 · c237
Φ96396577 · 1123777 · p121
Φ1246449 · 174221 · 27301413946234764602177389 · c213
Φ186c248
Φ19211223361 · 35683056769 · 134247047037133637720257 · c223
Φ24818605953 · 408839449012009 · 803265786553193 · 4546414799084468353 · 31762280579408269519077204121 · c411
Φ3721117 · 1489 · 2495749 · 51121729 · 154231692249669272095393 · c451
Φ4967579073728666049 · c973
Φ74483338804369 · c978
Φ99241410885744993 · c1963
Φ14885477857729 · 8489052253168510417 · p1948
Φ1984394817 · 393827969 · p3939
Φ29763322668289 · 37027202806753 · c3930
Φ59525953 · 1273729 · c7896

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

182564926 9690238818 2144248893 3793662055 0559677401 9626085312 6203327817 4240149512 2483429577 1193809169 2443858034 5411964763 9391731540 9273636391 5629615041 9254773543 0238339436 9699589158 6333413242 0237388525 9078519690 5725847762 2912849552 8133340464 3357596978 6473600200 8410963207 9952450422 2476243189 5638773780 8471653539 8050048443 1921337613 6434983544 1532165664 3926352206 7204614522 0714611854 5908523963 3465091052 8174825619 0383954077 0228716673 3422159874 3355188048 0649564350 3790145182 9222425340 9428241673 6586998945 7360520156 6293720221 9692771528 2822175896 1669779491 2562232337 6984145447 4771735664 3465392303 8570610865 4835568432 0291431053 2339508589 1910760663 9511746317 5720968847 5470355031 2777215241 7651228322 4469658752 3124134629 0545685250 7209377312 7752493183 3331129498 8668763819 5936927587 2696510345 7867599011 0466451630 8647876748 0726920529 0707358596 6872452501 0245515813 3892479514 2783132188 2432087547 1767882732 2349658363 5314859577 1717036562 6358778030 1445915434 2100371985 3151855929 2190439085 5944155967 5662245029 3851753599 1231206546 9359219595 8720190408 4561538527 7857620624 9877011970 2225752524 4158785118 5039748349 6166714468 1209267979 2762984812 2599329803 4876544964 9841046017 9381024380 0821482142 3106469944 4471722137 1305297930 4275361311 0605762666 2525320596 2065195437 9673221955 7494695128 4294714607 7068218360 0480310735 6319735544 2792555262 9109235794 8707986734 8944150327 4070420715 6663460291 8402901058 4098387823 5958784709 5501104971 2638092367 9766614847 3580035252 5285622505 9742631694 8509473087 7721345322 0445491216 1463439234 5658399733 5111625438 3741327285 0025461909 2862774130 5626989841 2958173464 7789683248 8310936355 4718058237 8066045254 3443828461 4873016590 4852312001 0458461722 2371540925 6467717456 2512127724 1255014484 8794448651 0262164992 1962326822 5581104365 0786649763 9161479032 2342473871 9897838403 0021708666 9677014291 1841894852 3685374427 7322632721 6904870151 0392669410 5237184168 6170212065 1115723520 5598291372 8719734185 7189954100 4703295603 8239969378 9315460311 4920790429 7523652769 9667586358 5056610919 4033756894 1571609778 1701261134 9769462755 0724738249 0527944482 9803716534 0587531140 0316251111 3767457363 8365171681 0955258211 3980287208 4753995002 3478865318 8956504861 3855958583 8570562092 0103249395 1346606353 5202707220 9106175513 5160355265 4369452150 9815178204 5550076236 4900670286 6028987767 6428915991 0648677668 8985967058 9106419650 6210908741 2445534522 2758199988 9698837259 7709285590 3468982261 5253921945 6993663839 4825933900 9667882473 6120680019 1184379419 2497131482 9326673649 9927314385 0165360117 1481439642 5821703835 3296922713 3668148620 8362399655 8391294763 2886273374 7589009125 2268149900 6763298285 4421440079 7793855958 1136541442 2454290832 6947744365 4346120103 4032601930 8777617918 3615733287 7063977313 1495652218 1212412119 2484608138 0322713243 2847927053 6856023597 5135447760 6484927558 5747528004 5516060437 1620255707 8477403367 9116488029 8708516822 7914857243 0895519863 7244260924 6834752688 4858760213 5251584818 2106960350 8255054234 3697975978 2369537400 9753459530 9205544143 2560893132 5107711390 0375376233 1912977841 4705821004 5100325654 2486660750 3001765280 7920951529 4785275002 1445380947 1946505800 4140872114 2920830790 0120429392 2944800644 6616738588 0344017190 5650335339 4801510904 9685421688 1749361809 7540259623 7584548480 2506382706 7498339553 6790649687 1433695172 6428887311 8610767043 7416803783 2808288873 1891984923 0925204601 0863928723 1805115890 6160671572 3600134327 0468560299 8958458769 7376517716 8154977573 1495869441 0543156476 7802638381 5795571845 3146790344 5233717598 1150042969 7392926414 0334541407 4429510956 5001682579 4070604050 4429675028 2184539782 4301482312 3860197959 3721636287 8813361211 2018544150 6017918906 7732920052 9788583208 6223182828 8789240265 5819299541 6920661064 9773499036 8106625319 2536600450 5549178209 1265095983 0737802984 8939666644 1095938412 5555266057 4304709547 9106160782 1297300919 0514336015 1471533267 3616052191 9241775003 0569402326 2708355743 2132028290 4172683578 9015126264 7748269487 3294252053 2822931674 0762785922 4168770144 8049893915 3885685707 1967129853 3741773327 3372488875 7309198440 6404285120 4835589810 6213130619 5392303937
36231800 6760679512 3787289417 2090141322 1330715323 5526752960 9164105935 3605590298 5533787576 2583700603 8043512946 0081741384 6152885225 4152456829 7053967733 6453872362 7696914772 7593503050 1417139478 9532062109 0153739840 1065317120 5419929074 5900462337 0686647208 8773936760 6882156305 6044922542 6149046451 2700374825 1675583658 1560874964 2680361056 8556317222 7250085995 9609785261 9217475783 8258224744 7777479148 0293633096 3528741695 5777541157 8500725993 0809029522 1803431779 3687977371 2280314200 0381502655 8542442449 7649119284 3816114759 4820427237 8747030368 8059556882 0529221666 2934149644 1144059192 7338270551 2133250571 5888680268 3965350649 5571745547 7065997335 2672478151 6805026635 4242034067 8948466468 2593373754 8276986536 1290962810 3062921141 6186144331 8148643183 3594523602 6861906299 7901463503 5551113734 7668567438 0826632687 5520276301 9160727269 9690594810 4178869145 1973322218 0173128865 8782646993 1617840539 1774839162 8108305732 5856418056 6305088742 3869684337 8536282676 4273550055 4883503316 2060604229 9135528268 7089603813 8009062945 9886029501 0841555496 8884630243 0565332948 7911890797 1556175734 5876327318 1250596494 0263439552 7707129488 1502793668 2823006841 1058152603 4698036312 6313056242 2518400416 7549501026 8967811294 1025030389 2758875689 9183110921 9303481115 6320826900 8953515101 9619791003 9683239809 7047544616 5249244801 7590563099 1715205349 8969176716 4795603701 0639139107 3946640481 1065047180 9116089751 8718489382 6296442417 3944107958 7435296532 4443612759 7633882711 6956932266 6810921234 1262442381 3444776240 9538806159 2032889407 5320400715 9950409309 7610267629 2411284022 1014006072 5655579708 4858873407 6720631138 9465889966 5509232854 0756780587 4982332624 8920171856 1777549619 7110170472 6833031184 2581505728 7563527186 6163447254 3534287676 3002207758 2001308838 8660524471 8229860074 4459231538 4639136294 4281425402 7687715463 3893330702 4827834167 1090102978 9226001252 6161315664 7243674784 0470457007 7788866056 1486617420 9426798827 0606010592 4127833890 2667742306 6043409759 1310276759 2085880165 1397622480 4381605166 5980181633 2110681457
1 2572732123 8577097433 5336781671 0272389410 2725545760 0680216177 6611463123 4065771122 9598524337 1008210634 1690500362 8387113249
748546 2904160715 2780662690 6796909341 9446411193 2622472958 3067856897
110797 4473788696 4298630317 1322737467 2470344027 4200146517 0921552577
29985 8983375699 6266812198 0930590904 6645657663 3146879056 0302371409
1949 2887253345 2301233988 8782691673 3693433981
472468396 4995558383 7737492274 5182790401
351304 5621983420 9765246286 6982911697
5221398292 5220707854 2970713033
317622805 7940826951 9077204121
110402158 2986038441 4822352241
273014 1394623476 4602177389
1542 3169224966 9272095393
1342 4704703713 3637720257
848905225 3168510417
454641479 9084468353
757907 3728666049
558899 3389051069
80326 5786553193
40883 9449012009
4141 0885744993
3702 7202806753
115 7806234993
19 7457518033
8 3338804369
3 5683056769
3 0697149257
1 0781587093
5477857729
3322668289
1444869061
393827969
383923201
316162177
171492121
51121729
18605953
11223361
4045501
2495749
1273729
1123777
454921
396577
394817
270961
243521
193073
174221
10093
8123
6883
6449
5953
2017
1871
1657
1637
1553
1489
1409
1153
1117
617
373
257
211
193
29
17
13
7
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) = 28.084688%

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 = 5 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 ≡ 29 (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:

realprecision = 9006 significant digits (9000 digits displayed)

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

Input file is:  IO\33281741.cin
Certificate file is:  IO\33281741.chg
Found values of n, F and G.
    Number to be tested has 24506 digits.
    Modulus has 6883 digits.
Modulus is 28.08468837% 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 = 8, u = 3. Right endpoint has 3859 digits.
        Done!  Time elapsed:  979000ms.
    Running CHG with h = 8, u = 3. Right endpoint has 3731 digits.
        Done!  Time elapsed:  1089985ms.
    Running CHG with h = 8, u = 3. Right endpoint has 3559 digits.
        Done!  Time elapsed:  1068875ms.
    Running CHG with h = 8, u = 3. Right endpoint has 3351 digits.
        Done!  Time elapsed:  3192875ms.
    Running CHG with h = 7, u = 2. Right endpoint has 3142 digits.
        Done!  Time elapsed:  288265ms.
    Running CHG with h = 7, u = 2. Right endpoint has 3035 digits.
        Done!  Time elapsed:  305860ms.
    Running CHG with h = 7, u = 2. Right endpoint has 2873 digits.
        Done!  Time elapsed:  272984ms.
    Running CHG with h = 6, u = 2. Right endpoint has 2654 digits.
        Done!  Time elapsed:  158063ms.
    Running CHG with h = 6, u = 2. Right endpoint has 2436 digits.
        Done!  Time elapsed:  104125ms.
    Running CHG with h = 7, u = 2. Right endpoint has 2217 digits.
        Done!  Time elapsed:  1019406ms.
    Running CHG with h = 5, u = 1. Right endpoint has 1694 digits.
        Done!  Time elapsed:  39609ms.
    Running CHG with h = 5, u = 1. Right endpoint has 1094 digits.
        Done!  Time elapsed:  54250ms.
    Running CHG with h = 5, u = 1. Right endpoint has 86 digits.
        Done!  Time elapsed:  276328ms.
A certificate has been saved to the file:  IO\33281741.chg

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

Testing a PRP called "IO\33281741.cin".

Pol[1, 1] with [h, u]=[5, 1] has ratio=3.085579488 E-1810 at X, ratio=5.25358162 E-1896 at Y, witness=3.
Pol[2, 1] with [h, u]=[4, 1] has ratio=0.947900942 at X, ratio=1.554372172 E-1008 at Y, witness=2.
Pol[3, 1] with [h, u]=[4, 1] has ratio=2.649698094 E-601 at X, ratio=7.92916436 E-601 at Y, witness=13.
Pol[4, 1] with [h, u]=[7, 2] has ratio=0.4466670850 at X, ratio=3.914050424 E-1046 at Y, witness=2.
Pol[5, 1] with [h, u]=[6, 2] has ratio=0.03200017180 at X, ratio=3.516061796 E-438 at Y, witness=5.
Pol[6, 1] with [h, u]=[6, 2] has ratio=0.681112975 at X, ratio=3.982040134 E-438 at Y, witness=2.
Pol[7, 1] with [h, u]=[6, 2] has ratio=0.1595103281 at X, ratio=3.946099173 E-438 at Y, witness=2.
Pol[8, 1] with [h, u]=[6, 2] has ratio=5.163606774 E-163 at X, ratio=6.28027568 E-324 at Y, witness=37.
Pol[9, 1] with [h, u]=[6, 2] has ratio=3.946069193 E-109 at X, ratio=3.620398834 E-216 at Y, witness=2.
Pol[10, 1] with [h, u]=[8, 3] has ratio=0.4865345660 at X, ratio=1.325794986 E-625 at Y, witness=11.
Pol[11, 1] with [h, u]=[8, 3] has ratio=0.3115881514 at X, ratio=9.34017439 E-626 at Y, witness=3.
Pol[12, 1] with [h, u]=[8, 3] has ratio=2.605300530 E-173 at X, ratio=1.395595990 E-515 at Y, witness=2.
Pol[13, 1] with [h, u]=[8, 3] has ratio=3.053858615 E-130 at X, ratio=8.74219750 E-387 at Y, witness=3.

Validated in 47 sec.


Congratulations! n is prime!

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