Primality Certificate for (28839^8317-1)/28838

Andy Steward37,090 digits16 December 2006
Originally by A.A.D.Steward 2006

This certificate uses a theorem of Coppersmith and Howgrave-Graham 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 27.687465% factorization of N-1:

From Factorisation
288393 · 9613
Φ22 · 2 · 2 · 5 · 7 · 103
Φ361 · 67 · 109 · 1867
Φ42 · 13 · 31987997
Φ6831659083
Φ7575302474108596486842231881
Φ919 · 37 · 73 · 1025137 · 3328327 · 3285451801
Φ111018086567851 · 15152145846421 · 25796345221427298431
Φ121117 · 619252280309413
Φ147 · 29 · 6469 · 375011029 · 1168123856789
Φ1811802457 · 48742607182739662099
Φ218443 · 32257 · 756565321 · 44197376287 · 36339891142536405287279893
Φ2223 · 727 · 1013 · 11905213 · p31
Φ27290737 · 459452197 · 451077976876814587 · 333393140490107126707 · 9477518159352135115742981941
Φ28197 · 8260337 · 16033361 · p38
Φ33397 · 463 · 116243508248661972883 · p64
Φ364184898121 · 106687260109 · 2075584033657 · 357128567213632855957
Φ4243 · 127 · 2178225967 · p41
Φ44172155594261010245870688063820021 · p57
Φ54271 · 757 · 34129 · 102671355322985833 · 56218083732536434709419 · p31
Φ63104655942683587 · 3616689672688369009433512583127259 · 5258722698397731137378919013924327 · p80
Φ66600621082366936873935138007 · p63
Φ774809389047 · 8578649773 · 3082534249377296486120503 · c224
Φ841453170350904808357641541 · p83
Φ996099391 · 52687207 · 17996926663 · 3456076622329 · 4290060443434803870861898745861239 · c197
Φ10858537 · p156
Φ126463303 · 882081299611 · 39509942189182378925789409218797897 · c109
Φ1322113 · 2016001583973961 · 86521851759668874121 · p140
Φ1542003 · 87473 · 11030251 · 5280436615859284184165291663 · c225
Φ189733321 · 27995059 · 16680582157618088641 · 18297615266323275579733 · c427
Φ198199 · 174637 · 10118442943600993 · 2669812034430080233 · p226
Φ23129569 · 85009 · p526
Φ25210837 · 16633 · 97021 · 6544263097 · 61543275949 · 1047243125887476895989109 · c264
Φ29732445882834751 · 358361005597057 · p775
Φ308157867517776312103783611589 · c509
Φ378379 · 35911 · 97588180999 · 41828526813260198467 · 446393384023160388086328547 · c418
Φ3967941262429 · 154541093298769 · c512
Φ4623349501 · 11023783 · c522
Φ5942971 · 14851 · 66505429 · p788
Φ693c1606
Φ756p964
Φ924296813158990815853 · c1053
Φ1188c1606
Φ13862828159585435372576873143429 · c1579
Φ207914298652645201 · p4804
Φ277227982079474581 · 58304712766664477016289 · c3175
Φ41584159 · 8317 · c4810
Φ8316297073224166432207033 · 4615191172496197646893 · c9592

We need the product F of all the prime factors from this partial factorization:

