Primality Certificate for (8871^2341-1)/8870

Andy Steward9,239 digits13 February 2010
Originally by A.A.D.Steward 2010

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

From Factorisation
88713 · 2957
Φ22 · 2 · 2 · 1109
Φ37 · 31 · 79 · 4591
Φ42 · 13 · 3026717
Φ55 · 11 · 101 · 1471 · 27481 · 27581
Φ6127 · 619573
Φ919 · 49663 · 516474547743307789
Φ1070061 · 88382245481
Φ126192846443424241
Φ131223 · 47087 · 3163196999 · 789990752071 · 1650608907546181337
Φ151801 · 278881 · 851410291 · 89672677938211
Φ1837 · 937 · 143872471 · 97704925489
Φ20p32
Φ26p48
Φ30151 · 4231 · 19531 · 983223601 · 3126315764371
Φ3673 · 3673 · 11593 · 244873 · 4302073 · 592290037 · 122455479118826341
Φ39131899 · 252608227 · 40415478871 · p71
Φ45p95
Φ5213 · 53 · 157 · 1613 · 4057 · 140401 · 518129 · 504758123285589207373 · p52
Φ6061 · p62
Φ65131 · 2341 · 66431 · p180
Φ7879369126235101 · 44283443381352631 · p65
Φ90271 · 16651 · 6714080501941 · p76
Φ1176968554262983 · c272
Φ130911 · 7151 · 16658981 · 254029885022412813098244851 · p150
Φ156313 · 1249 · 5447644021 · 14815713604849 · 298555851306337 · 18120856655034320943515293 · c122
Φ180181 · 354421 · 2972881 · 1809290353141 · 19699267774141 · 29504149347061261 · p134
Φ195491551981545337831 · c362
Φ234907191793 · 96645444013 · c265
Φ26077857362181 · 8484430117842221141 · c350
Φ39024251371 · 620361896054083249166000941 · c345
Φ46812637 · 36933157 · 21235149937 · 15591567329677 · c534
Φ5851171 · c1134
Φ78016910401 · 56685674761 · 10299962241081107401 · 179049712822245341701 · p701
Φ11706410025575703358188095881 · c1113
Φ2340577981 · c2269

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

