OFFSET
1,3
COMMENTS
If a(n) = 1, then n is in A000068.
EXAMPLE
8^4+1^4 = 4097 is not prime. 8^4+2^4 = 4112 is not prime. 8^4+3^4 = 4177 is prime. Thus, a(8) = 3.
PROG
(Python)
import sympy
from sympy import isprime
def a(n):
for k in range(10**4):
if isprime(n**4+k**4):
return k
n = 1
while n < 100:
print(a(n))
n += 1
(PARI) a(n)=for(k=1, oo, if(ispseudoprime(n^4+k^4), return(k)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, May 17 2014
STATUS
approved