Primality Certificate for (661^4363-1)/660

Andy Steward12,302 digits06 May 2008
Originally by Tom Wu 2005
A066180 #596

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

From Factorisation
661661
Φ22 · 331
Φ33 · 145861
Φ67 · 62323
Φ7271225723 · 16283347 · 7707526049 · c2025
Φ14542909 · 13634935891 · 76002550171 · c2023
Φ2181266083 · c4090
Φ43624363 · p4092

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 :

19 6512639322 9350550745 9473684302 5299288250 8174665864 9062381932 8513380325 2030105103 9215712477 1870619343 4308406736 7149801430 8922291807 9167450421 4192183202 3610065224 0492501245 9766785229 6833149630 9087840437 9394404303 9308766434 1828666422 3745334623 6231784403 8315232975 6815786824 4547243097 1362919183 9783207060 3880634659 9592621262 3503999615 7117914442 7042410167 9042709112 7359364046 4318779204 6298020674 7728700720 2739995399 7830618670 5716710398 2364314595 3128343284 2841263882 8512623077 6921455426 1443568941 5796721990 9553310759 1531244558 4749020887 4610155380 4989818409 0844541137 8708076280 3688849961 0760218130 7222689775 7255639229 1290561859 1090575073 5049412199 0083980482 9810237043 2828663175 6526686764 7150630046 4631963238 7185149691 9369816913 7735396154 6095016437 3366247624 8978913944 6073617544 0447540501 3796751804 0890891990 2443311769 4930760965 2572141943 6218596203 0496591743 4179140064 3245301747 4766189580 3369483697 6320258878 5534149228 8562244859 7301637893 6835635850 8636331519 8025679796 4082806651 7136787433 8361885627 6419649821 6626932803 2028183997 7713699711 4115568613 1779446465 1698094239 0937089896 8480577858 0268902339 4955014898 7473586664 5045847519 2008763904 4309216870 5960020576 9402550770 1949279235 6737956567 9609384815 5026409156 9658327889 2192987154 5689856764 9467439411 2017900642 8496582413 6062523014 0877501141 6203778509 9184657219 0679813663 9753600996 5714116121 8678596288 9482513937 4832301880 6081521465 6772126650 5623804422 2702692404 5703182345 2335968835 0421018133 2467382895 9626784372 1062745075 8512319066 3311138596 1659057555 5777125125 3083457097 6184108077 0320851676 3450239079 1682685052 3279807519 1204043043 9183803891 1245591840 2079349720 7585214703 7949622365 3627137563 4217300260 1970241261 1556580759 9431966095 8183202616 3032122993 1111122895 2496460963 7838357462 5951227945 3549113558 3762307311 4839459868 0377455760 5303132121 6434772780 6893723567 8255260300 3368201503 3409330800 8974895579 8672128136 2508298680 8243819456 5402450836 9776561328 2165141419 4803652749 1111298056 7752487973 3569296596 4930128856 7299762928 7887987825 3927925085 4613708015 4460100202 1120177521 2564368432 8520293780 4955678657 2548412341 4669227187 8690918257 1714353619 2311332123 5971541316 6818457515 4596626093 3735046613 7635288926 3664751392 4948995092 8054873819 9937353443 1080940584 2905532396 9295616665 4769165660 9035130523 4548602936 5688304064 3389366627 9768361679 3957386318 3079331026 3132991349 7553325304 1727834093 6531881109 0464801947 6982464813 8331182835 5098246848 6897034631 1181128686 5447986413 4947792495 6194124601 2785555340 3571485129 5046626722 2142839224 1521254054 7764132927 2683441785 8340890799 8198329054 1703601192 1851310432 3520805734 2153487205 7424272542 2258966897 2788593611 6467424484 7472132803 6555034284 3269377270 8733013693 8315507843 6339322192 6058074595 9088234512 1548065577 1847028255 1184254680 3844060734 1911898726 8933865055 2997143664 3486010934 9350279311 0191840045 8379124223 5601752736 3073169516 8677591642 4613863169 4591238884 2047695947 7159220576 2947334428 4086622770 3266749972 2096578536 9177752379 7644118599 2853380950 5557977362 2270175085 7526658520 8869584748 4116983396 0728895513 5947741867 7939278399 8436865906 4568960362 7660951719 6140628973 6759929378 7948807432 0399297060 0716346616 9121558264 6681921752 1904393033 6724817046 1198953785 0809265426 9440465844 9674862512 3127235488 5142619831 6027399091 8018161418 2396561035 1391621850 7032018882 1305723613 1877928074 0396460988 8668073945 3028947823 1233883200 6359197617 1757489137 8656424229 0014398859 7528408860 4477658264 1478125077 6717727958 9496927404 5464823104 1871035112 5077428516 8892083622 7739130926 9410469247 7672662897 3780771160 9384136924 0280265517 7553162434 3464579132 6328080186 3538702396 9983607090 9668646104 6768510870 6583006171 0997186571 2832989124 5787191941 3709891798 5406162433 7460356963 8990827113 8165337835 6998790585 7339109667 9692207535 9604842379 7740301383 8174906066 2264315891 1883407074 1585444285 3443869888 7243424849 1631280342 2991039400 3211952681 4616651468 3611714553 4595872536 2737988815 3363485154 6229697531 7654427940 6161271471 3483990122 5390279854 7872883361 8342165564 4106051426 6900032053 4463543454 6654257990 8967631433 2135434845 6737865804 8654726103 6513913337 0492404684 7931131275 4194582683 2194224511 0489781803 1757859572 4915258530 5269678220 4979819884 2025544347
7 6002550171

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

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