4200 6614210735 5669086217 6162648104 7815907509 5396750077 8593675108 6942918062 0448935970 9006049762 7368157638 7813597486 7421641375 6161172552 2407759833 7764300786 8726750326 2746228856 2839222002 6749887821 6927539747 8640737634 8776224290 6653039529 1319781324 2632597337 4254189794 2453434693 7336957227 7385495150 5997990430 1944658084 3446601963 8725530701 9272238090 3613585906 7025004135 6526691900 6829309888 6773944551 0040246978 4419502693 8072633787 5182867420 5630251484 5832292224 8486681188 9142955727 6581913496 8143401921 7644083514 6390303952 0981413604 1586465547 5838455603 1781536424 2720718782 0770372685 0835897099 2576921596 3798989749 5297806640 1634210829 1843583980 6972901841 0625154143 4977867764 8325437935 3484641312 8318150865 2948303357 0563169738 3700568087 8387422736 0655511033 5825060383 8634895150 3507324734 9221954144 5970933344 6332806515 9434070623 5022724552 1065812685 1982701664 2206056381 5154486189 8677216413 9897529751 3003496045 5422172381 9268393859 1129736639 0858574325 4009167896 6850493968 3010502374 6346233341 4468823688 5547392548 3429768915 8217168854 1794392812 8030712895 9965236669 4456938174 2284762441 6753994415 9736524571 2787507992 3572384811 5875296258 3686480348 3652639367 4907043277 0380498592 7580981075 9514131352 7101456598 5011386545 7843631208 0749519927 9488013630 5005125151 3060670586 4976185665 9029529953 4158186174 8540237233 8525069540 5884595717 3858486564 5726634197 2325641611 1562008265 3935302397 7645221197 7795994202 3992901968 6866447671 9949641194 9783654746 9061906125 9206662007 1153053536 6394047108 4731465150 9241754713 5303303222 5439670413 7904301478 1516669883 1431274117 6661950578 0987382201 8814148851 8242499370 8113150125 1661318789 5533893778 9068495610 7336348517 3366721522 0650572459 4251362879 8384765333 8912912263 9286540025 8400431097 9835339505 0307591712 7956882247 3639622242 8171149912 2209495360 8059876630 9529575376 8684769921 5982021412 8116936864 8767455970 6675036359 0708535096 1610730146 0241778899 3815170283 8808390998 0429415867 9750579779 7517748496 0604124887 4137340560 0743812183 5609909791 3835318305 5072556930 1495136569 3669627814 2934727564 5604747691 3299604318 4106454060 1789352003 8893620945 2002156732 6535919961 9043771421 5184947599 0952929311 8716150357 0083569264 2271577992 0083245357 1470209786 1817604020 4313113374 4177612213 6074293938 6304359706 0362080072 5321737978 1965800833 8881107653 5677683561 4942029691 1107481816 2547562912 1311183834 4314911385 4027496017 6134400223 8395445681 0702253239 4385497866 8981421311 9229696333 7066316910 7054832128 1159939257 7320626392 4521885183 3229786314 8819688953 6602064949 7646811665 7799029842 2984323595 9011736382 6083012977 0938231953 4398791747 7101483389 4657281839 6048634025 7444998425 0442006134 8687119614 5498222386 0241638618 5598736705 0445892788 4714025600 3388612955 7218987037 1923304096 4417140374 9397968644 8273683088 4777537750 3553146678 1132605513 1925119692 6105383447 6219228474 6710653861 8576537595 3784113012 8327700738 4321227110 0474413255 3754520008 7664395769 9193972340 4350619412 5805020761 8975660403 1201638487 3949750898 3836520520 1401734587 3207271728 7239929444 4110043109 1933302057 1365355885 2567322310 2628257338 8955852073 6480622164 8980011859 8247097749 7302956611 5189502737 8395241457 0078434589 3541428367 2426947294 8530577336 4780790757 8418200394 7489685045 6148234686 4095610286 2158847056 5533515281 2621872620 2979123471 1485674884 5199371513 6812401367 8964258199 5823615280 2045397866 4998227515 6344945028 7925289839 4172223948 7770880475 8190821727 3894479972 8570000813 9038891673 4103901189 8783833120 6919365406 1735016757 0052108250 6770591838 5738121225 3926000868 0502116124 3167598558 2229607305 7917830698 7208486186 9024966460 0871945874 3436266607 3927267304 4073570565 8367555006 7871395018 3375265400 0925649748 6153215181 4066805654 2331258076 4023938821 9976992642 0667842707 8343240579 7682989258 2759155253 8363862408 9468541308 8676402424 6375878185 6637041727 8723769289 9691947791 7828418244 5405947797 4626310337 9475362432 5668084675 8528359910 9451153443 7802547833 2950424437 5424300490 8541992202 2312411627 1812493528 8239077500 0712040391 3011395717 1273611363 9117180448 2492525652 4789512919 9603378896 7204773270 3615082398 2746595666 0814514650 1283230029 3683789393 3029911939 2038126287 6353862165 5951865652 8160640356 0116596257 0143008788 3421692977 1225927546 3419579510 5609852608 2148899888 3554249430 1318938670 2532143017 2978832667 0732868835 3245218725 8145522058 6499084009 5310308984 3529490590 1241313057 1558889737 9380901609 2772784651 1955883936 7972744139 9313526936 8598189481 2399832119 9870192856 3324945912 4686041958 7895820348 6719715659 7683720138 4046875695 8382087931 2453051250 0037022638 0742733494 8774822023 1811612826 1868969789 2147322696 5276115530 6959051438 4085902917 5020657974 3074574862 0967626515 1562090146 5130851619 3346603955 4079964297 3390907509 3824704210 8428419700 7877159751 2045934583 3639616051 4243634815 1720679127 9460489230 5740204736 4218238070 9363679546 6833028260 5083392650 9380813660 1803569367 7609899317 3971177648 7923323166 0362658270 4625411080 8280603646 5404864869 1326865238 4851306169 8814907006 3252723092 4090165201
2268 4152530093 7341218174 1420770878 4753421603 9511669459 0067513561 4667561912 5876188195 4734739556 4500363495 4995859577 1632252180 7295796273 5510515512 1167802047 8535856181 1492276802 8017253705 5590247224 1024977404 7311332051 7988088609 4629500114 5363433814 0746788359 7697887403 6314694050 5094112233 5888716278 9748835753 7986777961 0907534756 5104672979 3223050737 6504603154 1483841715 1273963375 0972592927 7886467068 3725062292 0001945831 6561358280 1235035195 6047526996 3613743431 6763579241 2763952339 4350629870 8194376640 0116717095 1335039234 9304290711 8215448696 9570874093 3527643801 2425462515 9018751036 8426582250 6594531415 6074618930 2067176187 3591268295 8877007452 0840150097 6292100226 5762621385 0829122786 9071747099 9817857589 9474951275 3857369872 8675608005 3269320975 4010570386 6876878650 5228417900 7678428823 2910622275 1461181006 6810867837 5885739120 3918664152 2836860477 9365039076 1438355416 2092843145 3157166098 8300042174 4059029892 8324624500 3809243900 4223572515 8033804913 4664826453 3694110559 7559333281
21326521 0923689241 5579744770 8455386715 6493981703 3895815175 2824461406 2248668972 3849074326 9940219297 8330826011 9132624857 5052012940 7637898385 1458228207 3414299542 1012616877 3747611276 2552521573 1992845815 2626240524 3769548419 1783323926 4043506286 0791906768 8909892198 5484735735 6061753209 8262653273 9905159751 0957907204 5892804981 5479876908 6225037550 9630181325 6211899962 7276113042 3505144314 4004450701 5935286793 0248518468 2281561849 6805065980 4068055951 2252415682 9215616517 3382315440 5034093083 4289575359 6892893567 5984082736 1009292932 2230519512 4516347259 4217796599 6905303737 9034315215 3056147317 7343645895 8109128988 1595607273 6305853180 0038869732 0240960296 8872201887 1498467478 0728366221 1958039483 2286137071 5775888253 8006966244 9845294927 3587556176 6301326046 9903837513 2251044826 5559848360 3331282558 9819293789
53821 4164976593 3690112584 5954864364 8627826543 2308020317 9464843115 1832252449 0661934117 3198332871 5321732061 1322827137 4259420917 2093315186 0657953391 1556510177 4138451617 0125236363 3272101063 2768304619 4659907144 9619772725 1670945503 5719496556 6784335908 4688672387 4293477234 5728654113 3953591602 4915941161 4367183082 7881108311 3024100980 0341300201 2098207801 0730698318 6408930782 0422869067 0998620695 5333043223 0648641815 3721430705 8860171849 8085463378 8793619289 0078332798 8706090605 8538915585 8854265578 6407266548 8622509273 1819131066 5377748829 5968347846 8577879283 4910279023 1343836536 0998886943 2375062827 0388789262 2127859402 4214041973 7923649305 7803459144 7996364122 9614208838 1351836023 8722809447 1212444700 2370551552 7941690641 3407684000 7250674564 0292932332 2531655318 6755243173 0455442448 2646064143
627100 5167729023 8817957476 9025832735 0263023557 7283136611 1983910887 6593174251 5598557525 8317330803 0190595691 0571213143 3017892607 1479165519 6295974679 4670040690 8350332394 3897540997 6573931162 3679255764 8658473194 4042823102 8944575982 1835473924 2358037829 1618778230 9576771180 8215465204 1283246150 3407810812 7721556750 2606821201 9087628767 1874682427 3927358523 7017088089 2647193974 0504670335 8259657152 0644504914 4083746952 2307719752 4519750731 1250908153 5049634148 1267254556 4836211995 5798226648 4112714382 9164838462 7560653417 0820644789 6867380881
422890 6759773122 9632749897 7703081104 6089397208 3070003236 1373506481 0131618142 0920387917 2024015550 1914001779 6732521878 8472396995 1866273132 3621119571 4643203106 7668102984 3822493973 6949415649 6272566888 9087715729 6828805027 1975518283
619236 6206542775 1129213836 6945113605 5754396596 0942459199 8624979724 8783642409 6858171469 7334989291 7662971135 6065652551 5669965323 8830665468 7983342351 9480722313
6802862765 5600113263 1513195353 2603898163 0148385775 9856803768 6712985490 3924930402 8901064453 6964070107 8164119111 4027820239 1096665411 2148972817
753 7168092463 0714342493 1477215401 6895559793 7830865350 1931723181 7038401091 7426839981
1821091145 8621554802 3638754841 1844844234 7528631917 4074560471 7962323062 2398695991
7410 5198469710 2731055249 7984885658 2927625411 2893958957 3564648377
263 6443249310 0013879515 4037055348 7674308093 4341575732 1568661943
9197775 3984409116 2523731824 3883482575 3339706857 7452539981
2 7822894938 7576730600 3948376116 8308473603
12684513 0874430429 6049051231 2588220509
39509 9421891823 7892578940 9218797897
5258 7226983977 3113737891 9013924327
4290 0604434348 0387086189 8745861239
3616 6896726883 6900943351 2583127259
172 1555942610 1024587068 8063820021
4 7111776367 8012121731 7898331723
1 9732315426 0178677542 7155576739
94775181 5935213511 5742981941
52804366 1585928418 4165291663
28281595 8543537257 6873143429
6006210 8236693687 3935138007
5753024 7410859648 6842231881
4463933 8402316038 8086328547
1578675 1777631210 3783611589
363398 9114253640 5287279893
30825 3424937729 6486120503
14531 7035090480 8357641541
10472 4312588747 6895989109
583 0471276666 4477016289
562 1808373253 6434709419
182 9761526632 3275579733
46 1519117249 6197646893
3 5712856721 3632855957
3 3339314049 0107126707
2 9707322416 6432207033
1 1624350824 8661972883
8652185175 9668874121
4874260718 2739662099
4182852681 3260198467
2579634522 1427298431
1668058215 7618088641
266981203 4430080233
45107797 6876814587
29681315 8990815853
10267135 5322985833
1011844 2943600993
201600 1583973961
61925 2280309413
35836 1005597057
15454 1093298769
10465 5942683587
3244 5882834751
2798 2079474581
1515 2145846421
1429 8652645201
345 6076622329
207 5584033657
116 8123856789
101 8086567851
88 2081299611
10 6687260109
9 7588180999
6 1543275949
4 4197376287
1 7996926663
8578649773
7941262429
6544263097
4809389047
4184898121
3285451801
2178225967
831659083
756565321
459452197
375011029
66505429
52687207
31987997
27995059
16033361
11905213
11802457
11030251
11023783
8260337
6099391
3349501
3328327
1025137
733321
463303
290737
174637
97021
87473
85009
58537
35911
34129
32257
29569
16633
14851
10837
9613
8443
8317
6469
4159
2971
2113
2003
1867
1117
1013
757
727
463
397
379
271
199
197
127
109
103
73
67
61
43
37
29
23
19
13
72
5
3
24

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

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

