OFFSET
1,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..270
EXAMPLE
a(4) = 4211 as a(3) = 211 which has digital sum 2 + 1 + 1 = 4. Concatenating 4 and 211 gives 4211. - David A. Corneth, Jun 16 2024
MATHEMATICA
NestList[DigitSum[#]*10^IntegerLength[#] + # &, 1, 20] (* Paolo Xausa, Jun 16 2024 *)
PROG
(PARI) first(n) = {
my(res = vector(n));
res[1] = 1;
for(i = 2, n,
res[i] = sumdigits(res[i-1])*10^(#digits(res[i-1]))+res[i-1]
); res
} \\ David A. Corneth, Jun 16 2024
(Python)
from itertools import islice
def A372075_gen(): # generator of terms
yield (a:=1)
while True: yield (a:=a+10**len(s:=str(a))*sum(map(int, s)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 16 2024
STATUS
approved