OFFSET
0,4
EXAMPLE
M(0)^2 + 2*1 = 0 + 2 = 2 is prime, thus a(0)=1.
M(1)^2 + 2*1 = 1 + 2 = 3 is prime, thus a(1)=1.
M(2) = 2^2-1 = 3 and 3*3 + 2k = 11 is a prime for k=1, thus a(2) = 1.
M(3) = 2^3-1 = 7 and 7*7 + 2k = 53 is a prime for k=2 but not for k=1, thus a(3) = 2.
M(4) = 2^4-1 = 15 and 15*15 + 2k = 227 is a prime for k=1, thus a(4) = 1.
PROG
(PARI) a(n)=for(k=1, 9e9, ispseudoprime((2^n-1)^2+2*k)&&return(k))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jul 30 2015
STATUS
approved