OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
f1[n_]:=n-(Floor[Sqrt[n]])^2; f2[n_]:=n+(Floor[Sqrt[n]])^2; lst={}; Do[p=Prime[n]; If[PrimeQ[f1[p]]&&PrimeQ[f2[p]], AppendTo[lst, p]], {n, 8!}]; lst
fQ[n_]:=Module[{c=Floor[Sqrt[n]]^2}, AllTrue[n+{c, -c}, PrimeQ]]; Select[ Prime[ Range[1200]], fQ] (* Harvey P. Dale, Dec 15 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Feb 25 2010
STATUS
approved