Primality Certificate for (18067^4201-1)/18066

Andy Steward17,879 digits15 May 2002
Originally by A.A.D.Steward 2002

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

From Factorisation
180677 · 29 · 89
Φ22 · 2 · 4517
Φ33 · 31 · 79 · 157 · 283
Φ42 · 5 · 17 · 61 · 31477
Φ511 · 461 · 21012349040471
Φ613 · 37 · 43 · 43 · 367
Φ7421 · 93563 · 882986516111581379
Φ82 · 41 · 241 · 5391545607281
Φ1046441 · 47791 · 48003451
Φ12106547723964670633
Φ14379 · 27595541 · 3325171943113637
Φ15327283741 · 34684855306055444446585861
Φ205 · 401 · 70621 · 87281 · 88681 · 10358331842612441
Φ212689 · 100549 · 1628173 · p37
Φ241657 · 308373964753 · 22217139580760929801
Φ25151 · 3084209592863351 · p68
Φ282381 · 112589 · 113149 · 3077593 · 6649189 · 1948707213895936874248681
Φ30271 · 601 · 69705754263248258176852209271
Φ357351 · 9989296544430458501242081 · p74
Φ4036374881 · 82551401 · 526520372201 · p41
Φ42127 · 30645568463728668550549 · 310802976505780072955571883
Φ50251 · 1151 · 1302226726234062901 · p62
Φ56113 · 953 · 302945998601 · 1791010420572328068873610335898001 · p53
Φ6020101 · 1121264701 · p55
Φ7071 · 211 · 1270361 · 1554841 · 353750270860800521 · 1800183249372442545549401 · p44
Φ755701 · p167
Φ84337 · 11677 · p96
Φ1005 · 101 · 16001 · 44501 · 9515101 · c152
Φ1051238914280127522601 · 1051750499395104702062521 · 3644365326392831886635821557541 · 4133981728683175171550140791210014506921 · 580379111401158902251568262589956954647881 · p51
Φ1201801 · 22921 · 78241 · 131041 · 842161 · 36683401 · 1093964577176177857495437482880241 · 581001823220864141787276953690016481 · p37
Φ14023801 · 394405891601 · 2855042122287181 · c173
Φ1502251 · c167
Φ1681177170172413527217234940513 · 57534655343136903844524349893048433 · p143
Φ175701 · 412651 · c503
Φ200970201 · 1043938001 · c326
Φ2101055251 · 180879185215391794707739442360551 · 1469436942483347018235763934888881 · c133
Φ280281 · 5067135361 · 6337806549318455903161 · c375
Φ3004074100360404301 · 10615454894940965083113901 · p300
Φ35044101 · 9091838704901 · c494
Φ4203451733041 · 7289753521 · 5794968107640181 · 14284991818079779102546926973671301 · p340
Φ5257973605105405407233815612501 · c994
Φ60054393110936737656348606001 · c656
Φ7003712801 · 19222001 · 11188727241491101 · 693561415664294286251101 · c968
Φ8404420081 · c811
Φ10501051 · c1019
Φ1400498401 · 205624661201 · p2027
Φ21004201 · 9963634801 · 3891847609364395801 · 2217771980091064740001 · c1990
Φ420033601 · 663601 · 43974001 · c4069

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

