%I #22 Sep 08 2022 08:46:02
%S 2,6,40,76,144,146,148,166,168,174,186,192,210,220,222,230,238,240,
%T 258,290,338,364,372,378,384,398,400,402,442,446,482,492,532,536,554,
%U 570,606,628,654,700,740,882,888,944,954,964,966,978,1038,1040,1072,1080
%N Numbers n such that n^4 - prime(n) is prime.
%C See A064712 for the sequence of values of n such that n^2-prime(n) is prime. - _John W. Layman_, May 29 2012
%C All terms are even. - _M. F. Hasler_, Jun 02 2012
%H Robert Israel, <a href="/A212883/b212883.txt">Table of n, a(n) for n = 1..10000</a>
%p A[1]:= 2: p:= 3: count:= 1:
%p for n from 4 to 10^4 by 2 do
%p p:= nextprime(nextprime(p));
%p if isprime(n^4-p) then
%p count:= count+1;
%p A[count]:= n;
%p fi
%p od:
%p seq(A[i],i=1..count); # _Robert Israel_, Jun 20 2017
%t Reap[Do[If[PrimeQ[n^4-Prime[n]],Sow[n]],{n,2,1200,2}]][[2,1]]
%o (Magma) [n: n in [1..1200]|IsPrime(n^4-NthPrime(n))];
%o (PARI) for(n=1,999,isprime(n^4-prime(n))&print1(n",")) \\ _M. F. Hasler_, Jun 02 2012
%Y Cf. A064712, A212881.
%K nonn
%O 1,1
%A _Zak Seidov_, May 29 2012
|