OFFSET
1,1
COMMENTS
Subsequence of A155568 (where a,b,c,d may be zero).
PROG
(PARI) isA155578(n, /* optional 2nd arg allows us to get other sequences */c=[7, 1]) = { for(i=1, #c, for(b=1, sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) & next(2)); return); 1}
for( n=1, 999, isA155578(n) & print1(n", "))
(Python)
from math import isqrt
def aupto(limit):
cands = range(1, isqrt(limit)+1)
left = set(a**2 + b**2 for a in cands for b in cands)
right = set(c**2 + 7*d**2 for c in cands for d in cands)
return sorted(k for k in left & right if k <= limit)
print(aupto(673)) # Michael S. Branicky, Aug 29 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Jan 25 2009
STATUS
approved