OFFSET
0,5
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 0..2664
MAPLE
rev:= proc(n) local i, L;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
A[0]:= 0: A[1]:= 0: A[2]:= 1:
RA[0]:=0: RA[1]:= 0: RA[2]:= 1:
for n from 3 to 100 do
A[n]:= RA[n-1]+RA[n-2]+RA[n-3];
RA[n]:= rev(A[n]);
od:
seq(A[n], n=0..100); # Robert Israel, Aug 04 2016
MATHEMATICA
R[n_]:=FromDigits[Reverse[IntegerDigits[n]]]; Clear[a]; a[0]=0; a[1]=0; a[2]=1; a [n_]:=a[n]=R[a[n-1]]+R[a[n-2]]+R[a[n-3]]; Table[a[n], {n, 0, 40}]
nxt[{a_, b_, c_}]:={b, c, Total[IntegerReverse/@{a, b, c}]}; Transpose[ NestList[ nxt, {0, 0, 1}, 40]][[1]] (* The program uses the IntegerReverse function from Mathematica version 10 *) (* Harvey P. Dale, Nov 28 2015 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jonathan Vos Post and Ray Chandler, Dec 30 2004
STATUS
approved