This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A072921 #21 Oct 01 2024 15:45:54 %S A072921 1,2,5,13,25,44,71,106,148,203,263,334,415,506,608,724,853,998,1169, %T A072921 1357,1561,1778,2018,2269,2539,2828,3137,3460,3796,4157,4535,4930, %U A072921 5341,5765,6212,6670,7147,7643,8159,8698,9268,9863,10484,11122 %N A072921 a(1)=1; a(n) = a(n-1) + [sum of all decimal digits present so far in the sequence]. %H A072921 Alois P. Heinz, <a href="/A072921/b072921.txt">Table of n, a(n) for n = 1..1000</a> %F A072921 a(1)=1, a(2)=2; a(n+1)=2a(n)-a(n-1)+sod(a(n)) (sod = "sum of digits"). - _Farideh Firoozbakht_, Oct 01 2009 %F A072921 Asymptotically it seems a(n)~c*n^2*log(n) for c~1.99... - _Benoit Cloitre_, Oct 07 2009 %p A072921 b:= proc(n) option remember; local m; %p A072921 m:= a(n); %p A072921 `if`(n=1, 0, b(n-1)); %p A072921 while m>0 do %+ irem(m, 10, 'm') od; % %p A072921 end: %p A072921 a:= proc(n) option remember; %p A072921 `if`(n=1, 1, a(n-1) +b(n-1)) %p A072921 end: %p A072921 seq(a(n), n=1..50); # _Alois P. Heinz_, Jun 01 2010 %t A072921 a[1]=1;a[2]=2;a[n_]:=a[n]=2*a[n-1]-a[n-2]+Apply[Plus,IntegerDigits[a[n-1]]];Table[a[n],{n,100}] (* _Farideh Firoozbakht_, Oct 01 2009 *) %t A072921 a[1] = 1; a[n_] := a[n] = a[n - 1] + Plus @@ Flatten[ Map[ IntegerDigits, Array[a, n - 1]]]; Array[a, 100] (* _Robert G. Wilson v_, Oct 01 2009 *) %o A072921 (Python) %o A072921 from itertools import islice %o A072921 def agen(): # generator of terms %o A072921 an, anp1 = 1, 2 %o A072921 while True: %o A072921 yield an %o A072921 an, anp1 = anp1, 2*anp1 - an + sum(map(int, str(anp1))) %o A072921 print(list(islice(agen(), 44))) # _Michael S. Branicky_, Oct 01 2024 %Y A072921 Cf. A007953, A152231, A152232, A152233, A152234. %K A072921 nonn,base %O A072921 1,2 %A A072921 _N. J. A. Sloane_, Oct 07 2009, based on a posting to the Sequence Fans Mailing List by _Eric Angelini_, Oct 01 2009 %E A072921 More terms from _Alois P. Heinz_, Oct 01 2009