OFFSET
1,3
COMMENTS
If a(n) = 1, then n is in A006314.
EXAMPLE
10^8+1^8 = 100000001 is not prime. 10^8+2^8 = 100000256 is not prime. 10^8+3^8 = 100006561 is prime. Thus, a(10) = 3.
MATHEMATICA
lnk[n_]:=Module[{c=n^8, k=1}, While[CompositeQ[c+k^8], k++]; k]; Array[lnk, 80] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 12 2020 *)
PROG
(Python)
import sympy
from sympy import isprime
def a(n):
..for k in range(10**4):
....if isprime(n**8+k**8):
......return k
n = 1
while n < 100:
..print(a(n))
..n += 1
(PARI) a(n)=for(k=1, 10^3, if(ispseudoprime(n^8+k^8), return(k)));
n=1; while(n<100, print(a(n)); n+=1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, May 17 2014
STATUS
approved