A372074 a(1) = 1; thereafter a(n+1) is obtained by appending the digit-sum of a(n) to a(n).
1, 11, 112, 1124, 11248, 1124816, 112481623, 11248162328, 1124816232838, 112481623283849, 11248162328384962, 1124816232838496270, 112481623283849627077, 11248162328384962707791, 11248162328384962707791101, 11248162328384962707791101103, 11248162328384962707791101103107, 11248162328384962707791101103107115
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..270
Programs
-
Maple
s:=1; j1:=[s]; f:=proc(n) local t1,t2; t1:=digsum(n); t2:=length(t1); n*10^t2 + t1; end; for n from 1 to 24 do s:=f(s); j1:=[op(j1),s]; od: j1;
-
Mathematica
NestList[With[{s = DigitSum[#]}, #*10^IntegerLength[s] + s] &, 1, 20] (* Paolo Xausa, Jun 16 2024 *)
-
Python
from itertools import islice def A372074_gen(): # generator of terms yield (a:=1) while True: yield (a:=(s:=sum(map(int,str(a))))+a*10**len(str(s))) A372074_list = list(islice(A372074_gen(),20)) # Chai Wah Wu, Jun 16 2024