A075577 k^2 is a term if k^2 + (k-1)^2 and k^2 + (k+1)^2 are primes.
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
Keywords
Examples
900 = 30^2 is a term because 30^2 + 29^2 = 1741 is prime and 30^2 + 31^2 = 1861 is prime.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A109306.
Programs
-
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}]
-
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
Formula
a(n) = A109306(n)^2. - David A. Corneth, Apr 25 2021
Extensions
More terms from Labos Elemer, Sep 27 2002
a(34) and beyond from Michael S. Branicky, Apr 25 2021
Comments