OFFSET
1,1
COMMENTS
See A064712 for the sequence of values of n such that n^2-prime(n) is prime. - John W. Layman, May 29 2012
All terms are even. - M. F. Hasler, Jun 02 2012
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
A[1]:= 2: p:= 3: count:= 1:
for n from 4 to 10^4 by 2 do
p:= nextprime(nextprime(p));
if isprime(n^4-p) then
count:= count+1;
A[count]:= n;
fi
od:
seq(A[i], i=1..count); # Robert Israel, Jun 20 2017
MATHEMATICA
Reap[Do[If[PrimeQ[n^4-Prime[n]], Sow[n]], {n, 2, 1200, 2}]][[2, 1]]
PROG
(Magma) [n: n in [1..1200]|IsPrime(n^4-NthPrime(n))];
(PARI) for(n=1, 999, isprime(n^4-prime(n))&print1(n", ")) \\ M. F. Hasler, Jun 02 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, May 29 2012
STATUS
approved