Given such a witness, Pocklington's Theorem shows that every prime factor of N ≡ 1 (mod F). As F4>N, N can have no more than three prime factors.

Express N in base F

As 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 has exactly two prime factors if and only if c12-4·c2 is a perfect square.

Here, c12-4·c2 is ≡ 53 (mod 63) and therefore cannot be a square and N does not have exactly two prime factors.

Coppersmith and Howgrave-Graham

We are left with two possibilities for N: either it has exactly three prime factors or it is prime. The non-existence of exactly three factors is demonstrated by the Theorem of Coppersmith and Howgrave-Graham, here performed by a Pari/GP script written by John Renze and David Broadhurst. Here is the stdout:

   realprecision = 14006 significant digits (14000 digits displayed)

Welcome to the CHG primality prover!
------------------------------------

Input file is:  IO\70A7207D.cin
Certificate file is:  IO\70A7207D.chg
Found values of n, F and G.
    Number to be tested has 37090 digits.
    Modulus has 10270 digits.
Modulus is 27.68746492% of n.

NOTICE: This program assumes that n has passed
    a BLS PRP-test with n, F, and G as given.  If
    not, then any results will be invalid!

Square test passed for F >> G.  Using modified right endpoint.

Search for factors congruent to 1.
    Running CHG with h = 10, u = 4. Right endpoint has 6283 digits.
        Done!  Time elapsed:  13328265ms.
    Running CHG with h = 10, u = 4. Right endpoint has 6048 digits.
        Done!  Time elapsed:  25265360ms.
    Running CHG with h = 9, u = 3. Right endpoint has 5796 digits.
        Done!  Time elapsed:  16151047ms.
    Running CHG with h = 9, u = 3. Right endpoint has 5692 digits.
        Done!  Time elapsed:  17369359ms.
    Running CHG with h = 9, u = 3. Right endpoint has 5553 digits.
        Done!  Time elapsed:  18135719ms.
    Running CHG with h = 8, u = 3. Right endpoint has 5376 digits.
        Done!  Time elapsed:  17352187ms.
    Running CHG with h = 8, u = 3. Right endpoint has 5215 digits.
        Done!  Time elapsed:  20907891ms.
    Running CHG with h = 9, u = 3. Right endpoint has 5054 digits.
        Done!  Time elapsed:  37424672ms.
    Running CHG with h = 8, u = 3. Right endpoint has 4712 digits.
        Done!  Time elapsed:  40897234ms.
    Running CHG with h = 7, u = 2. Right endpoint has 4501 digits.
        Done!  Time elapsed:  611766ms.
    Running CHG with h = 7, u = 2. Right endpoint has 4331 digits.
        Done!  Time elapsed:  660594ms.
    Running CHG with h = 7, u = 2. Right endpoint has 4162 digits.
        Done!  Time elapsed:  1267671ms.
    Running CHG with h = 7, u = 2. Right endpoint has 3922 digits.
        Done!  Time elapsed:  1098954ms.
    Running CHG with h = 7, u = 2. Right endpoint has 3562 digits.
        Done!  Time elapsed:  4110000ms.
    Running CHG with h = 7, u = 2. Right endpoint has 3021 digits.
        Done!  Time elapsed:  5429609ms.
    Running CHG with h = 5, u = 1. Right endpoint has 2210 digits.
        Done!  Time elapsed:  338062ms.
    Running CHG with h = 5, u = 1. Right endpoint has 996 digits.
        Done!  Time elapsed:  1058344ms.
