Primality Certificate for (7147^2161-1)/7146

Andy Steward8,325 digits25 January 2001
Originally by David Broadhurst 2001

This certificate uses a theorem of Brillhart, Lehmer and Selfridge 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 35.238249% factorization of N-1:

From Factorisation
71477 · 1021
Φ22 · 2 · 1787
Φ33 · 673 · 25303
Φ42 · 5 · 37 · 138053
Φ52609491572645161
Φ613 · 3928651
Φ82 · 10923929 · 119422529
Φ93 · 1086301 · 29425681 · 1389775771
Φ1011 · 131 · 311 · 5821166171
Φ122609126404513273
Φ15601 · 20161 · 1233751 · 455318637150438991
Φ162 · 17 · p30
Φ1819 · 14627233 · 479542289310541
Φ205 · p31
Φ2473 · 73 · 84673 · 78341974441 · 192577292473
Φ273 · 611651334430494644347 · p49
Φ3031 · 2019783211 · 108738807716762567821
Φ36181 · 13537 · 590833 · 418980842507881 · 29283667807072205773
Φ4041 · 2161 · 6841 · 227281 · 568002394961 · 210853901512081 · 2808842319386857264801
Φ45892351 · 9189181 · 1285260193400100744718655460812788021 · p44
Φ4897 · 446117173289521 · p46
Φ54163 · 132247 · 187465753 · 2951538913 · p45
Φ6061 · 241 · 15121 · 24061 · 492061 · 1143061 · p38
Φ72c93
Φ80c124
Φ9025471 · 1782811 · c82
Φ108109 · 165133 · p132
Φ1201801 · 549863761 · c112
Φ135811 · 477091 · 2001024400018624741 · 22398455195766477773371 · c229
Φ144159553 · 1475137 · 50383441 · 409930561 · 5257922833 · 110739760273 · 1781161628833 · 56226231226530118513 · 11754157022664005960641 · p83
Φ1802023201 · 572191561 · 4422183841 · 6958476181 · 464306837845141 · 843234553888561 · c121
Φ216854929 · 995329 · 238416697 · p258
Φ2403999946638778091761 · c229
Φ270271 · 32401 · 75033624123631 · 228161105702085155671 · p237
Φ360c370
Φ432433 · 23761 · 872389873 · c540
Φ540541 · 148501 · 3840481 · c541
Φ72021601 · c736
Φ108091801 · 118801 · 374329631381325121 · p1083
Φ2160c2220

From this partial factorization, we use sufficient of the largest prime factors of N-1 so that their product F is at least N 1/3 :

238 0825306804 9830374915 4592706163 4998452360 4340309228 0045126195 5603359972 9747321683 7203826072 5994556118 3646471407 1913992085 0866377808 7951120485 3009270267 7533071660 7551673818 7548029228 1892011448 2040174413 1144282541 6733935263 9989558855 6390503862 6584312346 1004467751 7897130429 7988485527 2524181673 9205473081 6679974655 5313904561 8891424986 0364979052 7158220975 4371943552 7853614551 2023586583 5365689203 5517735343 2119471664 4373739330 0102296452 0573619817 5844753190 1258362431 3693747783 1979586382 8849056172 1025110855 9741395481 5142573515 9292624651 8046492950 2552190075 6297470909 5749029868 9225221532 1481407352 3051961185 8893590781 0076527850 6876510514 8939898643 8401730269 4338790661 0119064198 5842005246 7847151977 9006134589 5668334182 7065626578 8430718647 1342526212 1604043657 4367617318 8682943439 7491962373 5118933853 7425952423 2642052450 4860803391 5665264119 8127427274 1275802502 2830377526 2774892810 2895659983 9684865369 6339016736 8601707596 6267790732 6558642287 9760715235 4795626319 8670784480 6721866895 4979882221 4847553807 6692121659 0532173651 7380345006 8100106631 3764119359 9747090651 9928614607 6137512325 8745982361
15476720 4211852468 6065047970 0577566306 4135177721 8886280249 1805969462 4119049833 6021138672 6553347883 9655670308 3786181524 6739758640 9074885950 6301448536 8574669521 6753054798 0973662383 5827136519 3139930416 2259827743 1446120213 6035318063 2865219983 1040116721 8352508073
2088752 9200974761 3686573060 7421177682 2070541518 7844883726 7129864215 6607307585 1642271800 9678763959 7861162473 6450070684 8067436743 1708702379 6210633881 2695202204 4879261400 8713869614 4935455766 0298999325 7402769630 3182277886 0985932186 1820678471
31 1311946433 4155938468 2202401860 2943993681 3778961575 8995778393 5802391528 6695461743 9839842536 2409123520 8122869867 2852650097 9591232689
298 7132646705 4559782015 3401013308 5647221962 3982632791 2893291160 8279462936 3219394721
129003916 5163110832 9333557672 3946671473 0931835477
107092 6924944591 9426009002 9235515260 8954335953
19846 5119745888 0504770700 9341207258 2222394587
2993 4168079124 2704208010 3687940989 6896618831
15404624 1202827720 4818003729 6827725561
1285260 1934001007 4471865546 0812788021
1 3615081456 0030269095 4279545981
2002217900 3749029496 7212290593
223 9845519576 6477773371
117 5415702266 4005960641
28 0884231938 6857264801
6 1165133443 0494644347
2 2816110570 2085155671
1 0873880771 6762567821
5622623122 6530118513
2928366780 7072205773
399994663 8778091761
200102440 0018624741
45531863 7150438991
37432963 1381325121
260949 1572645161
260912 6404513273
84323 4553888561
47954 2289310541
46430 6837845141
44611 7173289521
41898 0842507881
21085 3901512081
7503 3624123631
178 1161628833
56 8002394961
19 2577292473
11 0739760273
7 8341974441
6958476181
5821166171
5257922833
4422183841
2951538913
2019783211
1389775771
872389873
572191561
549863761
409930561
238416697
187465753
119422529
50383441
29425681
14627233
10923929
9189181
3928651
3840481
2023201
1782811
1475137
1233751
1143061
1086301
995329
892351
854929
590833
492061
477091

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

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

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's Theorem shows that N is prime if and only if c12-4·c2 is not a square.

Here, c12-4·c2 is ≡ 32 (mod 64) and therefore cannot be a square and N is prime.