Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Jun 16 2024 16:45:42
%S 1,11,211,4211,84211,1684211,231684211,28231684211,3828231684211,
%T 493828231684211,62493828231684211,7062493828231684211,
%U 777062493828231684211,91777062493828231684211,10191777062493828231684211,10310191777062493828231684211
%N a(1) = 1; thereafter a(n+1) is obtained by prepending the digit-sum of a(n) to a(n).
%H Paolo Xausa, <a href="/A372075/b372075.txt">Table of n, a(n) for n = 1..270</a>
%e 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
%t NestList[DigitSum[#]*10^IntegerLength[#] + # &, 1, 20] (* _Paolo Xausa_, Jun 16 2024 *)
%o (PARI) first(n) = {
%o my(res = vector(n));
%o res[1] = 1;
%o for(i = 2, n,
%o res[i] = sumdigits(res[i-1])*10^(#digits(res[i-1]))+res[i-1]
%o ); res
%o } \\ _David A. Corneth_, Jun 16 2024
%o (Python)
%o from itertools import islice
%o def A372075_gen(): # generator of terms
%o yield (a:=1)
%o while True: yield (a:=a+10**len(s:=str(a))*sum(map(int,s)))
%o A372075_list = list(islice(A372075_gen(),20)) # _Chai Wah Wu_, Jun 16 2024
%Y Cf. A004207, A007953, A372074.
%K nonn,base
%O 1,2
%A _N. J. A. Sloane_, Jun 16 2024