Primality Certificate for (3198^3727-1)/3197

Andy Steward13,060 digits11 January 2008
Originally by A.A.D.Steward 2008

This certificate uses a theorem of Brillhart, Lehmer and Selfridge 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 36.447425% factorization of N-1:

From Factorisation
31982 · 3 · 13 · 41
Φ27 · 457
Φ331 · 523 · 631
Φ610224007
Φ919 · 37 · 35533 · 84061 · 509435263
Φ1816183 · 6898861 · 9581518171
Φ2323 · 47 · 84181 · 3518863 · 18888797 · 51148944589 · 2821377010007960242697 · 146729587859967388015321
Φ27271 · 853563487572502601039544124603 · p31
Φ461289 · 1068805568845952074381 · p53
Φ54379 · 1970083 · 116239483 · 78676926697 · 17121847030453909 · 10469763379549411039
Φ6910485027757 · c145
Φ813889 · c186
Φ138p155
Φ162163 · 4051 · 95581 · 25966819 · c172
Φ207541927 · 95320189 · c449
Φ4149409136077387747 · c447
Φ62191909 · c1383
Φ12423727 · 2092771 · 56489887 · c1371
Φ186377463541 · 5192217917209 · p4144
Φ3726133712895918097 · c4150

From this partial factorization, we use sufficient of the largest prime factors of N-1 so that their product F is at least N 1/3 :

1552 9573278034 7484543222 5592869055 5393649763 4441882645 7275029255 8422057692 9467907101 9496193164 1660496787 1400886755 6339926388 0147206983 6216355702 3166837292 1472731887 7752274003 2254816138 3869179888 3172902917 7464650097 1243117775 3624327549 9489572310 7748060639 8871559118 6788817750 5934260895 2446446767 2219759442 2320169236 9542210458 3298290975 8977583993 6563507773 9185784686 5309494375 0686127163 4981312229 2336372255 3055907476 4597232628 6587639845 1861493494 8780821921 7715537391 3167684209 2006631576 4888532088 9541555807 4854200801 7264806123 0830985142 8391199656 9126370513 5982124208 0502938607 1842374655 5455688519 2801397198 5888991689 1167792788 6577538483 2776784175 9224829626 5887831944 5235207068 4608835146 6538587675 4060961746 6516096473 7796094646 0908665423 1174821117 1567545895 3697892868 3322341542 3385500271 3806759210 1052890079 9866167362 0492366385 0050150920 9360869390 4412321913 6458295471 2517956999 3852090937 7444047798 9007078250 6443750384 9607245245 4595968196 8689546596 9263983087 1722075618 6723810107 2106688623 6591920253 3205634202 2267367307 9032133944 4996800366 7691874568 8384164151 6176191725 0781656113 9894866941 9479155499 8006079931 5087783543 4097257856 0275067365 8165943695 7391064635 5660293526 5185812755 9353579944 6403736352 8846890121 9427848031 4399636020 7707491325 9127982164 6106283585 9645976034 7551769546 5578939094 5899012042 2103276887 5136377629 0460094096 5456620666 6204233126 1030885287 6811057317 3020861286 1884049590 6759060042 6692280348 8270673488 6111293283 1672452332 8283765438 9475666732 7494129683 1895901812 8272170965 4683593643 1575568518 3789659649 5834048074 0671811791 4117894253 3564671520 5692134569 7992845723 0130663093 3434105497 4243972508 3590108402 8379501674 5838692692 8397372080 0503222176 8892587726 6579923336 4339258799 2735729735 4793256271 7316093960 3561887098 7890261286 0321917143 7530757576 8797263659 4120642808 8871831178 9622848288 3039040576 3164365497 0284608060 1995496612 6807698920 0855902503 2154332910 0469193253 6446714994 2459971108 8630218391 2694056296 9872054355 0914644063 8624898230 3642593486 3171621928 3686697269 5068252730 6172661090 9285889069 1958150208 0648308444 0233080408 9212635325 8581927723 6575134093 0444320194 4367684575 0629972466 9491674028 4563829266 4132717291 5331483698 0130020913 6347652797 9841675912 4164771662 4806820094 0745763799 3839828859 3372124883 5122082852 9083664178 1387005285 8881761866 1339213326 1216915134 9626523674 9673185578 6649839280 9868498727 4715776205 2297183695 7112635341 7244856114 8556119253 0930421689 8576453119 1816860591 8342298434 6544561012 9186901670 2960349126 1641492852 4185494690 6284883179 7829491641 3735811457 0363555861 6550267297 5108575730 4329047156 3536304034 5066764347 4656842725 3491325212 7945118119 5207911819 7381918916 0534738950 1587008443 6743706389 1367301780 1848585119 7639329144 9298130203 3020688074 6186834511 9428235261 7304606151 5531951252 1598547188 8521456889 3664944444 5133651187 1816134378 0251809628 0368373832 0844540374 6770511118 9589326144 2779426398 2685148202 2796498688 3070981180 7301744005 5816108746 3006557538 2481795627 8726233746 8676411421 8004486774 5761295831 0759107217 6213157842 1268180336 1770928364 8447262063 2562620894 2992209958 2070364474 2763113133 8080952126 8828526028 0743709669 0482325634 2108813813 9505793939 5834152156 0987095883 2380303528 1892431821 5626564384 6784036316 3878673418 7226423506 7351183772 5230528267 9883018483 4001357124 0835275705 0392593728 0022273470 8721832529 2703393608 2273905370 4227413006 9790371034 9898108285 7150085817 4881920431 5205435593 8909929763 7359194357 3628088110 9645280459 5177402222 6308435378 2190820015 7525274787 5578560866 2580892485 6602364588 6455183871 4808486521 7263403722 1198861396 7729502225 4982041383 1996453964 3952140821 0022459951 0895256725 9747237035 1930770963 9677659300 1245226302 6880812765 0441949923 0280426124 1000914309 0271390773 4890310448 7112566195 7321037713 3675949399 9342097271 3777032917 3400878688 6501475865 8308202660 5450617552 6536000039 3142575659 1631871625 0275707747 3660618706 4611502486 0150935328 8465484548 8078868081 0092976642 0650601792 6733229912 6783475597 5999047845 8373550797 3061881848 8888779886 2831668239 4297389128 9558761745 8912320476 5640366331 4702918585 2781153823 9773319903 5798926836 4138757803 2028936834 1678272714 2981353699 3254722295 0697242101 1842048218 1653238265 7116002666 6178065519 5748053029 0965480226 8002618607 6909000932 8185960398 4151815141
16397 8909797950 4184187904 0773371409 5753292780 3999672014 5855666543 4267590698 4254523405 5842709384 6737283667 6480217763 0870378814 2426206996 1107003968 6155203639
929 0491729191 5314731688 4343108979 2842264790 2029125923
5 2918454168 9641256001 5885314141

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.548037%

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

Given such a witness, Pocklington's Theorem shows that every prime factor of N ≡ 1 (mod F). As F2>N, N can have no more than two 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 is prime if and only if c12-4·c2 is not a square (given 2F3 > N).

Here, c12-4·c2 is ≡ 24 (mod 64) and therefore cannot be a square and N is prime.