OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..8879
EXAMPLE
13 is prime and appears in the sequence because (13^3 + 2)/3 = 733 which is a prime.
31 is prime and appears in the sequence because (31^3 + 2)/3 = 9931 which is a prime.
MAPLE
KD:= proc() local a, b; a:=ithprime(n); b:=(a^3+2)/3; if b=floor(b) and isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..1000);
MATHEMATICA
Select[Prime[Range[500]], PrimeQ[(#^3 + 2)/3] &]
n = 0; Do[If[PrimeQ[(Prime[k]^3 + 2)/3], n = n + 1; Print[n, " ", Prime[k]]], {k, 1, 200000}] (* b-file *)
PROG
(PARI) s=[]; forprime(p=2, 8000, if((p^3+2)%3==0 && isprime((p^3+2)/3), s=concat(s, p))); s \\ Colin Barker, Apr 16 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 16 2014
STATUS
approved