OFFSET
1,1
COMMENTS
Checking k up through 1024 suggests that the sequence may continue -1, 2, 4, 2, -1, 4, 2, -1, 2, -1, 16, 2, 8, 2, 2, 4, 4, -1, 2, 2, 4, 2, 4, 2, 2, 4, 4, 4, 2, ...
For any a>1 and b>1, a^k + b^k is composite for all odd k>1. Hence if n^k + (n+1)^k is prime then k must be a power of 2.
It is known that a(11) > 2^22. Is it possible that 11^2^m + 12^2^m is composite for all m > 0?
LINKS
EXAMPLE
a(3)=4 because 3^2 + 4^2 = 25 is not prime, but 3^4 + 4^4 = 337 is prime.
MATHEMATICA
lst={}; For[n=1, n<=100, n++, k=2; While[k<=2^10 && !PrimeQ[n^k+(n+1)^k], k=2*k]; If[k<=2^10, AppendTo[lst, k], AppendTo[lst, -1]]]; lst
CROSSREFS
KEYWORD
hard,more,nonn
AUTHOR
T. D. Noe, Nov 14 2002
STATUS
approved