Primality Certificate for (5991^2909-1)/5990

Andy Steward10,985 digits05 October 2010
Originally by Bernardo Boncompagni & David Broadhurst 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 N2-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 25.881627% factorization of N-1:

From Factorisation
59913 · 1997
Φ22 · 2 · 2 · 7 · 107
Φ42 · 29 · 137 · 4517
Φ72730557118371723 · 1405623672563899 · 1186350312958274677859328243175240603 · c2678
Φ145436139171 · 5726171033773 · p2723
Φ29082909 · 63977 · 3443800195189 · c5465

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

140 7962331096 1728665519 9066703700 7749315001 6619594773 4827931355 1316182305 1435465018 1975726995 2500997289 0802538416 1542453032 5253636953 1700516361 3223313303 9082184587 1444840747 4693102110 0111804791 7014692207 5887563522 8606669055 9145312767 6080719527 7957107522 6273423815 9833614448 6865766763 7464636441 4862279810 3959101824 7265014482 9044555383 6296601357 2570973166 7000094691 3862752015 9561579862 0824065098 3221118674 4258937681 8750899368 4982387902 6265962255 2530924215 7891617235 4307489798 5422408246 9262958087 1789828647 1410158577 0799320145 1110915899 5363863126 7259870729 7088995188 4790668920 9165728912 5716197649 1990241473 1555439600 4215764403 8903785253 9304461519 1837434256 5068431910 0459719775 8023477140 2256433262 6545805784 3883893712 6315466789 3905506977 1052088922 6310361827 6696311789 0773546090 6444618093 1795089847 5355313245 9879818010 5062357934 2308271562 1758649916 1583905774 6542461957 6117844140 3999893905 4172138722 3464609114 2678078813 6220545932 0859693932 4580577767 5674794630 1286925802 7220729215 2752169361 7710391025 9544468246 1628966183 0226485427 2353280552 4505524811 0838745965 1235847692 8183807469 6544223883 1956635529 4745677169 3767576485 9657620000 2788337467 2856860509 3534050946 5403661007 9961892093 2250726391 4720596336 4989870836 0838135090 2314811428 5658728366 0302017547 4045789140 6433526872 1163364721 1406713057 0803282131 3128283738 7023970595 3507458566 4136129937 7065355019 7083322168 2633184118 3379047170 3954159194 2172804117 7263630290 3588129556 1749635126 1284462204 8011413498 1458426193 4911224926 4275492337 1252966083 5982488733 0487025120 7109550309 5702100241 6478473460 1701423655 1921804375 2023627201 8623042289 7753458554 9592121583 0992024515 9210614662 7045870052 1419808357 0826524513 3544736873 5010210943 6994348059 4224287367 9789420069 5181969055 2455892058 2574729718 6653542736 9917060991 1611687622 3079786335 3856174108 6485869316 3472016196 1879769530 2106113893 5443788236 9280376273 0992039004 6586698822 2424847492 1895585403 3044019640 4773591617 1049237855 4619423792 2832320702 1946996561 7421327510 8971946675 2567130659 1841538715 7280950579 3027891951 9718831054 0561757491 8582208361 0586192340 4297570536 1462277891 1324129284 0890529817 9980292788 0362176254 3108018364 3015298514 6113600559 1831882221 3315803808 9645073207 4393818524 8866870696 8112294124 5711464741 2983645947 7577423629 2918275674 5586138757 3375156495 0983742602 4911940305 5482113004 3627780552 8975587642 9350449957 8239455445 2123909146 6188130879 6009889853 4766815618 9679418453 1150240063 6545064666 2072228491 0507990764 5383623847 3089933119 9544284539 3157405719 2292580914 8687987718 5045060320 6354695720 8275969886 8551344429 8520892676 0034846648 3144999479 0455611706 3388565029 6164383424 3421858104 7549403103 8671699030 0952433168 0863506867 6865663426 9078575460 2742636406 0429176301 4999577634 1791000697 1322953946 1693153421 8791190776 3281327528 2240352537
1186350 3129582746 7785932824 3175240603
140562 3672563899
3055 7118371723
572 6171033773
344 3800195189
36139171
63977
4517
2909
1997
137
107
29
7
3
24

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

Factorizing N+1

We have the following 0.175324% factorization of N+1:

2
52
425502089
854013527

We need the product G of all the prime factors from this partial factorization.

We set S = (N+1)/G. Note that GCD(G,S)=1 and Log(G)/Log(N) = 0.175324%

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 = 299 suffices.

Finding a Lucas Series

Next, we find a discriminant Δ that is not a perfect square (mod N). We choose a pair of integers P and Q such that P2-4·Q = Δ. Let α and β be the roots of the quadratic f(x) = x2-P·x+Q. With α and β, we build Lucas series U and V. We then verify that UN+1≡0 (mod N) and, for each prime factor q of G, GCD(U(N+1)/q,N)=1. In this case, P=20, Q=-29691, Δ=124 suffice.

Pocklington's Theorem

Given such a witness w, 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 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 ≡ 13 (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. The input file containing N, F and G and the output certificate are included in this file.