|
|
A065124
|
|
a(n) = (sum of digits of a(n-2)) + a(n-1); a(0) = 0 and a(1) = 1.
|
|
2
|
|
|
0, 1, 1, 2, 3, 5, 8, 13, 21, 25, 28, 35, 45, 53, 62, 70, 78, 85, 100, 113, 114, 119, 125, 136, 144, 154, 163, 173, 183, 194, 206, 220, 228, 232, 244, 251, 261, 269, 278, 295, 312, 328, 334, 347, 357, 371, 386, 397, 414, 433, 442, 452, 462, 473, 485, 499, 516
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
MAPLE
|
a[0]:=0:a[1]:=1:a[2]:=1:for n from 3 to 100 do d:=a[n-1]:s:=0:while d>0 do c:=d mod 10:s:=s+c:d:=(d-c)/10 od:e:=a[n-2]:t:=0:while e>0 do c:=e mod 10:t:=t+c:e:=(e-c)/10 od:a[n]:=a[n-1]+t od: seq(a[n], n=0..56); # Zerinvary Lajos, Mar 19 2009
|
|
MATHEMATICA
|
a[0] = 0; a[1] = 1; a[n_] := a[n] = Apply[ Plus, IntegerDigits[ a[n - 2] ]] + a[n - 1]; Table[ a[n], {n, 0, 100} ]
|
|
PROG
|
(PARI) SumD(x)= { local(s=0); while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } { for (n=0, 1000, if (n>1, a=SumD(a2) + a1; a2=a1; a1=a, if (n, a=a1=1, a=a2=0)); write("b065124.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 10 2009
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|