OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
MAPLE
R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
a:= proc(n) option remember; `if`(n<2, n,
a(n-1) +R(a(n-2)))
end:
seq(a(n), n=0..50); # Alois P. Heinz, Jun 18 2014
MATHEMATICA
Clear[ Bif ]; Bif[ 0 ]=0; Bif[ 1 ]=1; Bif[ n_Integer ] := Bif[ n ]=Bif[ n-1 ]+Plus@@(IntegerDigits[ Bif[ n-2 ], 10 ]//(#*Array[ 10^#&, Length[ # ], 0 ])&); Array[ Bif, 40, 0 ]
nxt[{a_, b_}]:={b, IntegerReverse[a]+b}; NestList[nxt, {0, 1}, 40][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 04 2018 *)
PROG
(PARI) lista(nn) = my(v=vector(nn)); v[2]=1; for(n=3, nn, v[n] = v[n-1] + fromdigits(Vecrev(digits(v[n-2])))); v \\ Jinyuan Wang, Aug 01 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved