OFFSET
1,1
COMMENTS
All the terms in the sequence are congruent to 1 mod 3.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..3085
EXAMPLE
19 is in the sequence because 19 is a prime: 19 - 2 = 17 and 19^3 - 2 = 6857 are also prime.
151 is in the sequence because 151 is a prime: 151 - 2 = 149 and 151^3 - 2 = 3442949 are also prime.
MAPLE
KD := proc() local a, b, d; a:=ithprime(n); b:=a-2; d:=a^3-2; if isprime(b)and isprime(d) then RETURN (a); fi; end: seq(KD(), n=1..10000);
MATHEMATICA
Select[Prime[Range[2000]], PrimeQ[# - 2] && PrimeQ[#^3 - 2] &]
PROG
(PARI) s=[]; forprime(p=2, 22000, if(isprime(p-2) && isprime(p^3-2), s=concat(s, p))); s \\ Colin Barker, Apr 02 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 01 2014
STATUS
approved