TME, vvol9, no.3, p .465 Evalu uating Mersenne M Primes Using U aS Single Qu uadrant E Expanding Square S Cory C P. Daiignaulta, Douglas D Sprrague, Joe L. Mott Florida Sttate Univerrsity, Deptt of Mathem matics Abstract Byforminga B atableofseq quentialoddnumbers usingasingglequadran ntexpandingg sq quarepatteernitwasob bservedthatmultipleM Mersenneprrimesfallin ntothefirst co olumn.WeprovethattheMersen nneprimesw whichfallin ntothefirstcolumnwilllbe oftheformp p3mod4,,wherepistheMersen nneprimeexponent.Focusingthee seearchofprimestothossewhichfallintothefirrstcolumno ofthissquaaremaybeaa meanstoinc m creasethesp peedatwhiichlargepriimesaredisscovered. Keyword ds:Algorithms;Mersen nnePrimes;Primes Introduction AMersenne A primeisap primeoftheeform 2 p 11.Forexam mple,thefirsstMersennee primesare2,3,7,31,an nd127whicchcorrespondstopvalluesof1,2,3,5,and7. Currentlyon nly47Merseenneprimesshavebeen ndiscovered d.1Thefirsttattemptto o th co ompilethep primeswasperformed dinthe17 centuryby theFrenchscholarMaarin imesintensifiedwithth Mersenne.T M Thesearchfforthesepri headvento ofdigital co omputing.A Aswithallp primes,asthenumberssbecomelaarger,theprrimesbecom me in ncreasinglymoreremo ote,makinganexhaustiivesearchlaaborintensive.Theaim mof th hispaperistoexploreaapotentialm meanstolim mittheseto oftheeligib blenumberssto th hosemostliikelytobeaaMersennePrime.Totthisend,sequentialod ddnumbersare arrangedinttheexpandiingsquarep patterndesccribedbelow w. SingleQ QuadrantEx xpandingS SquarePatttern Thisisdefine T edasexpan nsionofasq quarelimite dtoonequadrant(Figure1). Figure1 ‐ SingleQuadraantExpanding Square acpdaignau ult@gmail.com m hematics Ent nthusiast, ISSN N 1551-3440, Vol. 9, no.3,, 465-470 The Math 2012©Auuthors & Deptt of Mathematical Sciences--The Universiity of Montanaa Daignault, Sprague & Mott Withoddnumbersplacedalongthelinesofexpansionalimitlessgridofnumbersis formed.ThiswillbereferredtoasanOddNumberSingleQuadrantExpanding Square,ONSQES,andisdemonstratedinFigure2(Mersenneprimesarebold).The numbersinthefirstcolumnwillbereferredtoasFirstColumnOddNumberSingle QuadrantExpandingSquareIntegers,FCONSQESI. 1 3 17 19 49 51 97 99 7 5 15 21 47 53 95 101 9 11 13 23 45 55 93 103 31 29 27 25 43 57 91 105 33 35 37 39 41 59 89 107 71 69 67 65 63 61 87 109 73 75 77 79 81 83 85 111 127 125 123 121 119 117 115 113 Figure2–8x8OddNumberSingleQuadrant ExpandingSquare(ONSQES) Theorem:MersenneprimeswhichoccurinthefirstcolumnoftheONSQESwillbeoftheform p 3mod4 ,wherepistheMersennePrimeexponent. Proof:GiventhatthenumbersofinterestinthefirstcolumnoftheONSQESfollow theequation: R2 p1 2 ,whereRistherownumberoftheONSQESandpistheMersenne primeexponent. ByapplyingtheTheoremofQuadraticResidueandusingLegendresymbols p1 p1 R 2 2 2 2 thisequationbecomes .Sowhenthestatement 1istrue,the p p p statement p 3mod4 willalsobetrue.Tothatend,observethattheexpression p 1 isatalltimeseitherevenorodd. 2 p1 p1 2 2 2 2 p 1 1 If iseven,then p 2 p p1 2 p 1 2 isodd,then 1. 2 p Therefore, p 3mod4 If Yetforthecase 2 p1 2 p 1,theLawofQuadraticReciprocitystates: TME, vol9, no.3, p .467 1if p 1mod8 p1 2 2 2 p p ‐1if p 5mod8 Thustherenowexists p 3mod4 and p 5mod8 . Thiscreatestwopossibilities: Case1: p 3mod4 and p 5mod8 3mod8 p 3mod4 = p 3,7mod8 so p 3mod4 becomes p 3mod8 Case2: p 3mod4 and p 5mod8 5mod8 Thiscannotoccurbecause p 3mod4 3,7mod8andthen p 5mod8 Thustoachieve 2 p1 2 p 1,pmustbeoftheform p 3mod4 Remarks FundamentallytherearetwowaystoincreasethespeedofthesearchforMersenne primes.Oneisthroughincreasedspeedofassessmentoftheindividualcandidates,suchas withfasterprocessorsorwithmoreefficientverificationoftheindividualcandidates.The secondisbydecreasingthenumberofcandidatestobeconsidered.Thetheorem describedaboveismeanttoaddressthelatter. Figure2liststhepvaluesoftheMersenneprimesdiscoveredatthetimeofwriting.1 Inthistabletheprimeswhichconformto p 3mod4 areplacedinbold.Only19ofthe47 knownprimesfollowthisform.WhilenotcapableofcapturingalloftheMersenneprime numbers,theseprimesaresignificantinthattheyarisefromamuchsmallersetofintegers. 2 61 2281 21701 859433 24036583 3 89 3217 23209 1257787 25964951 5 107 4253 44497 1398269 30402457 7 127 4423 86243 2976221 32582657 13 521 9689 110503 3021377 37156667 17 607 9941 132049 6972593 42643801 19 1279 11213 216091 13466917 43112609 31 2203 19937 756839 20996011 Figure2‐ListofthepvaluesforallknownMersennePrime AsummaryarticlebySchroederdiscussesthedistributionofMersenneprimes.2 WhenthesequenceofMersenneprimesaregraphedas Log2 p theslopeis0.59.Thesame graphiccanbeappliedtothesetofFCONSQESIMersenneprimeswhichyieldsaslopeof 1.28(Figure3).Thisincreasedrateofgrowthiscompatiblewiththesmallernumber MersenneprimesthatfallintheFCONSQESIset. Daignaullt, Sprague & Mott Figure3– –ThesetofFCONSQESIMersen nneprimescom mpared tothatofallMersenneprimes Toconsidert T thediscordanceofthesizesoftheeset,considerthenumb berofodd integerslessthanth heFCONSQE ESIforagiv venrow.FroomthisFCO ONSQESIsett,considertthe setconfo ormsto withintegersolu utionsforp p.Figure4ccomparesth hesizesofth hese p1 p 2 sets.Ing general{ 2 FCONSQE ESI}ismany yordersofm magnitudessmallerthan n{Odd}.A PYTHON Ncodeforth heFCONSQE EIisdescrib bedintheA Appendix.Th huslimitinggthesearch hfor Mersenn neprimesto othosewhicchfallintotthefirstcolu umnoftheO ONSQESmaaybeameansto increaseetherateatwhichvery ylargeprimenumbersaarefound. Figure4–Thesi F zeofthesetsleessthantheFCO ONSQESIforaggivenrow. TME, vol9, no.3, p .469 Inconclusion,arrangingintegersasdescribedbytheONSQESprovidesanovel methodtoanalyzethedistributionofMersenneprimes.Furthermorethefindingthatthe Mersenneprimeswhichfallinthefirstcolumntaketheformof p 3mod 4 isjustone applicationofthistechniquetothesearchforMersenneprimes.Whiletheoverallutilityof theapproachremainstobedetermined,thefutureseemspromising. References 1.http://en.wikipedia.org/wiki/Mersenne_prime.AccessedMay22,2012. 2.ManfredR.Schroeder.“WhereIstheNextMersennePrimeHiding?”The MathematicalIntelligencer.VOL.5,NO.3.p31‐33. Appendix PYTHONcodeforFCONSQESI #!/usr/bin/python """ This PYTHON program provides the numbers necessary to form the sets describe in the above paper. A primality test can be applied to them to verify which are primes. As written below, this program describes rows 4 to 512. A sample printout is: row, Mersenne_prime, p-value 4 31 5.0 6 71 6.16992500144 8 127 7.0 10 199 7.64385618977 ... """ import math FCONSQESI_2_rows_up = 7 #since we will start on row 4, this is for row 2 print "row, Mersenne_prime, p_value" for row in range(4,513,2):#calc even rows 4 to 512 FCONSQESI=FCONSQESI_2_rows_up +2+((row // 2)*16)-10 #use integral division above since row always even p_value = 1 + 2 * math.log(row) / math.log(2) print row, FCONSQESI, p_value FCONSQESI_two_rows_above = FCONSQESI exit() Daignault, Sprague & Mott