%I #19 Nov 20 2023 18:52:10
%S 0,1,2,14,35,78,135,216,268,330,413,417,451,525,540,595,600,656,662,
%T 728,755,842,900,929,938,1037,1118,1189,1270,1361,1362,1373,1394,1425,
%U 1466,1517,1578,1649,1730,1821,1822,1833,1854,1885,1926,1977
%N Let a(1) = 0, a(2) = 1; and a(n) = a(n-1) + [the two-digit integer split by the comma which separates a(n-1) and a(n-2)].
%H N. J. A. Sloane, <a href="/A134647/b134647.txt">Table of n, a(n) for n = 1..20000</a> (First 1000 terms from _Harvey P. Dale_)
%e 135 = 78 + 57, since the comma in 35,78 splits the number 57.
%p # to compute the first M terms, from _N. J. A. Sloane_, Nov 20 2023
%p Ldigit:=proc(n) local v; v:=convert(n, base, 10); v[-1]; end;
%p M:=100;
%p s:=[0,1]; i:=0; j:=1;
%p for m from 2 to M do
%p k := j + 10*(i mod 10) + Ldigit(j); s:=[op(s),k]; i:=j; j:=k; od:
%p s;
%t a[1]=0;a[2]=1;
%t a[n_]:=a[n]=a[n-1]+10 Mod[a[n-2],10]+IntegerDigits[a[n-1]][[1]];
%t Table[a[k],{k,100}]
%t nxt[{a_,b_}]:={b,b+10IntegerDigits[a][[-1]]+First[IntegerDigits[b]]}; NestList[ nxt,{0,1},50][[All,1]] (* _Harvey P. Dale_, Jul 01 2020 *)
%Y Cf. A121805, A367357 (first differences).
%K nonn,base
%O 1,3
%A _N. J. A. Sloane_, Oct 17 2009, based on a posting to the Sequence Fans Mailing List by Eric Angelini, Oct 15 2009
%E Corrected and extended with Mma code by _Farideh Firoozbakht_, Oct 15 2009
|