Primality Certificate for (6311^2593-1)/6310

Andy Steward9,850 digits01 January 2007
Originally by A.A.D.Steward 2007

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

From Factorisation
63116311
Φ22 · 2 · 2 · 3 · 263
Φ37 · 5690719
Φ42 · 17 · 277 · 4229
Φ63 · 13274137
Φ82 · 41 · 19345451420681
Φ963181376155026607907593
Φ1213 · 97 · 1257991258261
Φ162 · 1553 · 6762337 · 119808375637369786481
Φ183 · 19 · 37 · 46261 · 647586050063419
Φ244153 · 37657 · 408817 · 115539913 · 340656601
Φ27824419 · 11631396883699 · 255990194024256739 · p33
Φ322 · 36637729 · p53
Φ36397 · 577 · 500230353313 · 1806310645561 · 19286319634815133
Φ48378193 · 129798849561884929 · p39
Φ543 · 1621 · 20089 · 67822470104671 · 25617195713941717350547 · 1485933814312778642517649
Φ7273 · 7417 · 2679909520128892175017 · p65
Φ8134183 · 10419966144290683 · c185
Φ9610369 · 167017441 · c110
Φ108109 · 7561 · 4303095140979501126121 · c110
Φ1443457 · 108127797315673969 · c162
Φ1623 · 163 · 385709427556389770509603 · c179
Φ2161487593 · c268
Φ28827073 · 131367434847553 · 971112816161196403393 · 53281549327258149378785281 · c300
Φ324c411
Φ432433 · 7222177 · 10285921 · 27660637297 · 3490395553153 · c508
Φ6483889 · 9721 · 4479980808796227948673 · p792
Φ864254584513 · 4076080137894241 · c1071
Φ12961297 · 209953 · 256609 · 293265503857 · 1228355148603404635921 · p1596
Φ25922593 · c3280

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

