OFFSET
0,1
REFERENCES
Higham, J.; Tanny, S. More well-behaved meta-Fibonacci sequences. Proceedings of the Twenty-fourth Southeastern International Conference on Combinatorics, Graph Theory, and Computing (Boca Raton, FL, 1993). Congr. Numer. 98(1993), 3-17. See Prop. 2.1.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MAPLE
f := proc(n) option remember;
if n=0 then 2
elif n=1 then 0
elif n=2 then 2
else
f(n-1-f(n-1))+f(n-2-f(n-2));
fi;
end proc;
[seq(f(n), n=0..2000)];
MATHEMATICA
f[n_] := f[n] = Switch[n, 0, 2, 1, 0, 2, 2, _,
f[n-1-f[n-1]]+f[n-2-f[n-2]]];
Table[f[n], {n, 0, 100}] (* Jean-François Alcover, Oct 02 2024 *)
PROG
(Haskell)
a244478 n = a244478_list !! n
a244478_list = 2 : 0 : 2 : zipWith (+) xs (tail xs)
where xs = map a244478 $ zipWith (-) [1..] $ tail a244478_list
-- Reinhard Zumkeller, Jul 05 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 02 2014
STATUS
approved