A077659 a(n) = smallest k>1 such that the sum n^k + (n+1)^k is prime, or -1 if no such k exists.
2, 2, 4, 2, 2, 4, 2, 4, 2, 32
Offset: 1
Examples
a(3)=4 because 3^2 + 4^2 = 25 is not prime, but 3^4 + 4^4 = 337 is prime.
Links
Programs
-
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
Comments