OFFSET
1,1
EXAMPLE
100 is a term because "100" starts with "1" = 1 + 0 + 0;
109 is a term because "109" starts with "10" = 1 + 0 + 9;
1346 is a term because "1346" starts with "13" = 3 + 4 + 6; etc.
MATHEMATICA
q[n_] := Module[{d = IntegerDigits[n], s, ds, nds}, s = Plus @@ d[[-3 ;; -1]]; ds = IntegerDigits[s]; nds = Length[ds]; ds == d[[1 ;; nds]]]; Select[Range[100, 1400], q] (* Amiram Eldar, Mar 16 2022 *)
PROG
(Python)
def ok(n):
s = str(n)
return n > 99 and s.startswith(str(sum(map(int, s[-3:]))))
print([k for k in range(1347) if ok(k)]) # Michael S. Branicky, Mar 16 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Mar 16 2022
STATUS
approved