login
a(1) = 1; thereafter a(n+1) is obtained by appending the digit-sum of a(n) to a(n).
2

%I #22 Jun 16 2024 16:45:46

%S 1,11,112,1124,11248,1124816,112481623,11248162328,1124816232838,

%T 112481623283849,11248162328384962,1124816232838496270,

%U 112481623283849627077,11248162328384962707791,11248162328384962707791101,11248162328384962707791101103,11248162328384962707791101103107,11248162328384962707791101103107115

%N a(1) = 1; thereafter a(n+1) is obtained by appending the digit-sum of a(n) to a(n).

%H Paolo Xausa, <a href="/A372074/b372074.txt">Table of n, a(n) for n = 1..270</a>

%p s:=1; j1:=[s];

%p f:=proc(n) local t1,t2;

%p t1:=digsum(n);

%p t2:=length(t1); n*10^t2 + t1; end;

%p for n from 1 to 24 do s:=f(s); j1:=[op(j1),s]; od:

%p j1;

%t NestList[With[{s = DigitSum[#]}, #*10^IntegerLength[s] + s] &, 1, 20] (* _Paolo Xausa_, Jun 16 2024 *)

%o (Python)

%o from itertools import islice

%o def A372074_gen(): # generator of terms

%o yield (a:=1)

%o while True: yield (a:=(s:=sum(map(int,str(a))))+a*10**len(str(s)))

%o A372074_list = list(islice(A372074_gen(),20)) # _Chai Wah Wu_, Jun 16 2024

%Y Cf. A372075.

%Y Inspired by A359143.

%K nonn,base

%O 1,2

%A _N. J. A. Sloane_, Jun 16 2024