Primality Certificate for (9464^2521-1)/9463

Andy Steward10,020 digits21 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.441069% factorization of N-1:

From Factorisation
94642 · 2 · 2 · 7 · 13 · 13
Φ23 · 5 · 631
Φ33373 · 26557
Φ453 · 233 · 7253
Φ511 · 61 · 3422191 · 3493961
Φ63 · 457 · 65323
Φ743 · 16711899900041318913067
Φ811446289 · 700864753
Φ92791 · 756289 · 340408792829719
Φ105 · 281 · 5709219172541
Φ1237 · 673 · 18061 · 17837761
Φ14113 · 617 · 10304784062133016177
Φ1531 · p31
Φ183 · 19 · 307 · 3547 · 4933 · 2346728537557
Φ2078810001 · 816613424460673263835441
Φ21211 · 88411 · 948669793 · p32
Φ24193 · 297097 · 42655177 · 26313009897239473
Φ2829 · 421 · 6469 · 3685616916639815501 · 1773655774169309609041
Φ30347440547022601 · 185252142534499441
Φ3578121 · 584081 · 76388142203055205426665198571 · p56
Φ36109 · 2033497 · 292077613 · 2803490461 · 25561628173 · 111286088713
Φ4041 · 843875708521 · 102354585320865895201 · p31
Φ42127 · 415087 · 327001348944268153 · 29953685729424294387313
Φ45113761 · 3134881 · 3368791 · 2026974421 · 6572276520752257119271 · p47
Φ56504320170708052062448471442227761 · p63
Φ60150301 · 584319204421 · p47
Φ631009 · 700561 · 67849808177971 · 30017622987197074657 · 677502141136520743499504571433 · p72
Φ7071 · 12384712271 · 15282214963499407351 · p65
Φ7273 · 1873 · 25057 · 1193473 · 813268665766529281 · 76120850244633143113 · p43
Φ846217 · 38557 · 598333 · 17541487396273 · 90806289097758613 · 213259367914614667381 · p31
Φ90181 · 110161 · 217081 · 177270211 · p75
Φ10550746291 · 6180893198153479267088063641 · p156
Φ12013668481 · 39277681 · 88413896192274848410321 · 97722741730230091021681 · 146592839362552894226749017361 · p38
Φ12696769 · 149852527273 · 1417063822386093562585788740809 · 102072204632440555649945238010897 · p65
Φ1402801 · 1064281 · 3581889004471541 · 13515568007902849213361 · 846956999357977583853894761 · c117
Φ168337 · 804048673 · 16427405233 · c170
Φ180893341 · 1394954101 · p176
Φ2103397591 · 2746563961 · 226922028369502754521591 · 15155647953634655597007412994761 · c121
Φ25215877 · 2626063021 · 35799629293 · 871784684317 · 835118198047705069 · c233
Φ28039761 · 81813761 · 1649417281 · c360
Φ31534651 · 58858600209691470862980601 · c543
Φ360184321 · 189402121 · 516665149921 · 8584371401495761 · 30270186581402367914791123029601 · c310
Φ420232864488361 · 144067073395706748725761 · c348
Φ5043049201 · 10839977569 · c557
Φ630158761 · 234361 · 2738378161 · 528867912137671 · 640057097255311 · 585128955100693982659715161 · c497
Φ84015121 · 86464561 · 88966575601 · c741
Φ12602521 · 6301 · 7561 · 45361 · 9579190321 · 32596115047631101 · c1103
Φ25202070515492641 · c2278

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

