OFFSET
1,1
COMMENTS
If n == 0 (mod 3) then the exponent k must be odd, if n>1 and n == 1 (mod 3) then k must be even and if n == 2 (mod 3) then k can be either.
Records: 3, 5, 7, 11, 13, 17, 19, 23, 31, 47, 79, 317, 1163, 1048847, 536871199, 2^955 + 773, ..., . - Robert G. Wilson v
FORMULA
a(n) = 2^A067760(n-1) + 2n-1 if A067760(n-1) > 0, 0 if A067760(n-1) = 0. - Robert Israel, Jan 14 2017
EXAMPLE
For n = 4, p = 2 -> 2^2+(2*4-1) = 11, the fourth entry because 2^1+(2*4-1) which equals 9 is not a prime.
MATHEMATICA
f[n_] := Block[{p = 1}, While[ !PrimeQ[2^p + 2n - 1], p++ ]; 2^p + 2n - 1]; Array[f, 64] (* Robert G. Wilson v *)
PROG
(PARI) g2(n) = forstep(k=1, n, 2, for(p=1, n, y=k+2^p; if(isprime(y), print1(y", "); break)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Oct 08 2006
EXTENSIONS
Edited and extended by Robert G. Wilson v, Nov 11 2006
Name edited by Robert Israel, Jan 14 2017
STATUS
approved