Primality Certificate for (8185^3673-1)/8184

Andy Steward14,369 digits25 April 2008
Originally by A.A.D.Steward 2003

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

From Factorisation
81855 · 1637
Φ22 · 4093
Φ33 · 7 · 3190591
Φ42 · 13 · 53 · 61 · 797
Φ673 · 917617
Φ82 · 17 · 342073 · 385901993
Φ93 · 29917 · 3350215983987157501
Φ1237 · 121303408550173
Φ17409 · 253035379 · p52
Φ1819 · 9680023 · 1634865813078373
Φ2413513 · 68440129 · 21781454324352713113
Φ273 · 1324513 · 1649161 · 55729798093 · 100464424357403813130199 · 740962112523044850034867
Φ342680171615909477 · p48
Φ364177 · 25633 · 59473 · 12359229068881 · 1148812267139037472897
Φ5113366693 · p119
Φ5418253 · 29269 · 305008147 · 258564584269 · 130190301940519 · 4956042887024505625402347529
Φ6818990592042453 · 54946657007147351569 · p93
Φ7247737 · 12393649 · 7495187977 · p73
Φ102103 · 1531 · 9181 · 194703960815071308607 · 161204850258047082120778516892979704263 · p58
Φ108109 · 541 · 5602393 · 15692823875340901 · 306595826417246792072918608972081 · p81
Φ13617 · 137 · 2866609 · 496076934610793 · 4443870478184790097 · p208
Φ153988939660537 · c364
Φ204613 · 806821 · 854288557 · c233
Φ216753574787857 · 28138253946769 · c257
Φ306307 · 26333761771 · 1845781715257687 · 29235998567593682685109006687 · p320
Φ40838949391153 · 260715243186345529 · 9290714871417342127129 · c451
Φ459919 · 632503 · 52670251 · 5347103357137109879523200419 · c1083
Φ6123061 · 6121 · 1033354260649 · c733
Φ9183673 · 8263 · c1120
Φ122415913 · 41617 · 99690604369129 · 182703031645609 · c1466
Φ1836655033397509 · p2243
Φ3672370873 · 240846481 · 3677709961 · c4485

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

