A265497 Numbers n such that n*2^127 - 1 is prime.
1, 103, 190, 289, 460, 483, 511, 534, 651, 793, 820, 880, 901, 939, 945, 958, 1045, 1168, 1195, 1198, 1216, 1374, 1408, 1479, 1489, 1500, 1521, 1534, 1539, 1569, 1599, 1623, 1630, 1671, 1678, 1875, 1938, 1939, 1963, 1996, 2028, 2136, 2140, 2166, 2179, 2289
Offset: 1
Examples
n = 1 is a term since 2^127 - 1 is prime (the 12th Mersenne prime).
Programs
-
MATLAB
if isprime(n*2^127-1) disp(n) end
-
Magma
[n: n in [1..3*10^3] |IsPrime(n*2^127-1)]; // Vincenzo Librandi, Dec 10 2015
-
Mathematica
Select[Range@ 2560, PrimeQ[# 2^127 - 1] &] (* Michael De Vlieger, Dec 09 2015 *)
-
PARI
is(n)=ispseudoprime(n*2^127 - 1) \\ Anders Hellström, Dec 09 2015
Comments