1970821 4624775445 5404716068 7983129587 8518757099 1749405336 9101079732 7743370419 3639076493 8227573055 1208772950 7000498277 0548845766 2901358237 1117836804 4527355372 2823706399 0245849354 3802095185 2867175449 6812182053 5357211419 0734982071 5680440400 5857044510 3351926756 9083288358 5246183722 1370939390 8719169961 0936754486 5317087476 2753956146 1290978841 9035206042 6582259881 4267086074 6763220908 5809586853 6223999623 6861122880 7152536543 3397599261 8851913196 9946896072 1952773393 5801190128 2150673906 7395685872 5796425995 3759093633 0776198985 0540207909 3467482976 0590668514 5459024394 2381059438 6741858850 8679895340 3495778358 2248483179 3813932671 3616126994 3006778086 4384307940 2518652281 1392777831 5897373989 0507380397 2198288626 6392714118 8252427808 4650659722 7686132452 5665090010 8187992674 8346116797 6002745622 3148776276 9632760317 6374443648 7608032533 2422978783 6848399164 9385648580 9068107404 1231732227 2053814930 9271695704 5019680946 8555277222 2368690413 2084878555 3433146369 0766970385 6374079679 1592078635 3128502491 9515800141 8347522123 8680277949 4797117630 8532499144 4708760229 3140067616 4122587268 9855745471 7909531159 3449042967 5194720252 2336242400 8446554846 5060669999 3876402096 1926950895 4289879672 4724519546 6138865731 1210078660 4141120121 3893371121 0633299827 5636586145 7111565853 7805537856 7169535879 9118494659 5837594536 4598401909 4152485709 3640935638 0349034255 8213605763 5207292006 1205153129 8693060364 3552015387 2774814264 7487807932 1677728287 5411143485 7567048225 7349529836 1009380947 7319080724 5701278864 5744249674 0090088813 4115930200 9403424020 4773630044 9352596612 3311724670 3064152125 4274127693 0802514028 1696468484 3558049292 0882520820 3788469698 0771629903 5754520067 5730515863 7254089526 9497545578 8646887640 6931523248 1787942705 2180546519 6026913174 0427191131 7896016144 9016944197 8643805902 9214347623 9670103947 1754625151 9803454608 6200931733 0366470457 2194309689 0294048726 7546900141 6610092008 8360889949 7549194136 7876878607 1006795709 9378595170 2380787006 7678288259 9117713400 4253082105 5001230514 4958243315 0565661060 7068452705 6896349872 6725918766 8681475532 9604889953 1413037041 6940515601
2199779679 8953930973 7707519667 7028299030 9281782157 3950258582 8393231663 4845971160 9553631879 9706011657 3230357852 3297260874 3942493629 0782636805 9383786475 1029426130 4871437871 6943981201 1954784571 1063733452 5653190527 1584009231 6640741214 1819922552 3518946640 8042409327 3475790305 6224695982 0992764692 8426702763 4634629865 2007448181 9113145480 7888576601
8220783902 9916258496 5238650390 6702320002 5165882172 0454594609 8657565323 2445569610 2352705555 9024541447 1545044802 1947551919 5874707791 6177075278 1878277981 8453896217 7959875002 5262072059 3488692685 8830693909 6208325236 5307578766 2209189105 2242453021 1825584967 0171461388 4788907532 4220733056 9611170428 7656311001
3307430 6090701461 9330681393 7711769570 8393073093 8660490430 5498075978 6327391009 6591546347 0930171359 6691244636 1195407258 1394507349 0668322056 4244881929 5704590208 1061718301
316 0540600778 8798836237 0677764106 1456518478 4675854671 1785682746 1556188397 4534681886 3751337981 7305042030 2470641497 9691989109 0805317708 7779522449
371795 2950778033 7374658810 9404704852 4011172999 3998683373 1747248995 6834047049 4216513687 8476519189
1992 3227866087 8814133083 2731167682 0988758859 1922831477 0175727296 6512660791
29484927 2291106610 3891758462 5350428553 4794310728 6017907232 4711760201
36 4993593569 6667502632 3179704054 4376433030 1583282830 7896894101
57180 8886586303 8682434146 0006043052 4219907927 1778006641
250 3977326339 2228178037 8159794701 3137444613 0475190449
1 8788753112 4238633610 7224964705 5982183950 7379252221
7764 6461477058 8356940395 9127945179 9591613101
58 0379111401 1589022515 6826258995 6954647881
8 1514619172 6509166979 3798783064 1101920561
4133981728 6831751715 5014079121 0014506921
2747510 6816616560 3879286393 5151363193
1998568 7247184400 7718689544 9997394601
581001 8232208641 4178727695 3690016481
57534 6553431369 0384452434 9893048433
14284 9918180797 7910254692 6973671301
1791 0104205723 2806887361 0335898001
1469 4369424833 4701823576 3934888881
1093 9645771761 7785749543 7482880241
180 8791852153 9179470773 9442360551
3 6443653263 9283188663 5821557541
697057542 6324825817 6852209271
79736051 0540540723 3815612501
11771701 7241352721 7234940513
3108029 7650578007 2955571883
543931 1093673765 6348606001
346848 5530605544 4446585861
106154 5489494096 5083113901
99892 9654443045 8501242081
19487 0721389593 6874248681
18001 8324937244 2545549401
10517 5049939510 4702062521
6935 6141566429 4286251101
306 4556846372 8668550549
63 3780654931 8455903161
22 1777198009 1064740001
2221713958 0760929801
389184760 9364395801
130222672 6234062901
123891428 0127522601
88298651 6111581379
35375027 0860800521
10654772 3964670633
1118872 7241491101
1035833 1842612441
579496 8107640181
407410 0360404301
332517 1943113637
308420 9592863351
285504 2122287181
2101 2349040471
909 1838704901
539 1545607281
52 6520372201
39 4405891601
30 8373964753
30 2945998601
20 5624661201
9963634801
7289753521
5067135361
3451733041
1121264701
1043938001
327283741
82551401
48003451
43974001
36683401
36374881
27595541
19222001
9515101
6649189
4420081
3712801
3077593
1628173
1554841
1270361
1055251
970201
842161
663601
498401
412651
131041
113149
112589
100549
93563
88681
87281
78241
70621
47791
46441
44501
44101
33601
31477
23801
22921
20101
16001
11677
7351
5701
4517
4201
2689
2381
2251
1801
1657
1151
1051
953
701
601
461
421
401
379
367
337
283
281
271
251
241
211
157
151
127
113
101
89
79
71
61
432
41
37
31
29
17
13
11
7
53
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) = 28.267544%

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

