OFFSET
1,2
EXAMPLE
4 is in the sequence because 4^2*2^4 - 1 = 16*16 - 1 = 255 is not a prime number but 4^2*2^4 + 1 = 16*16 + 1 = 257 is a prime number.
PROG
(PARI) isok(n) = isp1 = isprime(2^n*n^2-1); isp2 = isprime(2^n*n^2+1); (isp1 || isp2 && !(isp1 && isp2)); \\ Michel Marcus, Mar 05 2014
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Juri-Stepan Gerasimov, Feb 24 2014
EXTENSIONS
Corrected by R. J. Mathar, Feb 26 2014
STATUS
approved