OFFSET
1,1
COMMENTS
For a(2) onwards, a(n) == 0 (mod 25).
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A109306(n)^2. - David A. Corneth, Apr 25 2021
EXAMPLE
900 = 30^2 is a term because 30^2 + 29^2 = 1741 is prime and 30^2 + 31^2 = 1861 is prime.
MATHEMATICA
Do[s=n^2+(n-1)^2; s1=n^2+(n+1)^2; If[PrimeQ[s]&&PrimeQ[s1], Print[n^2]], {n, 1, 5000}]
PROG
(Python)
from sympy import isprime
def aupto(limit):
alst, is2 = [], False
for k in range(1, int(limit**.5) + 2):
is1, is2 = is2, isprime(k**2 + (k+1)**2)
if is1 and is2: alst.append(k**2)
return alst
print(aupto(1500000)) # Michael S. Branicky, Apr 25 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 25 2002
EXTENSIONS
More terms from Labos Elemer, Sep 27 2002
a(34) and beyond from Michael S. Branicky, Apr 25 2021
STATUS
approved