Here, c12-4·c2 is ≡ 21 (mod 64) and therefore cannot be a square and this stage of the proof is passed.

Here, c12-4·c2 is not a square: Its root s is 2995 4817311629 7199481064 9839054022 7132558562 8481949168 4522540256 2914190296 8725695908 1836722301 1985128482 2959409417 1221410946 2071497712 0620421171 4827720029 4459741348 9215925388 4366337786 7963864790 2402470906 7038736600 4537201432 7946684230 4628079245 5379016084 5328151514 3221050119 3171038373 2013597201 1798250222 8351017552 1530212849 8251468336 2204114885 9595884158 4028758641 9497135328 8125058321 9404414384 7594012474 2506377751 9078590233 2709588906 6540065503 9402210263 4868270646 0131534313 2325554815 3422842719 3652908375 2257716693 2877485766 2616895192 7072052976 9929619031 4480809026 2131631234 1862058308 1972556451 4183961742 4346823747 3678436942 0606731394 8692777802 6658551876 4350834506 0794427395 0817026563 2720925411 9069564318 3519651477 8755510674 8718098925 3714936657 6791438795 9171459869 5159150650 0641020369 8506775424 6955831185 6206875096 7143940122 5908438617 2068435638 4856643958 2669298324 5005431392 9241668967 0258813677 7767191813 2040711148 9479394780 0082422687 2395978861 6603833845 1872562858 7121865718 3975393543 0526171669 0016301445 0324371669 8392508900 7099127910 7986437047 2152114731 2992265674 9672119548 7935978470 2656791825 2893416153 2985924394 6157267712 5124718832 5149529688 9079620722 1924684133 0714721042 0183199931 9026916789 1466773945 2164840992 4152901113 6328110949 4678207678 0604552848 7789500910 7530937350 9827973537 1973319405 0096191424 2246411290 8900984318 0550363323 7611115085 4100375799 5034542571 0735147905 2264942345 1616542404 1848276162 6484081609 7575602565 2808620350 6623996006 7270369888 0582825724 3106673219 7139166139 0731543738 4648875950 9549132018 1262704558 3190673288 6195592456 1246617650 2422833394 6337191546 7713337363 0941605529 4877086790 5248838563 6664759246 7301184057 8802283427 8504749110 8871440427 4184470299 4296541360 1478498271 6036271177 9698706857 9735259789 9330811515 1159143373 9261521043 7101097542 1127270955 7851009959 1503347430 7136082988 1180636012 8044518175 0991353586 3758230066 8480591406 8616645655 5458152703 4952081711 3995102394 2238686584 9382979420 3550173937 8598660484 7484205754 5762777539 3919982681 0155882473 4081517427 1128769269 5673735937 3043583800 5866497864 0019780992 2114004943 9239680984 4588774136 7040316709 8576814761 8279706723 4524305168 2405738851 6286811027 9739571698 5377227036 3755680129 9343896638 5993285053 9790020112 7812211985 3857423685 4731130641 9908915859 1361097115 2959287908 2422861093 3099262297 3046412413 4639692782 9243630217 7228832938 5539601527 7263412814 6471853281 5576608935 8873303936 0902212562 8901582754 0698144655 3509477806 9010100770 2502122819 9062205129 4065253066 7342834766 1105024129 2856471892 4246631571 0484981984 6563985754 4384299888 0693936338 1837735752 9237296511 7750805274 7185446156 6547038650 2020960186 9788578140 0195611829 8699308319 0766436101 8855384822 8319457158 2287560558 8415731338 1677233826 2012273082 9170796233 8749398753 8343586740 3041952343 4960471406 7286239687 2983570874 6685534314 9015363302 7004793978 3358843082 3683965799 7885325978 2770943256 4473173513 6797976867 4832401376 9003743604 3395531420 5820083860 7861351811 8690110528 1263931941 4225593625 7527472952 5440041161 0194139045 5608258372 8739258750 5971035089 7645570981 9184182722 3877759344 7664469084 5889370511 7481970933 0384959524 0276544526 2264538648 8153697573 2191105676 7998266893 2534336060 1153484192 2563916100 5227133925 2421692353 0244453250 9513697310 1820484715 9825884955 7094792521 7245474678 6948218372 3479930611 4909817997 7156272997 7106660736 9695650365 7548817104 2652642754 9886934145 0831851212 4932182142 8928076158 8844679344 3455342466 4435933411 8294192563 5636206369 1402558774 6283632597 0769060951 4840256119 5855481191 9717845586 1140224092 4663348736 1021878929 9928494261 3671008746 1115053669 9523757625 0084573152 5146594613 0298507725 1655927360 3180418125 4367834386 3217988848 8867413410 9911897599 9854789640 7481718617 5002849479 5829123805 4424080151 5653465365 2381567455 5588305086 2896524985 5717494245 2908386922 4331440673 2129925266 7204993562 7655232880 2865804505 3988413364 8832346074 5267179921 9080046780 1172790469 7888082048 5356067460 9692418681 6444016069 9643410388 0869707450 1969863947 5974343247 9670207964 6997476322 8781209965 3615811457 3662397163 7745936904 6654328244 3382453463 1194298513 1497612917 0078163878 9307476882 6964269032 0998058659 5568614334 2688492338 8266153269 6350215179 1868899054 5140164634 8242491548 4460890095 9778197761 5061456252 6042927162 4848161620 0799381582 3924568090 8426641299 6764147754 4165380835 8809005625 9722337354 1413784011 9283995333 0722547592 7511261168 3960500820 8883946325 0047501612 5905669373 4292343353 1640569837 3803626016 9358821080 8628521898 0527664917 0305376989 7396434925 6669757690 2078831773 5545439455 4926387947 8408463819 9077384865 4866455527 2426147642 3107637684 7328139174 8427347511 4863562193 1066653850 5354962476 7744550528 8941084168 5746600698 1767056692 9200518153 9895646366 8318720070 0569384444 7947889329 5576353156 1118152768 3358273143 6986392243 0182193210 9331223253 1906446800 1048962679 5638090109 0902863788 8672632134 8364883365 1900147383 9968880263 5904780951 6544102264 1181732781 0343794505 1539054881 5026774868 8885281836 7674123710 1211709229 8396308733 0483205911 2808709488 3668883322 4021381149 0639486937 6944325160 0622194254 0412946587 9576721228 3148382629 1907531276 4645385154 3731346029 5860012035 2710665678 6874960799 9556481067 1296589683 0242090270 5810885627 0798974088