A certificate has been saved to the file:  IO\70A7207D.chg

Running David Broadhurst's verifier on the saved certificate...

Testing a PRP called "IO\70A7207D.cin".

Pol[1, 1] with [h, u]=[5, 1] has ratio=6.599080422 E-860 at X, ratio=1.084129774 E-1855 at Y, witness=2.
Pol[2, 1] with [h, u]=[4, 1] has ratio=3.883058889 E-347 at X, ratio=3.614263791 E-1214 at Y, witness=17.
Pol[3, 1] with [h, u]=[7, 2] has ratio=0.632083022 at X, ratio=1.059710357 E-1622 at Y, witness=3.
Pol[4, 1] with [h, u]=[7, 2] has ratio=0.1607431466 at X, ratio=4.602983348 E-1082 at Y, witness=19.
Pol[5, 1] with [h, u]=[7, 2] has ratio=0.3125459556 at X, ratio=1.191239260 E-721 at Y, witness=5.
Pol[6, 1] with [h, u]=[7, 2] has ratio=0.0686159516 at X, ratio=2.130001264 E-481 at Y, witness=3.
Pol[7, 1] with [h, u]=[6, 2] has ratio=0.4690745216 at X, ratio=8.24607494 E-339 at Y, witness=5.
Pol[8, 1] with [h, u]=[6, 2] has ratio=0.594973278 at X, ratio=5.43478190 E-339 at Y, witness=2.
Pol[9, 1] with [h, u]=[8, 3] has ratio=0.001304284580 at X, ratio=5.95298133 E-635 at Y, witness=2.
Pol[10, 1] with [h, u]=[9, 3] has ratio=0.4387104916 at X, ratio=1.342812519 E-1027 at Y, witness=17.
Pol[11, 1] with [h, u]=[8, 3] has ratio=0.605936034 at X, ratio=6.389540706 E-484 at Y, witness=2.
Pol[12, 1] with [h, u]=[8, 3] has ratio=0.1302508875 at X, ratio=7.68536635 E-484 at Y, witness=5.
Pol[13, 1] with [h, u]=[9, 3] has ratio=0.4285375965 at X, ratio=2.700481293 E-529 at Y, witness=3.
Pol[14, 1] with [h, u]=[8, 3] has ratio=3.798221464 E-141 at X, ratio=1.033400749 E-418 at Y, witness=3.
Pol[15, 1] with [h, u]=[8, 3] has ratio=1.609427720 E-105 at X, ratio=2.935790603 E-314 at Y, witness=11.
Pol[16, 1] with [h, u]=[10, 4] has ratio=0.2732920955 at X, ratio=2.970173891 E-1007 at Y, witness=13.
Pol[17, 1] with [h, u]=[10, 4] has ratio=4.773847702 E-236 at X, ratio=4.548211068 E-940 at Y, witness=2.

Validated in 226 sec.


Congratulations! n is prime!
Goodbye!

The actual input file containing N and F and the output certificate are included in this file.