5 7982738277 6691852853 8955640644 5577572977 6423280296 7152203644 6066648893 2549545397 2001921758 8987303245 2535393988 3804930083 8600648913 5287427622 0537800098 8043942846 3581579075 5509773555 0625149287 4839222329 7396066555 6024966844 3206340014 7199054581 4063990311 3240869884 8606627188 0136633006 5914655058 0186524378 9243832098 4579058512 5203275293 2826132594 6628137343 6221850521 0484543453 0942415827 0332674781 6855539142 8006392366 4158125996 3103240413 3608292023 9710841271 7665878275 3376085679 7545392768 6486473288 7406450249 4323174287 1459026744 0172879062 2461756833 7280936163 7441993708 4844990924 8729371868 8540235345 2995958163 7641573849 4564595144 1073226562 7988495507 5642673395 6415152763 7230457325 9552866060 8483543375 7148220861
1561677470 5279837209 8145591816 5224216806 6079441710 7807180253 4339051303 4767817188 3273954350 6495662854 9567913713 4620327502 8148792085 2864515834 6396704933 5803126886 2683578565 7295823281
1154288471 5420222692 7810206536 2114626689 2779738721 9743881635 2973990819 4247117987 4325881214 1155129427 7880296350 3480638455 3259673714 1462984591 5097954591
1586 5976545761 2197903522 2563474633 4168215533 6178490356 0642241290 4133873632 6786592213 2308213039 0696210789 1964342958 2718607896 2701494461
56408 1558910375 7146952273 9961952901 1855452799 7578195236 6868162505 4006140679 1088296367 8256724641
186185 4531285000 8582165151 0512675278 8367991030 6239262861 9307843339 3806996281
4 1884778193 2520308171 4897698523 8160392727 7428122478 6993859180 9484933527
16050 8439801678 9357669538 9322593903 4182637039 1686553136 2125717011
24 1119002569 7705373397 5255795751 6631765183 6959750586 3619820501
21 7016236800 1584929635 2141672822 7982821057 3719627461
23747724 2303947599 1594014167 8514337390 2207446621
38 3513475591 7609242538 0440499681
6203618 9605408324 9166000941
2540298 8502241281 3098244851
181208 5665503432 0943515293
64100 2557570335 8188095881
5 0475812328 5589207373
1 7904971282 2245341701
1029996224 1081107401
848443011 7842221141
165060890 7546181337
51647454 7743307789
49155198 1545337831
12245547 9118826341
4428344 3381352631
2950414 9347061261
619284 6443424241
29855 5851306337
8967 2677938211
7936 9126235101
1969 9267774141
1559 1567329677
1481 5713604849
696 8554262983
671 4080501941
312 6315764371
180 9290353141
78 9990752071
9 7704925489
9 6645444013
8 8382245481
7 7857362181
5 6685674761
4 0415478871
2 1235149937
5447644021
3163196999
983223601
907191793
851410291
592290037
252608227
143872471
36933157
24251371
16910401
16658981
4302073
3026717
2972881
619573
577981
518129
354421
278881
244873
140401
131899
70061
66431
49663
47087
27581
27481
19531
16651
12637
11593
7151
4591
4231
4057
3673
2957
2341
1801
1613
1471
1249
1223
1171
1109
937
911
313
271
181
157
151
131
127
101
79
73
61
53
37
31
19
132
11
7
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) = 26.825302%

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 = 17 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 ≡ 56 (mod 63) 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 = 3756 significant digits (3750 digits displayed)

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

Input file is:  IO\22A70925.cin
Certificate file is:  IO\22A70925.chg
Found values of n, F and G.
    Number to be tested has 9239 digits.
    Modulus has 2479 digits.
Modulus is 26.82530219% 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 = 14, u = 6. Right endpoint has 1804 digits.
        Done!  Time elapsed:  3726063ms.
    Running CHG with h = 14, u = 6. Right endpoint has 1785 digits.
        Done!  Time elapsed:  3752859ms.
    Running CHG with h = 14, u = 6. Right endpoint has 1762 digits.
        Done!  Time elapsed:  4555469ms.
    Running CHG with h = 14, u = 6. Right endpoint has 1740 digits.
        Done!  Time elapsed:  5719391ms.
    Running CHG with h = 14, u = 6. Right endpoint has 1716 digits.
        Done!  Time elapsed:  6874453ms.
    Running CHG with h = 14, u = 6. Right endpoint has 1690 digits.
        Done!  Time elapsed:  7541234ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1663 digits.
        Done!  Time elapsed:  1089469ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1649 digits.
        Done!  Time elapsed:  1084578ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1632 digits.
        Done!  Time elapsed:  1093750ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1613 digits.
        Done!  Time elapsed:  3611734ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1589 digits.
        Done!  Time elapsed:  1810625ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1561 digits.
        Done!  Time elapsed:  1049000ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1526 digits.
        Done!  Time elapsed:  3327547ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1485 digits.
        Done!  Time elapsed:  357375ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1478 digits.
        Done!  Time elapsed:  1133547ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1469 digits.
        Done!  Time elapsed:  1176313ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1458 digits.
        Done!  Time elapsed:  1229234ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1444 digits.
        Done!  Time elapsed:  1276297ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1426 digits.
        Done!  Time elapsed:  1334890ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1404 digits.
        Done!  Time elapsed:  1435860ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1376 digits.
        Done!  Time elapsed:  1496219ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1342 digits.
        Done!  Time elapsed:  1632781ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1298 digits.
        Done!  Time elapsed:  1877359ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1244 digits.
        Done!  Time elapsed:  265688ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1234 digits.
        Done!  Time elapsed:  244093ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1220 digits.
        Done!  Time elapsed:  238391ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1201 digits.
        Done!  Time elapsed:  243203ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1177 digits.
        Done!  Time elapsed:  234031ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1144 digits.
        Done!  Time elapsed:  265219ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1100 digits.
        Done!  Time elapsed:  269719ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1041 digits.
        Done!  Time elapsed:  269375ms.
    Running CHG with h = 7, u = 2. Right endpoint has 961 digits.
        Done!  Time elapsed:  58406ms.
    Running CHG with h = 7, u = 2. Right endpoint has 942 digits.
        Done!  Time elapsed:  59610ms.
    Running CHG with h = 7, u = 2. Right endpoint has 915 digits.
        Done!  Time elapsed:  61593ms.
    Running CHG with h = 7, u = 2. Right endpoint has 874 digits.
        Done!  Time elapsed:  74969ms.
    Running CHG with h = 7, u = 2. Right endpoint has 812 digits.
        Done!  Time elapsed:  89109ms.
    Running CHG with h = 7, u = 2. Right endpoint has 719 digits.
        Done!  Time elapsed:  60391ms.
    Running CHG with h = 5, u = 1. Right endpoint has 580 digits.
        Done!  Time elapsed:  7922ms.
    Running CHG with h = 5, u = 1. Right endpoint has 355 digits.
        Done!  Time elapsed:  7328ms.
    Running CHG with h = 5, u = 1. Right endpoint has 80 digits.
        Done!  Time elapsed:  12500ms.
