OFFSET
1,1
COMMENTS
There are exactly 5^2 squares less than or equal to 1000^2 which are the sum of twin prime pairs.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
36 (square) = 6^2 = 17 + 19 (twin prime pair).
MATHEMATICA
lst={}; Do[p=n^2; If[PrimeQ[p/2-1]&&PrimeQ[p/2+1], AppendTo[lst, p]], {n, 0, 7!, 2}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 25 2008 *)
PROG
(Magma) [k^2:k in [2..1700 by 2]| IsPrime(k^2 div 2 -1) and IsPrime(k^2 div 2 +1)]; // Marius A. Burtea, Jan 01 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Amiram Eldar, Jan 01 2020
STATUS
approved