Primality Certificate for (3894^3967-1)/3893

Andy Steward14,240 digits24 March 2008
Originally by A.A.D.Steward 2008

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

From Factorisation
38942 · 3 · 11 · 59
Φ25 · 19 · 41
Φ37 · 79 · 27427
Φ6151 · 100393
Φ6618479309 · c2363
Φ1322c2370
Φ198331729 · 443410699 · p4727
Φ39663967 · 7933 · 117539378263 · c4721

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 :

1493744 0445716250 0927812352 5744088525 0079659569 5804769940 2349321005 2733766418 1662162559 2903863105 0492500613 0670826614 2131369617 5813162773 7729658242 7594959258 0024835962 6761964896 9714824782 2419485457 0777473538 0616779759 0731790731 6466110289 8629043514 9893301576 7484412971 4195185388 9419204270 6422887172 8341626852 2718271769 9776439119 3551978412 6215651182 6808981088 0144942920 0877291312 9838013359 7781008390 2675485377 2921759662 8833391742 7298170814 5527288349 3624254067 7538807399 3880828398 3970473930 8667592330 4227593885 5804943050 0910806133 4639320492 5018239765 8907167329 2899410486 1110508099 1825040629 6280781838 0990872754 5829346453 4516659160 1815558393 8352769954 5291918368 3024336932 6634507066 7978201219 3550749922 4166731770 6266334304 3556152413 7361670221 5642116206 7181999644 4434914756 6779040653 1082774715 2540334366 1763478870 2074672319 7710196847 1643981724 4713852710 0873110318 1132178113 3209562651 0570018779 1514609715 0799896358 8020479789 2116965543 5692317324 0741073715 7055770554 2245926612 8420393932 9197204852 8117277936 6284693569 1675546708 8364868881 9242447658 8196733269 1263646428 4240684510 3007213905 3370965100 5516843923 1977478933 2921404534 8756995927 0801103806 3175265121 9609437800 3645390059 6820784697 3763923913 5637077515 9353425979 5776164617 1623592096 1443635831 7177653169 4704114613 1998589052 5366230017 0900113456 1327899944 6036354540 0652714509 0621766908 4565721759 3583287330 3723385048 7117882456 1954572958 4378832043 2913018756 5219453667 7043259557 4243921655 4194819358 9117680953 6299140839 4864865407 0088797990 5128556507 6147407673 6345028988 7237109143 0781346119 3543788303 4667377487 1480920313 2909522696 8602007757 4996202407 9501028427 3027592342 6603822026 1337707315 3226654939 1333959067 0409711551 4183077858 9884298677 7223283102 0459042856 5508785751 9819106876 7821490739 1799336459 6467752605 3602512988 4082069380 5708219768 5954541545 4710571594 8174174038 4797953330 0624736117 1092772274 8382983990 6511297627 6449711648 4229121875 9242213403 8865655940 6657003609 6451764252 2622880236 8264798590 5018468804 3179348519 0163961705 4699601953 8309086614 0576486157 5151853735 6935840976 4015397591 2908247860 5143041513 5194392029 3883511885 8254835278 5173602512 9011740417 3828947503 3099240573 5570491406 7664802047 8306123269 6203486278 7097203758 7307587679 2100321609 3885156998 8881956326 7220719718 9819013611 2826977171 5757820774 8946193027 6705829707 2589177566 1118233217 7319495107 7938705676 5716020154 5297025514 6695978886 7464266441 4800839088 6385304878 6734610486 9151607591 5948904514 6287144438 7203298836 8682078880 5336563028 4734416667 4905851832 5177489320 8464262590 3381650610 8538755349 2698886248 0451180881 1508139011 8497063694 4888391245 0310710697 1322596261 1102128326 4103235610 8951583514 3265061938 9381730909 2881710969 9996417760 0367385048 1422221813 9929539012 1066245600 4615650161 4628996954 1422671258 3003336057 4950403817 0541404273 1349118511 6551032354 7495887347 5744341372 5054398839 6503445718 9198175710 6163824642 1238793776 6847356808 5400917995 1597388260 8123026395 9713417094 3606117103 5266965410 8836960607 2311832312 1854376736 5234128679 4777638986 9537948293 3916249908 5652539183 7376764529 9482633620 2127732274 8829830954 0162365581 2483506316 3727681316 8745948492 9416424446 5282378681 8674875014 5872370627 0371631654 9712650204 4541168490 4317621004 3787721180 0964557857 4342561679 5726890215 4607363477 2465343621 0368729787 3256991295 8916977020 3784566685 3881083106 9761782873 6864929928 0547006400 7440783261 9106450111 5908985758 8254405242 3526687706 7202761169 1256753881 8684190814 5992567897 8921065787 3432029488 8322713530 3782596242 3870899059 0046913513 7166575140 3223595964 1139724625 8659447984 0132385911 3993363016 4445564950 0983144441 8947458142 4019368456 4584229479 4767550891 8623204539 1988039184 9296333949 2100477315 8063690259 6504120874 4319566397 6889113331 8019938495 6707736399 7127318927 1999053778 9607850442 8738522331 5663260494 5114603348 2286646687 4537880297 3927034218 0460095410 5784475902 9123520772 1854184938 7930169475 1013232038 9869356452 9821495202 2838753101 3739236326 1750297441 5389232939 0338952503 6190767629 7070430231 4887449886 6980007774 9404034961 1855354085 0057950623 6301706775 2548493151 5020061624 4306641890 4220251786 9043750865 6036400644 8701380091 2450818288 9279158888 9772543279 8605769099 9106684953 1760293519 2054921723 9186151457 0259611252 3149518992 9409744405 6346848939 4629285767 1040785520 4976893925 5253905549 6583529983 2110589840 1761078944 3756210934 5116061392 8026332597 6501468468 6108953179 3737174842 3468919128 9048900306 8230787146 4574252873 3250344870 7783596625 8099427593 8277611067 8441907929 4623597802 2365106078 4971021604 3066539422 7528138647 9206348596 6703334416 0817814173 6398522811 1382514390 4227018247 3590993997 7244240538 7774278700 9578724351 2214126450 1740078259 9208228312 1219502594 3716680635 1834531013 5603825430 1609402773 9255262373 4348496205 8154100726 3878129357 9464265278 3669320743 0868384319 6904246162 2324102718 8286018661 3439099130 6388331196 9731503751 1374083881
11 7539378263
443410699
8479309

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

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 = 2 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 ≡ 21 (mod 64) and therefore cannot be a square and N is prime.