Primality Certificate for (13320^6997-1)/13319

Andy Steward28,856 digits13 October 2010
Originally by A.A.D.Steward 2010

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

From Factorisation
133202 · 2 · 2 · 3 · 3 · 5 · 37
Φ27 · 11 · 173
Φ3151 · 1175071
Φ413 · 3209 · 4253
Φ6177409081
Φ1123 · 331 · 463 · 616252810163 · 80942967211740462662593
Φ12501577 · 62759472313
Φ2211 · 301643 · p35
Φ3367 · 1909513 · p75
Φ44244553 · 12760133 · 21456469 · 1892474694708137 · 68931547214954689 · p31
Φ53107 · 1697 · 2969 · 319535304743 · 55699645448914325011693 · p172
Φ667533619013307001716306138517 · p55
Φ106106319 · 267227 · 4046233 · 158186172323461 · p184
Φ1326073 · 20262133 · 453721624267693 · c140
Φ15911131 · 3091279 · 172149057193257631 · 427045942931100667 · c384
Φ2122946128421101 · 891567196390293533672629 · c393
Φ31876003 · 29491321 · 288895966179877447 · 18525601953861190654849 · c377
Φ58355673002001 · 68857607633 · 27274007059553 · c2110
Φ6366361 · 30741201689074615597 · 261405856859620922497 · c815
Φ1166250687446461 · 271679234034062999 · c2116
Φ1749335809 · 55361639191 · 175586352038593 · 16311077896205149369489 · c4237
Φ23322333 · c4287
Φ34983499 · 6997 · c4283
Φ699634981 · p8575

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 :