It can be verified that s2 < c12-4·c2 < (s+1)2 and therefore this stage of the proof is passed.

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 = 7003 significant digits (7000 digits displayed)

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

Input file is:  IO\46931069.cin
Certificate file is:  IO\46931069.chg
Found values of n, F and G.
    Number to be tested has 17879 digits.
    Modulus has 5054 digits.
Modulus is 28.26754434% 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 = 8, u = 3. Right endpoint has 2718 digits.
        Done!  Time elapsed:  2926219ms.
    Running CHG with h = 8, u = 3. Right endpoint has 2568 digits.
        Done!  Time elapsed:  3658453ms.
    Running CHG with h = 7, u = 2. Right endpoint has 2382 digits.
        Done!  Time elapsed:  185641ms.
    Running CHG with h = 7, u = 2. Right endpoint has 2328 digits.
        Done!  Time elapsed:  191625ms.
    Running CHG with h = 7, u = 2. Right endpoint has 2247 digits.
        Done!  Time elapsed:  179734ms.
    Running CHG with h = 7, u = 2. Right endpoint has 2126 digits.
        Done!  Time elapsed:  183813ms.
    Running CHG with h = 6, u = 2. Right endpoint has 1945 digits.
        Done!  Time elapsed:  135172ms.
    Running CHG with h = 6, u = 2. Right endpoint has 1750 digits.
        Done!  Time elapsed:  106953ms.
    Running CHG with h = 6, u = 2. Right endpoint has 1554 digits.
        Done!  Time elapsed:  88265ms.
    Running CHG with h = 5, u = 1. Right endpoint has 1359 digits.
        Done!  Time elapsed:  53422ms.
    Running CHG with h = 5, u = 1. Right endpoint has 1032 digits.
        Done!  Time elapsed:  60844ms.
    Running CHG with h = 5, u = 1. Right endpoint has 379 digits.
        Done!  Time elapsed:  124641ms.
