Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Feb 11 2014 16:48:35
%S 13,17,167,179,211,223,337,373,541,661,743,751,1063,1129,1217,1607,
%T 1697,1741,1913,2017,2039,2083,2293,2389,2447,2459,2543,2677,2693,
%U 2711,2851,2909,3083,3191,3209,3259,3571,3889,3917
%N Primes p such that prime(prime(p^2)) - 2 is also prime.
%H K. D. Bajpai, <a href="/A237423/b237423.txt">Table of n, a(n) for n = 1..155</a>
%e 13 is prime and appears in the sequence because prime(prime(13^2)) - 2 = 8009 which is also prime.
%e 17 is prime and appears in the sequence because prime(prime(17^2)) - 2 = 16139 which is also prime.
%p 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);
%t 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 *)
%t Select[Prime[Range[105]], PrimeQ[Prime[Prime[#^2]] - 2] &] (* _Wouter Meeussen_, Feb 09 2014 *)
%Y Cf. A000040, A234695, A236119, A236687, A236688, A237283
%K nonn,base,less
%O 1,1
%A _K. D. Bajpai_, Feb 07 2014