OFFSET
0,2
COMMENTS
Conjecture: a(n) > 1 for all n > 4.
a(n) = 1, n > 1, is equivalent to F(n) = 2^(2^n) + 1 being a Fermat prime, because the Mersenne number M(2^n) = 2^(2^n) - 1 is prime only for n = 1 (since divisible by 3 for all n >= 1), where F(1) is also prime. - The two considered numbers can also be written 2*k*A077585(n) + 1 resp. 2*k*A000051(A000225(n)) - 1. - M. F. Hasler, Mar 05 2020
EXAMPLE
a(0) = 1 because 1*2^(2^0) - 2*1 + 1 = 1 is a nonprime and 1*2^(2^0) + 2*1 - 1 = 3 is a prime.
a(1) = 4 because 4*2^(2^1) - 2*4 + 1 = 9 is a composite and 4*2^(2^1) + 2*4 - 1 = 23 is a prime.
a(2) = 1 because 1*2^(2^2) - 2*1 + 1 = 15 is a composite and 1*2^(2^2) + 2*1 - 1 = 17 is a prime.
a(3) = 1 because 1*2^(2^3) - 2*1 + 1 = 255 is a composite and 1*2^(2^3) + 2*1 - 1 = 257 is a prime.
a(4) = 1 because 1*2^(2^4) - 2*1 + 1 = 65535 is a composite and 1*2^(2^4) + 2*1 - 1 = 65537 is a prime.
PROG
(PARI) a(n) = {my(k=1, m=2^2^n); while(ispseudoprime(k*m-2*k+1)-ispseudoprime(k*m+2*k-1)==0, k++); k; } \\ Jinyuan Wang, Feb 26 2020
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Juri-Stepan Gerasimov, Feb 26 2020
EXTENSIONS
Offset changed to 0 and a(11)-a(14) from Jinyuan Wang, Feb 26 2020
STATUS
approved