A238749 Exponents of third Mersenne prime pair: numbers n such that 2^n - 5 and 5*2^n - 1 are both prime.
4, 8, 10, 12, 18, 32
Offset: 1
Examples
a(1) = 4 because 2^4 - 5 = 11 and 5*2^4 - 1 = 79 are both primes.
Programs
-
Magma
[n: n in [0..100] | IsPrime(2^n-5) and IsPrime(5*2^n-1)]; // Vincenzo Librandi, May 17 2015
-
Mathematica
fQ[n_] := PrimeQ[2^n - 5] && PrimeQ[5*2^n - 1]; k = 1; While[ k < 15001, If[fQ@ k, Print@ k]; k++] (* Robert G. Wilson v, Mar 05 2014 *) Select[Range[1000], PrimeQ[2^# - 5] && PrimeQ[5 2^# - 1] &] (* Vincenzo Librandi, May 17 2015 *)
-
PARI
isok(n) = isprime(2^n - 5) && isprime(5*2^n - 1); \\ Michel Marcus, Mar 04 2014
Comments