26604 5202827594 6567286984 1925214289 3835098424 1879606701 8200138660 1800964958 2836327382 7063467763 1933193380 4479271867 9259508898 9807858622 6859991110 9097159488 7363391645 0811038653 6136432590 2879513490 6084645495 1554571054 5656490437 3685100182 2504481577 1460268723 5306347399 6634437134 9589489756 3580921825 1229852227 2604639105 8997588216 5463342436 2267577124 7240963584 5610913858 2505441902 2466231301 0347986760 4884256379 2768510279 9698815461 0211124927 1121495560 9944397859 0381215002 5427512335 7940452245 2634515246 0398303333 6588021644 6326345117 5533546558 3550661111 4273915908 5995339412 3478525144 4843628847 8208127186 7729580270 4130729390 6012052924 2105593898 3193981983 4388146299 7915207030 3617617341 8445741287 1006941607 3006232425 3318492121 5986885309 4775908580 7448199485 3890333654 6242653699 4440076926 6028309021 0051624274 1676182928 4897670488 8148738963 3558499974 5522848760 0344425489 5099222456 0439997406 5334198342 7454453202 2873554610 7361005334 8316424596 4032562415 9003387985 0952753806 6187351931 8479847711 3880958382 5677912281 2828958655 1549929991 3894748678 7330090939 2043956221 3029407885 2230802838 4793751748 8055871988 5857665939 2784252569 3771646508 2787459954 3942924819 4386494678 3569085397 5469079918 6196892583 8851018305 8345060689 3547424048 3775572657 2595600919 5500018865 3013808605 2318841111 0604075089 2330073909 1619593858 4075628926 3252508703 3000326550 2744166983 4588302153 9858896721 2156735714 3315577478 7008100423 5146119548 9866531444 6691744191 2967534098 6561562494 8937781659 5251321084 0823126164 4129757273 4978355642 5909371471 2350432183 8425621160 2031681616 1801572358 0309063602 8486506153 6128437031 6069353190 9873607926 0034119581 9359829198 1808049953 1550921150 6323164108 5471776639 6822990066 5502355192 0801932541 5597707612 0368039079 6582260758 8620486029 5833863466 1324668339 4044408938 1126180299 9255914225 7697100625 1898138248 2932833203 5640262943 7338980013 9084739859 4130888851 2565489450 7120962476 8159817678 2537366284 9751281183 8123504517 7999230491 6524597297 3158956442 4105032010 3806611882 2861316370 0781684579 3440188031 8821157430 2714679430 5017228930 5138811404 1085835086 2398518109 8780590304 8895182992 1352460165 0394984362 0480252114 3284981930 6365401349 5869372298 3343060550 9359964951 1653194537 8861680824 2380371220 1810763817 7693737508 8747308743 3974107531 4530273776 9844267158 4739035612 3363121565 1989369939 1412766515 1128756112 1414001905 4005718712 3337314365 8680625328 1440439680 2953544849 8162100962 9870684374 4006619462 5588763301 4473549611 9418734144 7760082000 4792300992 3339790322 9454297454 6340051716 8295842758 9579771304 9353360756 7130808918 0526891569 7069837023 6791109336 5172454369 8737289820 9548432573 3870442903 3798433772 6307872110 7157972873 8664261118 3539597713 6891764108 5312228466 8378206210 4322275409 4321473702 7551864997 7977112714 1786759054 9508353242 8094080825 6175869825 8100078991 6884313647 1685409460 4115304846 6152348352 1290624627 4933212018 6502564162 0385737300 0622546703 1587379138 8898297743 4676808559 1173966460 3560964198 9467690297 2966561517 0583742466 6182719165 1197171816 7878805611 8625784662 8284293150 8611080774 6163278645 1424112406 7782905242 1767339291 0108131624 9588027095 4237410090 3517418577 1403197388 8491800934 9285204561 1425684874 9051666897 1137647797 5138049667 0418584090 9488731701 8906222407 9717658289 5512158629 2976228720 7136812645 3583219662 6663125173 7174572990 9296904928 8671857105 4611381490 1105743956 6072046914 2812040152 9738510476 9048314863 9900818150 3903891935 9108072566 3149154126 7191981466 3057036652 3618456204 4507770506 3100512040 6078091288 5024149242 7684708446 1150080332 0876220953 8501377861 2421659240 1415849075 8809977255 2698293566 6821684630 0858903122 7987398169 3557044685 9926129642 1320734989 6409810562 6065056593 6685609757 6479201882 4355040688 2334551645 0850582152 5550195591 6799683470 5756427514 9603677385 3201103064 5568624552 7576766318 5828634169 9961596541 2506079414 4822742261 5218149757 8979607278 1190703916 0641931169 8166718389 9426231431 4322264138 5333212344 4516536845 2507270046 8328950750 0915112126 7651362708 3087919987 8655000557 5474840447 2236401567 1970793301 8512049197 4152486214 1944254872 5992778209 9735660971 2421558061 0424081736 2665036464 0019541108 9315958861 3587198812 7884758439 2305561338 8876558721 5742260182 7339589360 4218051615 1788161299 8331068317 3632060253 3825960590 1269533831 3442608285 3496969070 6373400393 3747415475 1801081021 2240808570 1389486694 4686041340 2793377088 8796519531 0949648868 6704971574 8149414586 9629641330 5948068641 2629448131 8337094651 3277033400 6177679000 0124023779 4515791300 4885332921 9462161288 5887570176 6650192905 5143415089 8873975142 1773849606 8014379597 2804542086 4825514274 3269194200 0685557648 3266862131 6036297945 2729193281 8409222057 9011790229 1845758775 8797232313 2565009959 8183325446 0689737883 0220392840 5011144635 8398843869 4444851703 0993153947 9880722971 0834515584 9297731246 6141304159 1948231715 9701724503 4370487371 3311304316 4745028808 3994983892 3613594195 0558474290 2849398183 8297724538 3456999393 2442789944 6889608650 6082313702 4926583700 9949433022 5768300772 2133084857 4536330004 1314859662 3626517165 6290838097 6713459441 8021245271 0171402260 9081395695 5390674999 9133067525 5393741241 4125511858 4928454943 6787603004 8127311938 6277664404 5046609337 3849368854 6265160205 0245606540 0298330438 3115644044 5593883699 9681444818 0625067258 0203561706 7718549603 5611105886 3930177792 7137701630 6778511295 1902996481 7570257059 2462563794 1269555942 9386617571 1042151051 5421354992 6966019504 4749103172 9136838728 8073296470 5950631566 0688477512 8045877050 6801024695 0372897106 2891423407 8476696726 9117996785 2371359692 8152944149 5374690913 1880211545 6920632649 5156699087 6305872857 2668351040 3190927653 9340663723 7036171120 8265112349 8018917005 5127513204 3846886490 7429222912 2776234847 1579606752 1430153501 9551885012 5373971338 4708034142 0440764517 1606712268 8910297764 2771675772 4777835196 0469706582 3314668604 2733269655 3729476481 3321016382 9294502685 9820738462 6232814538 4025159268 0010032313 3173075193 2155747444 7676362408 0515700802 7341667290 7949561378 0021164208 0892078503 2580966045 3549497457 1508882795 4971254401 4221180630 8652280114 7212199280 4938106927 0484547839 9877917392 8693686654 1848407167 4227883585 0677951932 3452926782 3974284037 9716897682 4298538111 7939085401 0288333781 7139979939 2841514434 1454404768 9451457599 4629256493 1010641942 1652101045 4060399560 0596640082 1448069766 4029773560 9910466380 5370568818 2788076416 9632116988 6618928328 5020022222 3329909601 5236859263 7872799412 4211497705 4519699312 9069923372 1502911919 8336754590 0489184216 3045090385 6690252106 4834188122 2423620605 7526436401 7866888577 8804809832 6043631654 3252858783 3418888316 5236642219 9151195786 6931762692 4252408981 3252028664 5158251210 0210801082 6019580748 0956035941 2243276134 7767241889 2018145594 4170682168 8945842504 3960904115 3398046684 3159163129 8831887855 8672421603 8962366978 8939891857 6700664999 3974352505 7354779365 6167839273 2705973456 8624300109 5968056999 1202884305 4540724471 1384958737 7798939195 7855410307 1001266610 1722207669 3650613772 4375546739 6384943958 3509068602 7018427644 0788927750 7004205729 3076679801 5782570535 3572014679 4944930409 1330921231 4466957372 0450593100 1249681644 3840138062 2491823380 3781157265 7081960164 2581568180 6875578533 1352993399 5947451866 7833439696 7189991277 5191602649 8375971117 7298319231 5550000332 6802503467 8945242434 2557690978 8779423871 8241869808 5336728626 9723382588 7488392510 3091348957 9064157847 3951042287 0555483065 0929671820 2120439952 5204473516 6512962807 0687251629 1973008745 2864462494 5967529610 2583730602 3502693910 3672184089 5773269011 4292072531 9053416152 2139936991 8894366980 2340251051 9068654928 7880158207 3001133567 0157296014 8533433793 1667950938 3655595772 1900835542 6859035806 9368323416 0857947209 0104912869 7835363425 0644099318 7843087113 7416454143 6942351968 4171863534 2495213038 7790749433 1817700890 7005636475 0549556910 7318731945 4331152758 9106985144 9433882052 3037944647 2290965663 8156000000 6226915585 8576419143 7532365877 2631569488 4461846687 3177103762 7558678755 5682799988 6332490997 7215779465 7438259167 8823066676 8543306248 4866603268 5220486820 7050137326 5665907096 9801605518 5786888887 3595393014 9436165892 1664013194 2125173750 5994807767 2046167512 9047613888 4595837615 2399589105 7571178565 7139390810 9976360183 6619387341 9311201937 6662262478 3522638736 7599627050 1744489126 9659934316 9738661374 6281297021 1342221589 8902176379 8448664883 2108230026 1648693106 8011319363 0807631896 0637821748 0381141025 0363946266 5976511235 3652529990 9666314130 1677882449 5469283552 0399741749 9923785204 3446317794 5346628465 8653341128 4633658502 2769311923 8184476940 4023564330 6887661334 9867332258 7601814829 2928529337 7005362339 4089948751 6394100312 6837883493 7606862380 6299115100 0055595380 2986426562 8410052942 9333504901 2262509604 9523652530 9205694240 3479889057 9001357316 0046366166 8965316990 1369820931 6530239644 3770597647 3256758198 6266673196 8893697042 7046407505 4803239521 8157768614 1225289419 0392190090 3463168734 1605666552 3318963797 2152902996 6724812562 8884251540 7755863021
1638 6132544607 7465952131 9508439370 3114557313 4710396910 1934840278 9076955780 9200687204 6541449745 3667823939 1054527974 9511672546 5870560124 6205998277 9388698177 5353800183 0234417679 2640585849
31 0602680668 8277744338 5181848621 9343693726 7224020708 1625208585 8794526800 0422872429 4938539030 4034554944 5287108993 5740836444 2573346142 1379966423 3130672854 0418669099 3213009929
24157 6379749304 3474524394 7559339776 3283202202 4842199019 1932247318 6711191611
41031 1270749098 5240845140 8977706495 2848863102 4991163813
52981 4339412897 1970501435 7133476097
3 5387504464 4889659326 6883657897
75336190 1330700171 6306138517
8915 6719639029 3533672629
809 4296721174 0462662593
556 9964544891 4325011693
185 2560195386 1190654849
163 1107789620 5149369489
2 6140585685 9620922497
3074120168 9074615597
42704594 2931100667
28889596 6179877447
27167923 4034062999
17214905 7193257631
6893154 7214954689
189247 4694708137
45372 1624267693
17558 6352038593
15818 6172323461
2727 4007059553
294 6128421101
61 6252810163
31 9535304743
25 0687446461
6 8857607633
6 2759472313
5 5673002001
5 5361639191
177409081
29491321
21456469
20262133
12760133
4046233
3091279
1909513
1175071
501577

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.348009%

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

Given such a witness, Pocklington's Theorem shows that every prime factor of N ≡ 1 (mod F). As F3>N, N can have no more than two 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 is prime if and only if c12-4·c2 is not a square (given 2F3 > N).

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