A certificate has been saved to the file:  IO\22A70925.chg

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

Testing a PRP called "IO\22A70925.cin".

Pol[1, 1] with [h, u]=[5, 1] has ratio=5.986261358 E-472 at X, ratio=2.626323055 E-551 at Y, witness=17.
Pol[2, 1] with [h, u]=[5, 1] has ratio=0.590388665 at X, ratio=6.570953930 E-276 at Y, witness=5.
Pol[3, 1] with [h, u]=[4, 1] has ratio=0.03990545929 at X, ratio=2.268929061 E-225 at Y, witness=11.
Pol[4, 1] with [h, u]=[7, 2] has ratio=0.02029928351 at X, ratio=8.90322470 E-279 at Y, witness=3.
Pol[5, 1] with [h, u]=[7, 2] has ratio=0.2750253449 at X, ratio=4.049880353 E-186 at Y, witness=2.
Pol[6, 1] with [h, u]=[7, 2] has ratio=0.696391160 at X, ratio=2.206838917 E-124 at Y, witness=3.
Pol[7, 1] with [h, u]=[7, 2] has ratio=0.525486328 at X, ratio=3.562509997 E-83 at Y, witness=2.
Pol[8, 1] with [h, u]=[7, 2] has ratio=0.4041042497 at X, ratio=1.372747105 E-55 at Y, witness=3.
Pol[9, 1] with [h, u]=[7, 2] has ratio=0.4832654296 at X, ratio=2.101134722 E-37 at Y, witness=17.
Pol[10, 1] with [h, u]=[9, 3] has ratio=2.626385664 E-81 at X, ratio=1.762084604 E-241 at Y, witness=2.
Pol[11, 1] with [h, u]=[9, 3] has ratio=0.513253478 at X, ratio=7.711781374 E-177 at Y, witness=7.
Pol[12, 1] with [h, u]=[9, 3] has ratio=0.3220345220 at X, ratio=7.44832139 E-133 at Y, witness=2.
Pol[13, 1] with [h, u]=[9, 3] has ratio=0.2797826764 at X, ratio=7.50216203 E-100 at Y, witness=2.
Pol[14, 1] with [h, u]=[9, 3] has ratio=0.1836378314 at X, ratio=5.22158306 E-75 at Y, witness=7.
Pol[15, 1] with [h, u]=[9, 3] has ratio=0.2386839153 at X, ratio=2.075807580 E-56 at Y, witness=11.
Pol[16, 1] with [h, u]=[9, 3] has ratio=0.2581303980 at X, ratio=1.155602649 E-42 at Y, witness=3.
Pol[17, 1] with [h, u]=[9, 3] has ratio=0.0704401952 at X, ratio=4.319548140 E-32 at Y, witness=3.
Pol[18, 1] with [h, u]=[11, 4] has ratio=0.812470600 at X, ratio=1.453392773 E-216 at Y, witness=2.
Pol[19, 1] with [h, u]=[11, 4] has ratio=0.0698782975 at X, ratio=1.792982424 E-173 at Y, witness=3.
Pol[20, 1] with [h, u]=[11, 4] has ratio=0.0845267486 at X, ratio=7.06441783 E-139 at Y, witness=7.
Pol[21, 1] with [h, u]=[11, 4] has ratio=0.2926678755 at X, ratio=2.427775644 E-111 at Y, witness=17.
Pol[22, 1] with [h, u]=[11, 4] has ratio=0.3467680011 at X, ratio=3.984236653 E-89 at Y, witness=3.
Pol[23, 1] with [h, u]=[11, 4] has ratio=0.1703745647 at X, ratio=1.833695726 E-71 at Y, witness=17.
Pol[24, 1] with [h, u]=[11, 4] has ratio=0.3115878831 at X, ratio=2.655939306 E-57 at Y, witness=5.
Pol[25, 1] with [h, u]=[11, 4] has ratio=0.1224219658 at X, ratio=5.577958714 E-46 at Y, witness=7.
Pol[26, 1] with [h, u]=[11, 4] has ratio=0.2309220842 at X, ratio=6.524928930 E-37 at Y, witness=7.
Pol[27, 1] with [h, u]=[11, 4] has ratio=0.0671811219 at X, ratio=1.160492249 E-29 at Y, witness=3.
Pol[28, 1] with [h, u]=[13, 5] has ratio=0.4332538948 at X, ratio=7.90922433 E-206 at Y, witness=3.
Pol[29, 1] with [h, u]=[13, 5] has ratio=0.3882655297 at X, ratio=1.401970934 E-171 at Y, witness=7.
Pol[30, 1] with [h, u]=[13, 5] has ratio=0.04658314992 at X, ratio=4.427379094 E-143 at Y, witness=2.
Pol[31, 1] with [h, u]=[13, 5] has ratio=0.3829262008 at X, ratio=2.307317970 E-119 at Y, witness=3.
Pol[32, 1] with [h, u]=[13, 5] has ratio=0.1943926503 at X, ratio=1.416035678 E-99 at Y, witness=3.
Pol[33, 1] with [h, u]=[13, 5] has ratio=0.2881866177 at X, ratio=4.525635976 E-83 at Y, witness=2.
Pol[34, 1] with [h, u]=[13, 5] has ratio=0.2702972868 at X, ratio=2.138692689 E-69 at Y, witness=5.
Pol[35, 1] with [h, u]=[14, 6] has ratio=0.1968206242 at X, ratio=6.200785796 E-167 at Y, witness=3.
Pol[36, 1] with [h, u]=[14, 6] has ratio=0.1056311938 at X, ratio=3.406863761 E-154 at Y, witness=5.
Pol[37, 1] with [h, u]=[14, 6] has ratio=0.0780779115 at X, ratio=2.321760448 E-142 at Y, witness=3.
Pol[38, 1] with [h, u]=[14, 6] has ratio=0.2210439657 at X, ratio=8.94500836 E-137 at Y, witness=2.
Pol[39, 1] with [h, u]=[14, 6] has ratio=0.0922592906 at X, ratio=1.516672062 E-136 at Y, witness=11.
Pol[40, 1] with [h, u]=[14, 6] has ratio=3.742613816 E-21 at X, ratio=2.948765750 E-118 at Y, witness=41.

Validated in 12 sec.


Congratulations! n is prime!

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