Primality Certificate for (1710^2281-1)/1709

Andy Steward7,372 digits12 November 2005
Originally by A.A.D.Steward 2005

This certificate uses a theorem of Konyagin and Pomerance 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 30.439573% factorization of N-1:

From Factorisation
17102 · 3 · 3 · 5 · 19
Φ229 · 59
Φ37 · 31 · 97 · 139
Φ4113 · 113 · 229
Φ511 · 140611 · 5531291
Φ62922391
Φ88550360810001
Φ10271 · 136481 · 231041
Φ1213 · 37 · 1621 · 10966201
Φ15499801 · 2919451 · 50074488800041
Φ192357 · 214853 · 99228641 · p42
Φ2073108644979082361936885901
Φ24313 · 8209 · 29017 · 110881 · 8843509489
Φ3073151423574730314663880711
Φ384409 · p55
Φ4041 · 7372247574154824721 · p32
Φ572053 · 2659849 · 2311062962251 · 847717876912654804294163799649 · p65
Φ6061 · 2281 · 33601 · p43
Φ7627361 · 54721 · 1760921 · 134092501 · 8621091793372509971161 · p71
Φ952851 · 270371 · 37404161 · c217
Φ1141483 · 38351197 · p106
Φ1201321 · 151681 · p96
Φ15210004863441 · 1179668827913 · c211
Φ190191 · 688561 · 8146971580857782981976721 · c200
Φ22852148319320022608581 · p214
Φ285571 · 362521 · 869251 · 32319410401 · 3438270089189641 · p426
Φ380761 · 565921973973069340961 · c442
Φ456457 · 109441 · p458
Φ5702632830603631 · 3137711391961 · 21401177601121 · c428
Φ76084358481 · 5115343577190160846151281 · c899
Φ11408098561 · 21359225238490561 · 1954404624812998471621 · c887
Φ22804561 · 13681 · 95199121 · c1847

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

71177649 7480257621 0077308418 3481625092 3326034614 6075485881 3055202214 7160425459 1714692661 7313906616 1862668788 8261970965 8141185449 2314538416 2585549431 2547472437 3219732826 6743105155 8642663338 2469197520 0411996824 3841507284 4934611122 4437966427 8303184605 9446045389 5589585396 8463019068 5404724541 2962246012 2112169966 4348967407 7139436508 7143316743 0646105129 4862624272 2330408593 9044070945 9524853373 0229369725 1018945804 3952281086 6991192819 8446014658 2726245952 5928782473
178145 9891669069 0884296221 1243854930 3775342728 2713478401 2783777632 9028537447 6211026611 7731055384 6844706537 2647621792 2317339658 7551407045 9301419255 2958918120 7682989417 1602144023 2637760911 0335130965 1311759769 7280100543 9920997602 9968683922 5210881966 0531129575 3461328301 7061222442 8118826314 1399862629 7247980929 9397532344 5311737249 5954580934 1312797480 2707599962 6827554954 3948186877 0501115150 6517477695 7489134229 9380918788 9469222531
1144 1416108447 9107716113 0473219075 5337688515 6024220850 5848457406 5169287150 0270949378 3057428688 1487870673 6688922513 3569623119 1755791774 3957545249 2493750817 1117203904 6820194073 4586000222 6958034754 0400975420 7839641921
429728 1449673716 1026126736 1038086139 7609671559 8478107983 5081292173 8184244697 3830481578 0627248366 1479921561
142574 3931435497 8941949572 9195931152 6027545662 1694119316 0167280012 8439603380 5994530001 2702799401
8 0143296331 2983024415 3362610504 3311038716 0218183878 0433015778 0149676041
22819 0140374526 5245304769 7858504872 8056280899 1366487349 8578973397
35427 1314774789 7521670519 9525618024 9129401644 9802016199
114 3222048743 4597335535 2245338289 1616336961
31 1204584830 1620733880 9503029035 1773130851
17 6829206596 3965673149 3568194041
8477178769 1265480429 4163799649
731514 2357473031 4663880711
731086 4497908236 1936885901
81469 7158085778 2981976721
51153 4357719016 0846151281
86 2109179337 2509971161
19 5440462481 2998471621
5 6592197397 3069340961
5214831932 0022608581
737224757 4154824721
2135922 5238490561
343827 0089189641
5007 4488800041
2140 1177601121
855 0360810001
313 7711391961
263 2830603631
231 1062962251
117 9668827913
3 2319410401
1 0004863441
8843509489
134092501
99228641
95199121
84358481
38351197
37404161
10966201
8098561
5531291
2922391
2919451
2659849
1760921
869251
688561
499801
362521
270371
231041
214853
151681
140611
136481
110881
109441
54721
33601
29017
27361
13681
8209
4561
4409
2851
2357
2281
2053
1621
1483
1321
761
571
457
313
271
229
191
139
1132
97
61
59
41
37
31
29
19
13
11
7
5
32
2

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

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

Express N in base F

Let N = c3·F3 + c2·F2 + c1·F + 1. Let c4 = c3·F+c2.

Square Checks

