View Single Post
 2022-02-06, 19:22 #1 JCoveiro   "Jorge Coveiro" Nov 2006 Moura, Portugal 24·3 Posts Sophie Germain Primes, Mersenne numbers and Wagstaff numbers Connection Hi all. I think I've found a "Sophie Germain Primes" connection with Mersenne numbers and Wagstaff numbers. Code: k=1;forprime(x=1,1000,if(isprime(2*x+1),print1("SophieGermain("k")*2+1 = ("x"*2+1) = "x*2+1" --> "x*2+1" | ");if(x%4==3,print1("Mersenne(");print1(x") --> M("x") Mod ("x"*2+1) = ");print1((2^x-1)%(2*x+1)),print1("Wagstaff(");print1(x") --> W("x") Mod ("x"*2+1) = ");print1((2^x+1)/3%(2*x+1)););print();k++);) SophieGermain(1)*2+1 = (2*2+1) = 5 --> 5 | Wagstaff(2) --> W(2) Mod (2*2+1) = 0 SophieGermain(2)*2+1 = (3*2+1) = 7 --> 7 | Mersenne(3) --> M(3) Mod (3*2+1) = 0 SophieGermain(3)*2+1 = (5*2+1) = 11 --> 11 | Wagstaff(5) --> W(5) Mod (5*2+1) = 0 SophieGermain(4)*2+1 = (11*2+1) = 23 --> 23 | Mersenne(11) --> M(11) Mod (11*2+1) = 0 SophieGermain(5)*2+1 = (23*2+1) = 47 --> 47 | Mersenne(23) --> M(23) Mod (23*2+1) = 0 SophieGermain(6)*2+1 = (29*2+1) = 59 --> 59 | Wagstaff(29) --> W(29) Mod (29*2+1) = 0 SophieGermain(7)*2+1 = (41*2+1) = 83 --> 83 | Wagstaff(41) --> W(41) Mod (41*2+1) = 0 SophieGermain(8)*2+1 = (53*2+1) = 107 --> 107 | Wagstaff(53) --> W(53) Mod (53*2+1) = 0 SophieGermain(9)*2+1 = (83*2+1) = 167 --> 167 | Mersenne(83) --> M(83) Mod (83*2+1) = 0 SophieGermain(10)*2+1 = (89*2+1) = 179 --> 179 | Wagstaff(89) --> W(89) Mod (89*2+1) = 0 SophieGermain(11)*2+1 = (113*2+1) = 227 --> 227 | Wagstaff(113) --> W(113) Mod (113*2+1) = 0 SophieGermain(12)*2+1 = (131*2+1) = 263 --> 263 | Mersenne(131) --> M(131) Mod (131*2+1) = 0 SophieGermain(13)*2+1 = (173*2+1) = 347 --> 347 | Wagstaff(173) --> W(173) Mod (173*2+1) = 0 SophieGermain(14)*2+1 = (179*2+1) = 359 --> 359 | Mersenne(179) --> M(179) Mod (179*2+1) = 0 SophieGermain(15)*2+1 = (191*2+1) = 383 --> 383 | Mersenne(191) --> M(191) Mod (191*2+1) = 0 SophieGermain(16)*2+1 = (233*2+1) = 467 --> 467 | Wagstaff(233) --> W(233) Mod (233*2+1) = 0 SophieGermain(17)*2+1 = (239*2+1) = 479 --> 479 | Mersenne(239) --> M(239) Mod (239*2+1) = 0 SophieGermain(18)*2+1 = (251*2+1) = 503 --> 503 | Mersenne(251) --> M(251) Mod (251*2+1) = 0 SophieGermain(19)*2+1 = (281*2+1) = 563 --> 563 | Wagstaff(281) --> W(281) Mod (281*2+1) = 0 SophieGermain(20)*2+1 = (293*2+1) = 587 --> 587 | Wagstaff(293) --> W(293) Mod (293*2+1) = 0 SophieGermain(21)*2+1 = (359*2+1) = 719 --> 719 | Mersenne(359) --> M(359) Mod (359*2+1) = 0 SophieGermain(22)*2+1 = (419*2+1) = 839 --> 839 | Mersenne(419) --> M(419) Mod (419*2+1) = 0 SophieGermain(23)*2+1 = (431*2+1) = 863 --> 863 | Mersenne(431) --> M(431) Mod (431*2+1) = 0 SophieGermain(24)*2+1 = (443*2+1) = 887 --> 887 | Mersenne(443) --> M(443) Mod (443*2+1) = 0 SophieGermain(25)*2+1 = (491*2+1) = 983 --> 983 | Mersenne(491) --> M(491) Mod (491*2+1) = 0 SophieGermain(26)*2+1 = (509*2+1) = 1019 --> 1019 | Wagstaff(509) --> W(509) Mod (509*2+1) = 0 SophieGermain(27)*2+1 = (593*2+1) = 1187 --> 1187 | Wagstaff(593) --> W(593) Mod (593*2+1) = 0 SophieGermain(28)*2+1 = (641*2+1) = 1283 --> 1283 | Wagstaff(641) --> W(641) Mod (641*2+1) = 0 SophieGermain(29)*2+1 = (653*2+1) = 1307 --> 1307 | Wagstaff(653) --> W(653) Mod (653*2+1) = 0 SophieGermain(30)*2+1 = (659*2+1) = 1319 --> 1319 | Mersenne(659) --> M(659) Mod (659*2+1) = 0 SophieGermain(31)*2+1 = (683*2+1) = 1367 --> 1367 | Mersenne(683) --> M(683) Mod (683*2+1) = 0 SophieGermain(32)*2+1 = (719*2+1) = 1439 --> 1439 | Mersenne(719) --> M(719) Mod (719*2+1) = 0 SophieGermain(33)*2+1 = (743*2+1) = 1487 --> 1487 | Mersenne(743) --> M(743) Mod (743*2+1) = 0 SophieGermain(34)*2+1 = (761*2+1) = 1523 --> 1523 | Wagstaff(761) --> W(761) Mod (761*2+1) = 0 SophieGermain(35)*2+1 = (809*2+1) = 1619 --> 1619 | Wagstaff(809) --> W(809) Mod (809*2+1) = 0 SophieGermain(36)*2+1 = (911*2+1) = 1823 --> 1823 | Mersenne(911) --> M(911) Mod (911*2+1) = 0 SophieGermain(37)*2+1 = (953*2+1) = 1907 --> 1907 | Wagstaff(953) --> W(953) Mod (953*2+1) = 0 k=1;forprime(x=1,1000,if(isprime(2*x+1),if(x%4==3,print1("Mersenne(SophieGermain("k")) Mod (SophieGermain("k")*2+1) == ");print1((2^x-1)%(2*x+1)),print1("Wagstaff(SophieGermain("k")) Mod (SophieGermain("k")*2+1) == ");print1((2^x+1)/3%(2*x+1)););print();k++);) Wagstaff(SophieGermain(1)) Mod (SophieGermain(1)*2+1) == 0 Mersenne(SophieGermain(2)) Mod (SophieGermain(2)*2+1) == 0 Wagstaff(SophieGermain(3)) Mod (SophieGermain(3)*2+1) == 0 Mersenne(SophieGermain(4)) Mod (SophieGermain(4)*2+1) == 0 Mersenne(SophieGermain(5)) Mod (SophieGermain(5)*2+1) == 0 Wagstaff(SophieGermain(6)) Mod (SophieGermain(6)*2+1) == 0 Wagstaff(SophieGermain(7)) Mod (SophieGermain(7)*2+1) == 0 Wagstaff(SophieGermain(8)) Mod (SophieGermain(8)*2+1) == 0 Mersenne(SophieGermain(9)) Mod (SophieGermain(9)*2+1) == 0 Wagstaff(SophieGermain(10)) Mod (SophieGermain(10)*2+1) == 0 Wagstaff(SophieGermain(11)) Mod (SophieGermain(11)*2+1) == 0 Mersenne(SophieGermain(12)) Mod (SophieGermain(12)*2+1) == 0 Wagstaff(SophieGermain(13)) Mod (SophieGermain(13)*2+1) == 0 Mersenne(SophieGermain(14)) Mod (SophieGermain(14)*2+1) == 0 Mersenne(SophieGermain(15)) Mod (SophieGermain(15)*2+1) == 0 Wagstaff(SophieGermain(16)) Mod (SophieGermain(16)*2+1) == 0 Mersenne(SophieGermain(17)) Mod (SophieGermain(17)*2+1) == 0 Mersenne(SophieGermain(18)) Mod (SophieGermain(18)*2+1) == 0 Wagstaff(SophieGermain(19)) Mod (SophieGermain(19)*2+1) == 0 Wagstaff(SophieGermain(20)) Mod (SophieGermain(20)*2+1) == 0 Mersenne(SophieGermain(21)) Mod (SophieGermain(21)*2+1) == 0 Mersenne(SophieGermain(22)) Mod (SophieGermain(22)*2+1) == 0 Mersenne(SophieGermain(23)) Mod (SophieGermain(23)*2+1) == 0 Mersenne(SophieGermain(24)) Mod (SophieGermain(24)*2+1) == 0 Mersenne(SophieGermain(25)) Mod (SophieGermain(25)*2+1) == 0 Wagstaff(SophieGermain(26)) Mod (SophieGermain(26)*2+1) == 0 Wagstaff(SophieGermain(27)) Mod (SophieGermain(27)*2+1) == 0 Wagstaff(SophieGermain(28)) Mod (SophieGermain(28)*2+1) == 0 Wagstaff(SophieGermain(29)) Mod (SophieGermain(29)*2+1) == 0 Mersenne(SophieGermain(30)) Mod (SophieGermain(30)*2+1) == 0 Mersenne(SophieGermain(31)) Mod (SophieGermain(31)*2+1) == 0 Mersenne(SophieGermain(32)) Mod (SophieGermain(32)*2+1) == 0 Mersenne(SophieGermain(33)) Mod (SophieGermain(33)*2+1) == 0 Wagstaff(SophieGermain(34)) Mod (SophieGermain(34)*2+1) == 0 Wagstaff(SophieGermain(35)) Mod (SophieGermain(35)*2+1) == 0 Mersenne(SophieGermain(36)) Mod (SophieGermain(36)*2+1) == 0 Wagstaff(SophieGermain(37)) Mod (SophieGermain(37)*2+1) == 0 So: Every: (4^(SophieGermain(x))-1)/3 Mod (SophieGermain(x)*2+1) == 0 So that: (Mersenne(SophieGermain(x))*Wagstaff(SophieGermain(x))) Mod (SophieGermain(x)*2+1) == 0 In conclusion: If isprime(2*p+1)&&(p%4==3) then (2*p+1) | Mersenne(p) If isprime(2*p+1)&&(p%4==1) then (2*p+1) | Wagstaff(p) Do you think that this can be related with the "new Mersenne Prime Conjecture" too? Last fiddled with by JCoveiro on 2022-02-06 at 19:54