OFFSET
1,1
COMMENTS
a(n) = n+1 iff n is in A215431.
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..1000
EXAMPLE
The n-value for which n^128 + 1 is prime (sequence A056994) is n = 120 (where n > 1 by definition). Thus a(1) = 120.
MATHEMATICA
lnk[n_]:=Module[{k=n+1, n128=n^128}, While[!PrimeQ[n128+k^128], k++]; k]; Array[lnk, 60] (* Harvey P. Dale, Apr 22 2018 *)
PROG
(Python)
import sympy
from sympy import isprime
def a(n):
for k in range(n+1, 10**4):
if isprime(k**128+n**128):
return k
for n in range(1, 100):
print(a(n), end=', ')
(PARI) a(n)=for(k=n+1, 10^4, if(isprime(k^128+n^128), return(k)))
n=1; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jul 08 2014
STATUS
approved