174379 3117117346 5641849073 0909255319 5440850274 9373949373 0516003138 8637141386 1464803116 1265612767 3987025047 9058783498 3940889969 2316853033 7703053061 2626258744 9757462783 2765771290 6622292986 6194781856 9827750421 9865387707 6558630712 8116048218 4837383216 7195456249 8847841093 4377078112 8213744580 7972165278 6912660008 8247689357 3235211095 9391510368 9257560495 6334936689 2904515918 6307313111 9076171811 1176470702 3929107757 9779510546 3648848229 9114215184 2245901570 6536361659 4278984787 7365387815 8676152129 8364353701 5142374225 7219144986 5318856091 7868405180 7478582596 8683264508 3912891275 6748177932 0665844636 1796769867 5929675267 5778016699 9740339654 9326202623 1083149107 9708604119 4414379352 7964651422 5007126529 2802056408 4283049152 6138835352 5055225613 8176047701 5958255065 5019655647 0049275441 6040299889 0536241165 1926608264 9054893484 8789630150 3523155838 1239293653 0298930873 7853116240 5282366332 5376602830 6879584885 0817598624 6950367316 5184920341 7757422208 3279527385 1580476487 2253956666 8922554038 4250769195 6502475972 3790096386 1712074040 8160183853 1595650753 2621642966 3503621008 2882881828 4992508338 6212100428 5282649710 5605364334 2505436389 6413037471 9974567645 6957832674 1994484064 3197833705 6957768385 3727158909 4002593500 9642874557 0587177540 1462069933 2778912210 0717850688 4225715989 5278287224 5776408358 2086532743 3390797012 8248804781 0999199314 6664658554 2905718826 6484376783 8429140459 6938268881 9102931715 2150675213 5029475155 6718016775 0337542570 5449785932 0442854359 0320923743 2891101428 8326591106 2071166535 8844793768 9098829529 7341779253 0076032463 9671561887 6349752098 1397744354 5891919669 9220763237 2709933727 8352333476 6884379221 1749910577
39 1184715807 2496962914 3985106228 0455653075 5860716303 5040987867 2557607448 6050267044 0148026498 0911057250 3876962305 6191604851 7986919369 2438736941 5044316967 6777960970 5155682910 3196892695 8877197493 6956367935 4951970113 0359518226 0471328029 0417453306 1000274439 7940595756 9337270224 8225163788 7012962405 6767175333 4234833376 7139529738 7963731021 2682907250 3573024424 8709848748 6217674341 6531114116 6556751513 3803308583 5931739269 9874379113 8492370567 4637879649 0739278550 7149545367 5201588561 8959313985 9257231719 0491178736 5393595446 8789093028 1863481179 5284394854 0648472123 3113502569 1576078724 3969777092 3409401622 5004456632 8933009494 1858448900 8708442480 0517773914 9511439197 3399989887 3467360550 7604323305 2408304924 4825820208 7115980072 2560643154 1753800673 5439858961 5222427908 9850770173 2929161634 5502633348 9965078713
10982 0913922918 5177153675 2810795753 2215130389 4374977678 2260737593
864 1961778070 1389294806 3674526687 0183715643 1706243489
128999062 2906752827 5159209218 2855465073
102 7457925592 0092238288 4638413547
532815 4932725814 9378785281
14859 3381431277 8642517649
3857 0942755638 9770509603
631 8137615502 6607907593
256 1719571394 1717350547
44 7998080879 6227948673
43 0309514097 9501126121
26 7990952012 8892175017
12 2835514860 3404635921
9 7111281616 1196403393
1 1980837563 7369786481
25599019 4024256739
12979884 9561884929
10812779 7315673969
1928631 9634815133
1041996 6144290683
407608 0137894241
64758 6050063419
13136 7434847553
6782 2470104671
1934 5451420681
1163 1396883699
349 0395553153
180 6310645561
125 7991258261
50 0230353313
29 3265503857
2 7660637297
340656601
254584513
167017441
115539913
36637729
13274137
10285921
7222177
6762337
5690719
1487593
824419
408817
378193
256609
209953
46261
37657
34183
27073
20089
10369
9721
7561
7417
6311
4229
4153
3889
3457
2593
1621
1553
1297
577
433
397
277
263
163
109
97
73
41
37
19
17
13
7
35
27

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

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 = 55 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

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 = 839916 3039260963 1669577680 6082475779 3589904159 8989648132 2748005894 1730489236 3418082714 7674601489 0826159149 7687110506 5770462949 1461520860 7079266669 9583905565 9582256414 6519930479 2073392992 7832460345 8525100973 2659548120 1935444988 1427835759 8812862532 9985049106 4546611555 0466733128 0147989573 4463845988 9338070739 6462579212 5612522380 8618048585 3615951980 6284818256 5145955890 8499056282 1164542340 6617839150 7702343843 8911222132 5724805747 2156961760 9944242449 4191035470 1814114832 1173468797 4643884215 2332209957 0160667916 7367522817 2810451337 6276941966 8919706083 4390824915 3271493167 8204153393 7300222052 3220291933 0057822389 3214002299 5570231713 3882738146 4999585950 9153438665 6489464666 3066915795 6679557398 3396321500 2508554054 1436790251 2984448646 7440690492 1027814055 8608159835 8819597316 2016640626 4248055326 4904716952 2323958873 0216865262 0392717987 5324875601 1520843463 8291159426 2019376462 8123127029 3955234461 7959733961 5699117766 6184056709 1008492524 2455990228 3222912226 0669560083 5922047151 6358112153 7222658559 3852482550 8739413584 3682948131 9479775666 7733900808 7911717494 3625123962 2945894927 7888643907 0725325119 4728953224 6219827609 9228241838 1315230129 8620158089 5684427228 3382271971 7043703951 7683615415 4148613173 8943267284 3291419560 1895261837 6805679855 1428935530 3644543667 6300370234 5120893377 2093560794 7380523995 6347616314 5857812404 1627675714 3998511743 7407121082 0774800301 0785129426 2964176080 0807984325 0938098553 5206201881 0097892334 5751659527 2314341337 0669112468 8172842401 9545063522 7165432093 2637127909 9106129527 3469385008 3151892110 3365906475 9049662968 6297725935 8503901604 3698173371 5878255983 8367427321 9664831793 3534730329 1105620192 8150772586.