For t = 0 to 5, we prove that Q(t) = (c1+t·F)2+4·t-4·c4 is not a perfect square. This is done by checking whether Q(t) is a quadratic residue modulo a variety of bases. If it happens to be a QR in all of the bases, we calculate s = floor(sqrt(Q(t))) and show that s2 < Q(t).

Continued Fraction

We approximate c1/F by a continued fraction u/v such that v is maximal while remaining less than F2 / N1/2 = 84 5248056555 7620404520 9882986525 2493641161 0431696983 6892557752 5481538543 5992525998 4376168672 9433584647 6936338248 4715888223 9730284118 4198404451 2168369287 1415711005 7977830938 1527327498 7749335346 8276063830 2892898606 7565529685 5027795994 3764833623 5863508696 0816521884 2068752572 9238965794 4888449278 8436568961 0320305330 0324766827 0582197043 3130783405 9220652170 3837074518 3202177598 3992349090 6592152189 6273560671 6447335000 3139029438 4020023544 6566320858 5311683359 0093689079 8394022267 9698493314 5048401391 2902884720 0491334106 2631716301 4463729714 1755638157 6096119046 7104509599 0704847344 0566127800 7079358243 0486042841 1720319290 0868888724 9555006378 3705859944 8919775107 1430093922 8396064936 8011101824 3067258432 1446519949 5315984273 5568393922 4001889057 7374902908 1287871350 3393439888 9974393078 8048204406 7418273461 6873558423.

With those constraints, the unique continued fraction is: {0, 5, 3, 10, 1, 3, 4, 1, 32, 1, 1, 4, 1, 7, 1, 1, 1, 2, 6, 2, 1, 1, 1, 2, 1, 2, 1, 5, 2, 1, 7, 45, 1, 10, 2, 8, 2, 9, 1, 2, 1, 108, 1, 79, 2, 2, 12, 1, 2,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, 2, 2, 1, 2, 1, 3, 1, 4, 1, 5, 1, 1, 9, 2, 2, 5, 1, 3, 2, 2, 1, 1, 1, 1, 5, 2, 2, 22, 3, 2, 7, 1, 1, 11, 1, 1, 1, 3, 6, 1, 5, 1, 9, 1, 6, 31, 1, 10, 1, 1, 1, 10, 2, 2, 2, 1, 2, 5, 1, 1, 3, 2, 3, 1, 2, 2, 1, 9, 1, 5, 1, 3, 1, 5, 2, 7, 2, 1, 1, 4, 7, 9, 1, 10, 1, 2, 1, 20, 4, 1, 1, 1, 1, 1, 3, 3, 2, 1, 4, 4, 5, 5, 3, 1, 2, 1, 2, 7, 1, 2, 1, 9, 1, 3, 1, 4, 1, 3, 2, 2, 1, 5, 1, 1, 6, 3, 2, 7, 1, 1, 4, 3, 1, 1, 5, 1, 1, 2, 1, 9, 1, 1, 1, 4, 3, 1, 6}, giving these values for u and v:

We also need to calculate d = floor(c4·v/F + 0.5) = 30 5266877812 0545420315 6855236059 4447955581 8949516269 0055604798 9085847085 6243812141 6909988521 8527274135 8721857181 4342136210 0892102062 0801455672 0686905351 3623313048 1116304650 2460715797 1912109389 1890545197 3467014847 8321768089 4984918415 7215165843 8855090472 4165236160 6005393478 4273044870 8964118450 1928878432 6477303519 6343723040 8241088643 3669748747 6526695245 8239120249 9043181100 2252601950 8259901495 7263691501 1347138438 3312351632 3022784818 4797846634 6469979521 0871257308 6409240841 9000853271 4232888577 2876797665 5614764230 6722606134 5864340868 0954601728 2954472938 8446547193 8100108254 4185857066 6268524928 8678432514 2493145142 7000733847 6891162036 7917656600 2731635715 6335786510 8376991414 9199183129 1649939770 7292294705 9253422184 4300446837 5632145052 4006178400 5840327462 5048589665 7024382453 2928144820 8740217938 0842447120 8610496663 8523751460 3641471260 3764802962 3470465129 0156185347 2000789792 7944099702 5271474285 8635327570 0425460732 5939950503 8013596670 0279748369 3009229492 6368801429 8129524458 9819596592 0567896666 3854855794 9332232735 3003924936 6319039824 4426412335 3583268307 3217948861 2747236515 9354686213 4783051863 6256379462 7321151972 3083023804 9348047097 6815600011 9919329410 6917897822 1242089624 0067732409 8928903721 6478491833 3228633262 5924189883 2840822085 9495698925 3127377998 9795418746 9158785249 2735047642 8772291007 6979967588 3719951265 5937357746 2295614092 1833751917 6485364076 9413255228 7308979358 4115829071 9740081064 5173616703 4844911012 0794990767 4112311702 0410389444

Cubic Polynomial

We now consider the cubic P(x)= v·x3 + (u·F-c1·v)·x2 + (c4·v-d·F+u)·x - d, which we express as: z1·x3 + z2·x2 + z3·x + z4, where:

We need to prove that this cubic has no integer roots r such that r·F+1 is a non-trivial factor of N. Clearly r (if it exists) must lie between 1 and R.

P has a single real root at:

There are no integer roots of P in the interval (1,R), so the proof of primality is complete.