login
A075577
k^2 is a term if k^2 + (k-1)^2 and k^2 + (k+1)^2 are primes.
3
4, 25, 625, 900, 1225, 4900, 7225, 10000, 12100, 50625, 52900, 67600, 81225, 84100, 102400, 152100, 168100, 225625, 240100, 245025, 265225, 348100, 462400, 483025, 504100, 562500, 577600, 714025, 902500, 1166400, 1210000, 1288225, 1380625, 1416100, 1428025
OFFSET
1,1
COMMENTS
For a(2) onwards, a(n) == 0 (mod 25).
LINKS
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
Cf. A109306.
Sequence in context: A086216 A167041 A123129 * A004019 A302092 A277110
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