OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..155
EXAMPLE
13 is prime and appears in the sequence because prime(prime(13^2)) - 2 = 8009 which is also prime.
17 is prime and appears in the sequence because prime(prime(17^2)) - 2 = 16139 which is also prime.
MAPLE
KD := proc() local a, b; a:=ithprime(n); b:=ithprime(ithprime(a^2))-2; if isprime (b) then RETURN (a); fi; end: seq(KD(), n=1..500);
MATHEMATICA
p[n_] := PrimeQ[Prime[Prime[n^2]] - 2]; n = 0; Do[If[p[Prime[m]], n = n + 1; Print[n, " ", Prime[m]]], {m, 1000}] (* Bajpai *)
Select[Prime[Range[105]], PrimeQ[Prime[Prime[#^2]] - 2] &] (* Wouter Meeussen, Feb 09 2014 *)
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
K. D. Bajpai, Feb 07 2014
STATUS
approved