A certificate has been saved to the file:  IO\46931069.chg

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

Testing a PRP called "IO\46931069.cin".

Pol[1, 1] with [h, u]=[5, 1] has ratio=4.882389688 E-722 at X, ratio=4.39820814 E-1100 at Y, witness=3.
Pol[2, 1] with [h, u]=[4, 1] has ratio=3.865063003 E-378 at X, ratio=1.240557869 E-653 at Y, witness=2.
Pol[3, 1] with [h, u]=[4, 1] has ratio=1.187693657 E-327 at X, ratio=2.691465580 E-327 at Y, witness=2.
Pol[4, 1] with [h, u]=[6, 2] has ratio=0.0919194979 at X, ratio=5.80826488 E-392 at Y, witness=3.
Pol[5, 1] with [h, u]=[6, 2] has ratio=0.2656821240 at X, ratio=1.246345465 E-391 at Y, witness=3.
Pol[6, 1] with [h, u]=[6, 2] has ratio=0.812812234 at X, ratio=1.010256626 E-391 at Y, witness=2.
Pol[7, 1] with [h, u]=[6, 2] has ratio=1.295427841 E-142 at X, ratio=2.090454151 E-363 at Y, witness=5.
Pol[8, 1] with [h, u]=[6, 2] has ratio=7.53270269 E-122 at X, ratio=1.069300915 E-242 at Y, witness=2.
Pol[9, 1] with [h, u]=[6, 2] has ratio=5.232373766 E-82 at X, ratio=4.83122557 E-162 at Y, witness=2.
Pol[10, 1] with [h, u]=[6, 2] has ratio=6.396694380 E-55 at X, ratio=4.513488208 E-108 at Y, witness=2.
Pol[11, 1] with [h, u]=[8, 3] has ratio=0.3057695845 at X, ratio=1.829528558 E-559 at Y, witness=3.
Pol[12, 1] with [h, u]=[8, 3] has ratio=7.20998576 E-151 at X, ratio=1.525922097 E-450 at Y, witness=7.

Validated in 19 sec.


Congratulations! n is prime!

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