Primality Certificate for (1046^4177-1)/1045

Andy Steward12,610 digits18 September 2005
Originally by David Broadhurst & Bouk de Water 2005

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

From Factorisation
10462 · 523
Φ23 · 349
Φ337 · 29599
Φ4193 · 5669
Φ63 · 7 · 52051
Φ817 · 17 · 3049 · 1358537
Φ9541 · 25223221 · 95982553
Φ1213 · 73 · 1261421209
Φ16132241 · 262321 · 41309914138817
Φ183 · 991 · 2287 · 22051 · 8735761
Φ241993 · 719028620487888042217
Φ29c85
Φ362341 · 8899605577 · 82339465061757822568453
Φ48769 · 1215121 · 8629297 · 19475809 · 13076459191213695372679393
Φ5859 · 969380449 · 766950266067521 · p59
Φ721009 · 31177 · 267193 · 2894041 · 3884473 · 6275501234982030169 · 4962775817786883990435628777
Φ878601645457 · 292862624221 · p148
Φ11615134869 · c162
Φ144433 · 577 · 3119113729 · p131
Φ174522871 · c164
Φ232233 · 42689 · 103713466778561 · p318
Φ26178823 · 8157817 · 310981452795019 · c481
Φ3481181461 · 22052761 · 5666769013 · 410509472371237 · c301
Φ46411105377 · 15931441 · 5597232331859126641 · p644
Φ522p508
Φ696c677
Φ10442089 · 4623611037907889017 · c993
Φ1392c1353
Φ2088p2030
Φ41764177 · 6611079889 · c4045

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 :

1334418348 6204104877 1796545775 7384717030 0527359495 8249158184 5502603757 4511280657 7270974970 2896057321 2405210253 4978348988 4458382149 0123464503 7589040066 8140407760 7875342636 9647578169 1420104622 3446501192 4460859762 9375124452 5056670297 5725652111 5643797882 9993158328 2681708567 2588214301 6230550937 9639739987 5640687864 3956340696 9806447794 6548262841 0141190415 9799684537 0536195143 9377665368 5132732817 3382431036 3605865224 9961909894 0797055668 8139683646 9195967535 2051241898 6836161453 6933783665 3048556785 4174810532 5056095088 3587717137 4744082054 7395567738 5509214784 8091658805 1636503040 2528256066 7469688687 6550261108 8614107286 6483266844 6003170614 8631657250 9468317532 9621532008 3822355979 4065846042 1505764003 3384594604 3156391609 1708080188 5466295920 3926112794 5597223132 4398753183 3332658950 2572469428 8519783897 2551045858 2378292530 5979922364 7296292826 4590437123 3543437938 6041837368 4889402079 0592303143 7605380117 4590458622 1995680314 5770901449 4919896124 9278162267 1969966545 1069073294 5627845945 1970702785 0897597309 3306569530 8059729127 2280111084 0419554908 7451657530 0684878526 7626109757 2004356745 5978268282 8036588490 5306841266 6226926188 9142454769 6050375120 5585037279 9593306825 1831049557 5868382572 0969526680 2808866466 4758663283 1462993751 4415712457 2309434431 6238543973 3460864528 8369461375 9286296834 6161736489 5400452486 5557956015 7145897789 0589344386 8274990102 5766828015 0385163801 3058006076 8892129214 2299824556 3336365755 3504236198 0212761837 4244564820 0964649612 8728272634 1142660576 9808072303 8783403363 9160064486 9623546859 3096078102 9644803355 3122668522 1378242999 7136641737 7023006629 4095947178 7333177491 5703433562 6577183181 7904128325 5726859709 7796691007 8400992875 3783277509 9618120700 0172920467 4241849574 7560905702 9296023171 3961586436 2325730161 7763468172 4454800306 8272945631 5094295442 2759543382 3198626251 6343734465 9047591279 5236744021 3423792337 3588699311 2823846771 4063775204 5515001357 6779189826 3694412432 7618949684 4600724904 8884071877 2220079826 3165834721 5504955975 3526628872 5822847944 9388344609 6697194837 5729638867 4041689929 9537096714 5593855357 7183099910 0372357121
2395 1660929496 2125799846 3546897069 0225362854 2288895323 2887085863 5626417820 7376235577 3104912820 1297824618 9468243083 1915832830 6363019467 6683466633 8352681282 9042148603 8086619345 5597249181 2633550221 7343080516 6939170776 8599031549 5251726925 1209437474 0275515292 4767795585 1129703076 4729026699 9416905396 2568837758 3059875171 3938665161 0733231368 2514435836 9308863224 3630126878 1980381046 3226725713 0771108336 9383986608 3641001659 4101422884 0232680860 0849855900 0160985310 1073983771 2541252848 2421560086 6020156264 3054261205 2913516929 3273152676 6593700801 3356409651 4012909031 9581527648 0957021521 0375801074 6509564012 0564564551 2601821506 3502109954 4328611542 1886113793
19112742 1876681188 0943551041 1126193698 0288182826 2194698421 2147464480 0165336649 7931530878 8733652325 8958031032 5575610569 4376709730 1200387472 9102321319 6945624699 4477830440 1865038156 9994590839 8398184283 2584589434 9496366338 8272067050 6232245687 9382601127 8618598059 9679202129 1816039322 4540370019 4240029258 7849511775 3436566611 3879350841 4851113801 3289680597 3809549024 8777071910 2599952053 4196760142 0562899714 0863503456 9519900017 1313502103 9533221659 6880305003 3350026661 9369701600 8442367138 4468431865 5148497384 7785206681
14929374 5411871947 5940546095 8790718675 7640945199 2042433573 2676028022 2028102689 4167227933 0016755937 1253272637 7193616336 9673747908 1477668520 8877987011 4615421020 5064279156 5122281273 1460776570 5897717476 0040101626 4993631759 7348840202 3426835050 9195668769 0474466835 4815162550 0929365090 7329439993 1348288697 5616686431 8262247753
49216809 0100295766 5353281974 5378395610 0797303706 6320005996 5608757269 0445157234 2724706853 8197568096 7929049808 1522000548 0145658456 5459658847 1218423263
1 1112862420 2542194652 5997664945 6316011389 6712708853 0488627388 6172065418 7987278795 8247650702 0354772161 1942099186 4350294413 0111699729
802340471 3215672981 5051452193 2975276250 2434538923 0612946021
49627758 1778688399 0435628777
130764 5919121369 5372679393
823 3946506175 7822568453
7 1902862048 7888042217
627550123 4982030169
559723233 1859126641
462361103 7907889017
76695 0266067521
41050 9472371237
31098 1452795019
10371 3466778561
4130 9914138817
29 2862624221
8899605577
8601645457
6611079889
5666769013
3119113729
1261421209
969380449
95982553
25223221
22052761
19475809
15931441
15134869
11105377
8735761
8629297
8157817

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

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.

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