[go: up one dir, main page]

login
A372074
a(1) = 1; thereafter a(n+1) is obtained by appending the digit-sum of a(n) to a(n).
2
1, 11, 112, 1124, 11248, 1124816, 112481623, 11248162328, 1124816232838, 112481623283849, 11248162328384962, 1124816232838496270, 112481623283849627077, 11248162328384962707791, 11248162328384962707791101, 11248162328384962707791101103, 11248162328384962707791101103107, 11248162328384962707791101103107115
OFFSET
1,2
LINKS
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 *)
PROG
(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
CROSSREFS
Cf. A372075.
Inspired by A359143.
Sequence in context: A375101 A361350 A361501 * A132939 A059996 A132938
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 16 2024
STATUS
approved