OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000 (terms 0..300 from T. D. Noe)
MAPLE
R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
a:= proc(n) option remember; `if`(n<2, n,
R(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 ]=Plus@@Map[ Plus@@(#*Array[ 10^#&, Length[ # ], 0 ])&, Map[ IntegerDigits, {BIF[ n-1 ], BIF[ n-2 ]} ] ]; Array[ BIF, 40, 0 ]
nxt[{a_, b_}]:={b, Total[FromDigits/@Reverse/@IntegerDigits[ {a, b}]]}; Transpose[NestList[nxt, {0, 1}, 40]][[1]] (* Harvey P. Dale, Jun 22 2011 *)
nxt[{a_, b_}]:={b, Total[IntegerReverse[{a, b}]]}; NestList[nxt, {0, 1}, 40][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 07 2019 *)
PROG
(Haskell)
a001129 n = a001129_list !! n
a001129_list = 0 : 1 : zipWith (+) iccanobifs (tail iccanobifs)
where iccanobifs = map a004086 a001129_list
-- Reinhard Zumkeller, Jan 01 2012
(Python)
A001129_list, r1, r2 = [0, 1], 1, 0
for _ in range(10**2):
l, r2 = r1+r2, r1
r1 = int(str(l)[::-1])
A001129_list.append(l) # Chai Wah Wu, Jan 03 2015
(Magma) a:=[0, 1]; [n le 2 select a[n] else Seqint(Reverse(Intseq(Self(n-1)))) + Seqint(Reverse(Intseq(Self(n-2)))):n in [1..35]]; // Marius A. Burtea, Oct 23 2019
CROSSREFS
KEYWORD
nonn,base,easy,nice
AUTHOR
STATUS
approved