With those constraints, the unique continued fraction is: {0, 1, 18, 1, 4, 24, 2, 2, 1, 15, 1, 3, 2, 2, 6, 3, 6, 1, 9, 2, 3, 4, 1, 1, 4, 1, 1, 2, 2, 3, 1, 1, 5, 20, 3, 4, 1, 1, 14, 9, 1, 1, 8, 5, 1, 5, 3, 40, 1, 2, 5, 3, 1, 1, 3, 1, 2, 1, 8, 1, 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, 1, 1, 2, 7, 1, 1, 7, 9, 2, 1, 1, 1, 1, 1, 1, 2, 1, 21, 3, 2, 15, 1, 1, 2, 2, 78, 2, 3, 1, 2, 1, 2, 2, 70, 1, 37, 1, 24, 1, 2, 7, 1, 10, 3, 41, 1, 1, 33, 3, 2, 2, 2, 2, 3, 2, 1, 2, 2, 1, 7, 1, 1, 21, 1, 12, 24, 1, 3, 1, 4, 1, 4, 7, 1, 1, 272, 1, 44, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 3, 50, 3, 1, 1, 1, 4, 1, 2, 25, 3, 2, 1, 6, 6, 1, 2, 5, 5, 1, 1, 3, 13, 1, 1, 2, 4, 1, 1, 4, 4, 2, 1, 13, 1, 5, 4, 1, 2, 17, 8, 2, 1, 1, 2, 1, 1, 1, 3, 1, 2, 3, 1, 3, 88, 1, 6, 1, 10, 1, 5, 1, 1, 1, 1, 3, 2, 6, 4, 60, 1, 1, 4, 2, 3, 3, 5, 3, 1, 2, 3, 4, 2, 1, 1, 1, 1, 1, 15, 1, 1, 1, 6, 3, 1, 1, 1, 2, 1, 49, 47, 2, 1, 3, 4, 4, 2, 14, 1, 1, 1, 2, 2, 1, 1, 1, 2, 8, 2, 6, 1, 1, 73, 3, 4, 1, 2, 2, 18, 1, 49, 1, 1, 3, 13, 6, 2, 24, 10, 4, 3, 10, 2, 74, 7, 1, 7, 1, 2, 1, 2526, 1, 1, 1, 485026 5654072764 9568050273 2073107105 3617278398 0404658141 2426248961 8515171279 0641423362 2578771178 7675472864 2419249739 9603889992 1074301808 5419942405 5059013497 7170628285 3839860198 8923364449 0653750298 9439586363 3309367804 6674952788 4488203690 4614903650 3460510323 9475245738 8076038359 4478454027 1545595086 7390076496 5093218892 3089273662 6146841591 0280025440 5443957956 8726248138 7254484356 2414002472 1476988979 7545089085 9840568133 4016926774 1143635467 5304994408 7506132374 1083939831 3217995426 3984113983 1738228714 4504258924 1254685868 2819070604 9592163952 3227856624 9442715699 1955697957 7586626054 9577390974 4416600497 8041523679 9818915185 1927376038 5488918589 5263443010 9110215394 5979112289 8546866091 1886040109 8352465277 3027842973 3042252149 2710658391 6337702325 7855500464 4086585729 5297891366 0217074694 6688838140 0106891682 0297638841 6704227510 4684132040 5751005829 4062538926 4463619412 3665630305 4312348127 1400394831 9742481206 5732256767 5485247887 5561755549 6625350143 5835179993, 1, 1, 5, 1, 17, 2, 3, 1, 1, 4, 2, 1, 1, 4, 4, 2, 30, 1, 2, 2, 2, 3, 1, 11, 2, 1, 5, 1, 14, 3, 1, 8, 4, 1, 10, 1, 1, 1, 2, 1, 5, 80, 5, 1, 1, 5, 6, 1, 3, 1, 1, 1, 4, 1, 2, 1, 4, 2, 1, 1, 1, 1, 2, 4, 2, 4, 1, 1, 7, 1, 1, 1, 39, 1, 1, 3, 6, 1, 1, 10, 1, 1, 33, 3, 21, 1, 1, 1, 1, 18, 1, 3, 1, 13, 2, 1, 2, 14, 3, 10, 1, 1, 1, 1, 36, 1, 1, 6, 72, 9, 1, 1, 6, 1, 239, 2, 1, 1, 5, 2, 1, 10, 1, 3, 4, 1, 31, 5, 2, 10, 1, 4, 11, 1, 1, 1, 1, 3, 1, 5, 5, 1, 3, 1, 4, 1, 11, 2, 2, 2, 14, 4, 4, 2, 7, 1, 12, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 1, 2, 1, 5, 1, 5, 13, 3, 1, 5, 3, 1, 1, 1, 2, 2, 1, 1, 1, 8, 1, 6, 4, 6, 1, 1, 1, 3, 2, 1, 6, 2, 1, 3, 2, 1, 7, 1, 1, 5, 1, 78, 1, 3, 2, 3, 1, 2, 2, 1, 13, 1, 6, 1, 2, 2, 1, 5, 3, 1, 1, 2, 1, 1, 1, 6, 1, 13, 1, 1, 2, 2, 2, 17, 2, 1, 2, 2, 4, 1, 1, 19, 1, 3, 1, 2, 41, 6, 2, 1, 2, 1, 2, 1, 3, 12, 4, 8, 1, 1, 3, 3, 1, 1, 1, 15, 3, 1, 401,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, 4, 22, 14, 6, 7, 2, 3, 4, 2, 1, 5, 1, 2, 1, 1, 2, 2, 3, 1, 1, 1, 65, 1, 5, 7, 1, 5, 1, 14, 11, 5, 1, 1, 1, 3, 1, 1, 14, 2, 1, 4, 2, 1}, giving these values for u and v:

We also need to calculate d = floor(c4·v/F + 0.5) = 1507 3604712006 6271647048 1589238904 6663300998 3128223495 7418042269 3014730161 0671337793 7456570510 7059493498 0470668099 1331054293 9549990965 8623594086 4757538998 6580491313 2239680160 2378897270 9802965052 4043771389 9566655329 0141084092 4498705560 6038297228 7273382111 9906328891 6814916897 3650913496 7587437945 4002682890 3906231532 4049770719 8966740224 5838441466 3250704780 8811317320 7767155540 7807804097 9472866751 0295927287 5010681677 0645698405 1018788294 7932323289 5952685264 9494410406 4240838683 4500780529 3524667725 5453579285 7714631339 0746399598 6446676801 8067204564 3012815808 4030004742 0168130137 6821119141 1865779443 9440127523 8802125549 7482669657 2941871116 0021929160 4801373066 4993157953 1911669759 8149947183 1152530994 2432337801 5071305261 3960900804 0026752582 9599863233 4076935263 6386802098 5806316318 0770570827 9562301739 3614289557 1437358686 8909004649 6644471254 1898073207 7778485149 0021687604 1253706609 6888648736 1276324429 6127425822 0977158033 1684520797 3892955061 1275926968 1819152257 4942815586 4993561661 5134674487 4825265174 7062684339 3106039015 6990830072 5724443267 4333007819 0417573285 9206296802 0215757163 4633303804 0013573731 0938800656 2092162323 8487537927 1726843206 1111118032 8422118424 2183264997 7052100048 9845195900 7495889778 4189005324 3760898506 4649603217 2526887589 1507606694 1193784543 8018115610 8864568883 1604587994 3525404995 9190763868 5206161074 3525745448 4978487226 1479384149 8687858565 8444759637 1986677222 1450254541 4725497240 1195122245 8682072241 5736485723 0023104057 6319296899 4350565282 5380923226 3035293149 5184515631 5053957131 2934161778 9973280150 2088600053 2013281287 6242973186 9026659673 7781939724 5486283514 4916065906 7946369047 5365767133 3917553939 8568071982 8150887746 1410066789 1472398766

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.

The real roots of P are:

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