570177 3133936450 5354317818 2601426314 2412302506 3178801839 3406240476 8303270783 1301737271 4887438715 3326413095 5011213101 0457139051 3295422071 1441581504 9102624085 5929735238 8224270401
226556 9891206892 7292497292 9683156613 0124968910 3049243697 7374652573 3715221915 6107041155 9621358267 9045406756 0198525136 4996754953 7596579114 4071788473 0689534811
34739 9780116906 9475983275 3076760909 9726318327 5020102644 4011474516 1407585191
14 1096948221 2141279767 3312156248 9892318139 5663818755 5410021463 7032171619
65613 4853297698 3744706333 5724432838 5639952358 6170856649 3072124481
19838 5018037881 3831323697 9742155962 7676313501 1381243351 2045615031
528 5513913555 9421412405 2929398816 2334388734 1961615138 3760471761
764681 9633580647 5598037479 6779852519 7264400212 6526704051
4716107 3319625439 1221096325 1025464784 6035163761
1665485 7999910742 6668890721 1701652481 4830493501
105 3061122764 8236904975 8079592220 8488081153
25228788 1857072777 8469420318 5291183041
504 3201707080 5206244847 1442227761
102 0722046324 4055564994 5238010897
30 2701865814 0236791479 1123029601
29 1707138819 5199359962 0314439337
15 1556479536 3465559700 7412994761
5 4711175150 4758543197 4700943817
2 0758227514 3530097114 1353124311
1 4170638223 8609356258 5788740809
1 1695695705 4342750094 2055503121
6775021411 3652074349 9504571433
1465928393 6255289422 6749017361
763881422 0305520542 6665198571
61808931 9815347926 7088063641
8469569 9935797758 3853894761
5851289 5510069398 2659715161
588586 0020969147 0862980601
8166 1342446067 3263835441
2269 2202836950 2754521591
1440 6707339570 6748725761
977 2274173023 0091021681
884 1389619227 4848410321
299 5368572942 4294387313
167 1189990004 1318913067
135 1556800790 2849213361
65 7227652075 2257119271
17 7365577416 9309609041
2 1325936791 4614667381
1 0235458532 0865895201
7612085024 4633143113
3001762298 7197074657
1528221496 3499407351
1030478406 2133016177
368561691 6639815501
83511819 8047705069
81326866 5766529281
32700134 8944268153
18525214 2534499441
9080628 9097758613
3259611 5047631101
2631300 9897239473
858437 1401495761
358188 9004471541
64005 7097255311
52886 7912137671
34744 0547022601
34040 8792829719
6784 9808177971
1754 1487396273
570 9219172541
234 6728537557
207 0515492641
87 1784684317
84 3875708521
58 4319204421
51 6665149921
23 2864488361
14 9852527273
11 1286088713
8 8966575601
3 5799629293
2 5561628173
1 6427405233
1 2384712271
1 0839977569
9579190321
2803490461
2746563961
2738378161
2626063021
2026974421
1649417281
1394954101
948669793
804048673
700864753
292077613
189402121
177270211
86464561
81813761
78810001
50746291
42655177
39277681
17837761
13668481
11446289
3493961
3422191
3397591
3368791
3134881
3049201
2033497
1193473
1064281
893341
756289
700561
598333
584081
415087
297097
234361
217081
184321
158761
150301
113761
110161
96769
88411
78121
65323
45361
39761
38557
34651
26557
25057
18061
15877
15121
7561
7253
6469
6301
6217
4933
3547
3373
2801
2791
2521
1873
1009
673
631
617
457
421
337
307
281
233
211
193
181
127
113
109
73
71
61
53
43
41
37
31
29
19
132
11
7
52
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.

