OFFSET
1,1
MATHEMATICA
a={}; Do[p1=Prime[n]; p2=Prime[n+1]; pp=p1^2+p2^3; If[PrimeQ[pp-1]&&PrimeQ[pp+1], AppendTo[a, p1]], {n, 16^3}]; Print[a];
atpQ[n_]:=Module[{c=First[n]^2+Last[n]^3}, And@@PrimeQ[{c-1, c+1}]]; Transpose[Select[Partition[Prime[Range[5000]], 2, 1], atpQ]][[1]] (* Harvey P. Dale, Sep 11 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 15 2008
EXTENSIONS
More terms from Harvey P. Dale, Sep 11 2011
Typo in a(39) corrected by Seth A. Troisi, May 13 2022
STATUS
approved