120 9200715117 1994373313 7371231128 1019128797 5197119111 7842413961 1895664191 7468748588 2985310552 0791666955 6171650735 5584583225 6942419552 9291023884 6911643796 9541312908 7997727383 5975886699 1520520901 1104601536 0579460550 4009240377 5385096081 7318050746 3552238500 4117673282 3532614536 5027919076 4339900435 0452315196 2323138716 0615910362 0500923352 1056576824 4313895413 5665746242 6849401756 4705751798 8598921376 5289423570 9706381204 9712680021 8733145683 7681744002 2836279577 5802658279 2714978597 5028093136 0564405937 9104687670 6644672886 2220381952 0293282587 2227474305 6427843944 9317342954 4136998631 8257391355 9686745918 4425684284 5240670841 8589055954 8014541623 1776532701 1011581451 6455268758 2438876324 4030160490 5740332306 8464150684 0192942582 4224643249 6323520454 8491031710 0666829938 8683585740 6997834885 9342839923 2001037493 8803130517 0894749908 2376055147 0805679638 8319040100 8529360343 5550338736 5934210952 9062639758 5764609759 1481675747 9996202914 8618857295 3104927523 0779173415 1033784755 9395652064 4124628353 6670975405 0594420508 4304091909 1607589172 1433584142 4746414507 8160028016 0896352052 9908931189 7434687088 9624018078 8085957857 4411147944 0654941543 7660288036 8418850572 9593881803 8948552823 8992924191 2133798315 3597131262 0950898366 5968774074 0847780281 4077902054 0664083249 7576508430 5253116044 1166258348 9541882976 6663872092 0206990553 1192692291 3144976783 1756753092 2212161558 7062770125 7113907168 9570569099 5678455370 7505143970 4959828362 3052790764 3790294379 0778196924 8717713407 9569734553 6152125781 9805775914 6234179778 7319835807 2013404790 1409127587 8331908812 2792248790 1646357343 8389526595 8990999320 0429607395 4396656103 0529327813 4076848688 1498877244 5750366135 7476136070 3718723909 9101540871 6500123681 0499347602 5076955369 8877749914 7636147419 6459646551 0890313619 1466916164 9630601894 0546997687 8683312746 5217468673 1970706574 8551893017 0816073435 0905526618 8127195644 5550554299 0016513755 3165555787 6066342043 2510259163 0841768661 2439655232 7768790292 2753763281 0709961936 4255050254 2412476377 6828073623 2611697462 9946789054 8924865169 3732403826 7653376858 8485256448 3219161139 5524063228 4820453605 9676273266 0602808105 3304183415 4818589308 3650929356 7711559995 1233696447 4010246297 0749296319 6150307685 3617363804 9225673261 7145786731 1624145859 9442491276 1160416034 6316020141 7861616424 9923927988 4977581885 2384541389
1023396884 5606064831 1930087125 2589156700 0102776277 3570086267 4761929499 0548372294 6126571810 1511284260 8764316694 7008790242 6713695833 9382151952 1856929733 2039832567 4601868216 5191559427 3091302130 5012422872 2364088811 9211425200 7583159962 3479969035 9517959183 6114006008 0511370391 8442345332 6614900382 6228521707 9197269708 8642121257
18422449 8999687602 0686589933 5849487034 0285145002 6705419038 2800865246 9319143767 8677665838 2029992897 3159240641 9532190772 1180308491 2656038541 1237845291 2081925619 4192589140 1000932762 6842966302 8770830047 6598057921
123174510 0323423471 1340278077 9843054400 2405753631 8898150956 7507884960 8875328143 7580248678 5118533832 0427731833 8748510637
157 8040315674 3108311278 3441358922 3113387665 0324094258 4886159299 1127651547 1640062507 8163906093
4 6495180918 3256331651 9007555765 4918429310 7821213903 0576541308 0999240664 6449620413
184 3365969655 3710779688 8064659985 0128828903 0771426765 6758486530 1738609201
36240621 9943462215 4166049159 9220688242 6366221391 7609552737
39 2145690996 2509881613 0380995781 9467680326 0918695651
15138515 1526831115 7621919845 2737540425 8082469933
161204850 2580470821 2077851689 2979704263
306 5958264172 4679207291 8608972081
292359985 6759368268 5109006687
53471033 5713710987 9523200419
49560428 8702450562 5402347529
7409 6211252304 4850034867
1004 6442435740 3813130199
92 9071487141 7342127129
11 4881226713 9037472897
1 9470396081 5071308607
5494665700 7147351569
2178145432 4352713113
444387047 8184790097
335021598 3987157501
26071524 3186345529
1569282 3875340901
268017 1615909477
184578 1715257687
163486 5813078373
49607 6934610793
18270 3031645609
13019 0301940519
12130 3408550173
9969 0604369129
2813 8253946769
1899 0592042453
1235 9229068881
103 3354260649
98 8939660537
75 3574787857
65 5033397509
25 8564584269
5 5729798093
3 8949391153
2 6333761771
7495187977
3677709961
854288557
385901993
305008147
253035379
240846481
68440129
52670251
13366693
12393649
9680023
5602393
3190591
2866609
1649161
1324513
917617
806821
632503
370873
342073
59473
47737
41617
29917
29269
25633
18253
15913
13513
9181
8263
6121
4177
4093
3673
3061
1637
1531
919
797
613
541
409
307
137
109
103
73
61
53
37
19
172
13
7
5
33
23

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

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 = 319 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 ≡ 29 (mod 64) and therefore cannot be a square and 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 = 5009 significant digits (5000 digits displayed)

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

Input file is:  IO\1FF90E59.cin
Certificate file is:  IO\1FF90E59.chg
Found values of n, F and G.
    Number to be tested has 14369 digits.
    Modulus has 4181 digits.
Modulus is 29.09695310% 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 = 6, u = 2. Right endpoint has 1827 digits.
        Done!  Time elapsed:  246609ms.
    Running CHG with h = 6, u = 2. Right endpoint has 1669 digits.
        Done!  Time elapsed:  248031ms.
    Running CHG with h = 6, u = 2. Right endpoint has 1431 digits.
        Done!  Time elapsed:  276828ms.
    Running CHG with h = 5, u = 1. Right endpoint has 1143 digits.
        Done!  Time elapsed:  14282ms.
    Running CHG with h = 5, u = 1. Right endpoint has 892 digits.
        Done!  Time elapsed:  100843ms.
    Running CHG with h = 5, u = 1. Right endpoint has 390 digits.
        Done!  Time elapsed:  87922ms.
A certificate has been saved to the file:  IO\1FF90E59.chg

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

Testing a PRP called "IO\1FF90E59.cin".

Pol[1, 1] with [h, u]=[5, 1] has ratio=2.606943692 E-529 at X, ratio=1.908445789 E-918 at Y, witness=7.
Pol[2, 1] with [h, u]=[4, 1] has ratio=1.665425427 E-503 at X, ratio=5.735074794 E-503 at Y, witness=5.
Pol[3, 1] with [h, u]=[4, 1] has ratio=7.78204974 E-252 at X, ratio=8.73750917 E-252 at Y, witness=2.
Pol[4, 1] with [h, u]=[6, 2] has ratio=0.0905400123 at X, ratio=4.108413976 E-577 at Y, witness=2.
Pol[5, 1] with [h, u]=[6, 2] has ratio=2.696198515 E-238 at X, ratio=1.395026494 E-475 at Y, witness=13.
Pol[6, 1] with [h, u]=[6, 2] has ratio=9.18657576 E-160 at X, ratio=2.613637053 E-317 at Y, witness=3.

Validated in 4 sec.


Congratulations! n is prime!

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