We set R = (N-1)/F. Note that GCD(F,R)=1 and Log(F)/Log(N) = 26.441069%

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 = 391 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 ≡ 61 (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:

Welcome to the CHG primality prover!
------------------------------------
realprecision = 4257 significant digits (4250 digits displayed)

Input file is:  IO\24F809D9.cin
Certificate file is:  IO\24F809D9.chg
Found values of n, F and G.
    Number to be tested has 10020 digits.
    Modulus has 2650 digits.
Modulus is 26.44106944% 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 = 18, u = 8. Right endpoint has 2073 digits.
        Done!  Time elapsed:  15793750ms.
    Running CHG with h = 18, u = 8. Right endpoint has 2057 digits.
        Done!  Time elapsed:  25371734ms.
    Running CHG with h = 18, u = 8. Right endpoint has 2040 digits.
        Done!  Time elapsed:  22037719ms.
    Running CHG with h = 18, u = 8. Right endpoint has 2024 digits.
        Done!  Time elapsed:  15158469ms.
    Running CHG with h = 18, u = 8. Right endpoint has 2006 digits.
        Done!  Time elapsed:  22335453ms.
    Running CHG with h = 18, u = 8. Right endpoint has 1987 digits.
        Done!  Time elapsed:  24036562ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1967 digits.
        Done!  Time elapsed:  44411625ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1956 digits.
        Done!  Time elapsed:  46352641ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1944 digits.
        Done!  Time elapsed:  50156328ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1930 digits.
        Done!  Time elapsed:  53004625ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1914 digits.
        Done!  Time elapsed:  56149766ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1895 digits.
        Done!  Time elapsed:  14583640ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1874 digits.
        Done!  Time elapsed:  14091047ms.
    Running CHG with h = 17, u = 7. Right endpoint has 1850 digits.
        Done!  Time elapsed:  15002281ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1823 digits.
        Done!  Time elapsed:  7333829ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1815 digits.
        Done!  Time elapsed:  7263328ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1806 digits.
        Done!  Time elapsed:  7132125ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1796 digits.
        Done!  Time elapsed:  5340765ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1784 digits.
        Done!  Time elapsed:  5544500ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1770 digits.
        Done!  Time elapsed:  5488657ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1754 digits.
        Done!  Time elapsed:  6938453ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1735 digits.
        Done!  Time elapsed:  7584156ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1712 digits.
        Done!  Time elapsed:  6738859ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1687 digits.
        Done!  Time elapsed:  7744219ms.
    Running CHG with h = 15, u = 6. Right endpoint has 1656 digits.
        Done!  Time elapsed:  6178438ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1620 digits.
        Done!  Time elapsed:  1934718ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1607 digits.
        Done!  Time elapsed:  1970735ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1592 digits.
        Done!  Time elapsed:  2478750ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1573 digits.
        Done!  Time elapsed:  3030140ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1550 digits.
        Done!  Time elapsed:  4190625ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1522 digits.
        Done!  Time elapsed:  3489000ms.
    Running CHG with h = 13, u = 5. Right endpoint has 1485 digits.
        Done!  Time elapsed:  2047047ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1445 digits.
        Done!  Time elapsed:  956625ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1435 digits.
        Done!  Time elapsed:  695656ms.
    Running CHG with h = 12, u = 4. Right endpoint has 1421 digits.
        Done!  Time elapsed:  631422ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1392 digits.
        Done!  Time elapsed:  593891ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1364 digits.
        Done!  Time elapsed:  1381141ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1325 digits.
        Done!  Time elapsed:  1539140ms.
    Running CHG with h = 11, u = 4. Right endpoint has 1280 digits.
        Done!  Time elapsed:  1748125ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1228 digits.
        Done!  Time elapsed:  260110ms.
    Running CHG with h = 10, u = 3. Right endpoint has 1214 digits.
        Done!  Time elapsed:  288031ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1176 digits.
        Done!  Time elapsed:  182765ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1139 digits.
        Done!  Time elapsed:  318110ms.
    Running CHG with h = 9, u = 3. Right endpoint has 1085 digits.
        Done!  Time elapsed:  321984ms.
    Running CHG with h = 8, u = 2. Right endpoint has 1011 digits.
        Done!  Time elapsed:  105078ms.
    Running CHG with h = 8, u = 2. Right endpoint has 998 digits.
        Done!  Time elapsed:  89453ms.
    Running CHG with h = 7, u = 2. Right endpoint has 977 digits.
        Done!  Time elapsed:  78719ms.
    Running CHG with h = 7, u = 2. Right endpoint has 962 digits.
        Done!  Time elapsed:  79297ms.
    Running CHG with h = 7, u = 2. Right endpoint has 941 digits.
        Done!  Time elapsed:  79859ms.
    Running CHG with h = 7, u = 2. Right endpoint has 910 digits.
        Done!  Time elapsed:  82688ms.
    Running CHG with h = 7, u = 2. Right endpoint has 862 digits.
        Done!  Time elapsed:  85969ms.
    Running CHG with h = 7, u = 2. Right endpoint has 791 digits.
        Done!  Time elapsed:  80797ms.
    Running CHG with h = 7, u = 2. Right endpoint has 674 digits.
        Done!  Time elapsed:  82921ms.
    Running CHG with h = 5, u = 1. Right endpoint has 477 digits.
        Done!  Time elapsed:  8469ms.
    Running CHG with h = 5, u = 1. Right endpoint has 285 digits.
        Done!  Time elapsed:  11422ms.
A certificate has been saved to the file:  IO\24F809D9.chg

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

Testing a PRP called "IO\24F809D9.cin".

Pol[1, 1] with [h, u]=[5, 1] has ratio=1.023077797 E-77 at X, ratio=1.269827630 E-361 at Y, witness=2.
Pol[2, 1] with [h, u]=[4, 1] has ratio=0.1017310548 at X, ratio=5.50507266 E-193 at Y, witness=3.
Pol[3, 1] with [h, u]=[7, 2] has ratio=0.591543987 at X, ratio=5.781954072 E-394 at Y, witness=3.
Pol[4, 1] with [h, u]=[7, 2] has ratio=3.046322358 E-118 at X, ratio=2.886322310 E-235 at Y, witness=3.
Pol[5, 1] with [h, u]=[7, 2] has ratio=0.0940057270 at X, ratio=5.350470802 E-143 at Y, witness=5.
Pol[6, 1] with [h, u]=[7, 2] has ratio=0.01357849329 at X, ratio=1.304267055 E-95 at Y, witness=2.
Pol[7, 1] with [h, u]=[7, 2] has ratio=0.1744338264 at X, ratio=5.181699930 E-64 at Y, witness=2.
Pol[8, 1] with [h, u]=[7, 2] has ratio=0.523706184 at X, ratio=5.584383566 E-43 at Y, witness=5.
Pol[9, 1] with [h, u]=[7, 2] has ratio=0.659452459 at X, ratio=8.01513700 E-29 at Y, witness=17.
Pol[10, 1] with [h, u]=[8, 2] has ratio=0.4511833422 at X, ratio=1.388997852 E-44 at Y, witness=2.
Pol[11, 1] with [h, u]=[8, 2] has ratio=0.4492020946 at X, ratio=7.42607992 E-26 at Y, witness=2.
Pol[12, 1] with [h, u]=[9, 3] has ratio=0.3339589668 at X, ratio=1.998562873 E-222 at Y, witness=5.
Pol[13, 1] with [h, u]=[9, 3] has ratio=9.37191336 E-56 at X, ratio=2.529642943 E-164 at Y, witness=2.
Pol[14, 1] with [h, u]=[9, 3] has ratio=1.890656719 E-37 at X, ratio=9.62848105 E-110 at Y, witness=2.
Pol[15, 1] with [h, u]=[10, 3] has ratio=0.4312208502 at X, ratio=6.65721209 E-116 at Y, witness=3.
Pol[16, 1] with [h, u]=[9, 3] has ratio=0.3701999379 at X, ratio=2.929170302 E-41 at Y, witness=7.
Pol[17, 1] with [h, u]=[11, 4] has ratio=0.1329637178 at X, ratio=2.861425048 E-209 at Y, witness=5.
Pol[18, 1] with [h, u]=[11, 4] has ratio=0.02652854121 at X, ratio=1.346012554 E-180 at Y, witness=5.
Pol[19, 1] with [h, u]=[11, 4] has ratio=3.462160685 E-40 at X, ratio=2.164660004 E-156 at Y, witness=11.
Pol[20, 1] with [h, u]=[11, 4] has ratio=1.258857243 E-29 at X, ratio=5.760599190 E-114 at Y, witness=7.
Pol[21, 1] with [h, u]=[12, 4] has ratio=0.01995287394 at X, ratio=6.90374695 E-117 at Y, witness=5.
Pol[22, 1] with [h, u]=[11, 4] has ratio=0.1389703497 at X, ratio=1.340782848 E-54 at Y, witness=11.
Pol[23, 1] with [h, u]=[11, 4] has ratio=0.4691259622 at X, ratio=7.16034351 E-44 at Y, witness=3.
Pol[24, 1] with [h, u]=[13, 5] has ratio=0.3193168381 at X, ratio=9.43372091 E-201 at Y, witness=3.
Pol[25, 1] with [h, u]=[13, 5] has ratio=0.3911194749 at X, ratio=2.611167972 E-182 at Y, witness=3.
Pol[26, 1] with [h, u]=[13, 5] has ratio=2.922277029 E-31 at X, ratio=8.06669018 E-144 at Y, witness=7.
Pol[27, 1] with [h, u]=[13, 5] has ratio=0.3533208358 at X, ratio=2.859806535 E-113 at Y, witness=2.
Pol[28, 1] with [h, u]=[13, 5] has ratio=0.05659375834 at X, ratio=1.413074745 E-94 at Y, witness=17.
Pol[29, 1] with [h, u]=[13, 5] has ratio=0.3319801767 at X, ratio=6.80972915 E-79 at Y, witness=5.
Pol[30, 1] with [h, u]=[13, 5] has ratio=0.003951810439 at X, ratio=7.83819582 E-66 at Y, witness=3.
Pol[31, 1] with [h, u]=[15, 6] has ratio=2.551469969 E-37 at X, ratio=6.208294720 E-217 at Y, witness=2.
Pol[32, 1] with [h, u]=[15, 6] has ratio=0.01341236499 at X, ratio=2.056406614 E-182 at Y, witness=13.
Pol[33, 1] with [h, u]=[15, 6] has ratio=0.3995895740 at X, ratio=1.902552083 E-156 at Y, witness=29.
Pol[34, 1] with [h, u]=[15, 6] has ratio=0.01322251299 at X, ratio=3.710567807 E-134 at Y, witness=5.
Pol[35, 1] with [h, u]=[15, 6] has ratio=0.02846552679 at X, ratio=3.894818802 E-115 at Y, witness=3.
Pol[36, 1] with [h, u]=[15, 6] has ratio=0.0982482712 at X, ratio=9.13538561 E-99 at Y, witness=5.
Pol[37, 1] with [h, u]=[15, 6] has ratio=0.3287412862 at X, ratio=8.92127513 E-85 at Y, witness=17.
Pol[38, 1] with [h, u]=[15, 6] has ratio=0.2318373530 at X, ratio=8.41445331 E-73 at Y, witness=3.
Pol[39, 1] with [h, u]=[15, 6] has ratio=0.1458260553 at X, ratio=1.565757320 E-62 at Y, witness=11.
Pol[40, 1] with [h, u]=[15, 6] has ratio=0.0735967851 at X, ratio=1.156359747 E-53 at Y, witness=2.
Pol[41, 1] with [h, u]=[15, 6] has ratio=0.0690534130 at X, ratio=3.727562612 E-46 at Y, witness=2.
Pol[42, 1] with [h, u]=[17, 7] has ratio=0.02099277131 at X, ratio=1.982515385 E-192 at Y, witness=5.
Pol[43, 1] with [h, u]=[17, 7] has ratio=0.0838866206 at X, ratio=1.517858886 E-168 at Y, witness=13.
Pol[44, 1] with [h, u]=[17, 7] has ratio=0.004670709894 at X, ratio=1.438310348 E-147 at Y, witness=3.
Pol[45, 1] with [h, u]=[17, 7] has ratio=0.644120718 at X, ratio=3.160720493 E-129 at Y, witness=5.
Pol[46, 1] with [h, u]=[17, 7] has ratio=0.04908918008 at X, ratio=4.023972363 E-113 at Y, witness=19.
Pol[47, 1] with [h, u]=[17, 7] has ratio=0.1402511560 at X, ratio=4.829129714 E-99 at Y, witness=3.
Pol[48, 1] with [h, u]=[17, 7] has ratio=0.1168952096 at X, ratio=7.858530382 E-87 at Y, witness=3.
Pol[49, 1] with [h, u]=[17, 7] has ratio=0.501113220 at X, ratio=5.141189938 E-76 at Y, witness=2.
Pol[50, 1] with [h, u]=[18, 8] has ratio=0.04889076156 at X, ratio=5.63248878 E-162 at Y, witness=3.
Pol[51, 1] with [h, u]=[18, 8] has ratio=0.4873766570 at X, ratio=1.926633049 E-152 at Y, witness=13.
Pol[52, 1] with [h, u]=[18, 8] has ratio=0.002104172452 at X, ratio=1.262888396 E-143 at Y, witness=3.
Pol[53, 1] with [h, u]=[18, 8] has ratio=0.2387755742 at X, ratio=3.612929760 E-135 at Y, witness=2.
Pol[54, 1] with [h, u]=[18, 8] has ratio=0.02058455563 at X, ratio=3.347834524 E-132 at Y, witness=3.
Pol[55, 1] with [h, u]=[18, 8] has ratio=3.698651356 E-18 at X, ratio=5.620896052 E-126 at Y, witness=3.

Validated in 35 sec.


Congratulations! n is prime!

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