OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
FORMULA
{k^2 | k, k+1, k+2 and k+3 in A061910}. = Michael S. Branicky, Feb 11 2026
EXAMPLE
81 is a term since the sum of the digits of 81, 100, 121 and 144 are 9, 1, 4 and 9, all square.
PROG
(Python)
from math import isqrt
from itertools import count, islice
def c(k): return isqrt(r:=sum(map(int, str(k))))**2 == r
def agen(): # generator of terms
c1, c2, c3, c4 = list(map(c, [1, 4, 9, 16]))
for k in count(5):
if all([c1, c2, c3, c4]): yield (k-4)**2
c1, c2, c3, c4 = c2, c3, c4, c(k*k)
print(list(islice(agen(), 32))) # Michael S. Branicky, Feb 11 2026
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 09 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 26 2002
Name clarified and a(29) onward from Michael S. Branicky, Feb 11 2026
STATUS
approved
