OFFSET
1,1
EXAMPLE
38 is a term because 38^2 + 37^2 = 2813 = 29*97 (semiprime) and 38^2 + 39^2 = 2965 = 5*593 (semiprime).
MATHEMATICA
Select[Range[2, 400], Plus@@Last/@FactorInteger[ #^2+(#+1)^2]==Plus@@Last/@FactorInteger[ #^2+(#-1)^2]==2&]
PROG
(Python)
from sympy import factorint
def issemiprime(n): return sum(factorint(n).values()) == 2
def ok(n): return all(issemiprime(n**2 + (n+k)**2) for k in [1, -1])
print([k for k in range(296) if ok(k)]) # Michael S. Branicky, Nov 16 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 25 2005
EXTENSIONS
Title corrected by Michael S. Branicky, Nov 16 2021
STATUS
approved