login
A236687
Primes p such that prime(p^2) - 2 is also prime.
5
2, 11, 17, 47, 61, 137, 163, 229, 239, 263, 317, 389, 419, 449, 467, 557, 571, 617, 619, 653, 709, 937, 953, 1009, 1033, 1087, 1123, 1129, 1181, 1249, 1481, 1831, 1987, 2003, 2099, 2207, 2381, 2441, 2579, 2663, 2707, 3109, 3457, 3833, 4013, 4463, 4519, 4783
OFFSET
1,1
LINKS
EXAMPLE
17 is prime and appears in the sequence because prime(17^2) = 1879 and 1879 - 2 = 1877, which is also prime.
47 is prime and appears in the sequence because prime(47^2) = 19471 and 19471 - 2 = 19469, which is also prime.
MAPLE
KD := proc() local a, b, d; a:=ithprime(n); b:=ithprime(a^2)-2; if isprime (b) then RETURN (a); fi; end: seq(KD(), n=1..500);
PROG
(PARI)
default(primelimit, 2^31)
s=[]; forprime(p=2, 5000, if(isprime(prime(p^2)-2), s=concat(s, p))); s \\ Colin Barker, Jan 30 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Jan 29 2014
STATUS
approved