OFFSET
1,2
LINKS
C. Deugau and F. Ruskey, Complete k-ary Trees and Generalized Meta-Fibonacci Sequences, J. Integer Seq., Vol. 12. [This is a later version than that in the GenMetaFib.html link]
C. Deugau and F. Ruskey, Complete k-ary Trees and Generalized Meta-Fibonacci Sequences
FORMULA
If n=1, a(n)=1. If 2 <= n <= 4, then a(n)=n. If n>4 then a(n)=a(n-a(n-1)) + a(n-1-a(n-2)) + a(n-2-a(n-3)) + a(n-3-a(n-4)).
G.f.: (z / (1 - z)) * Product_{i>=1} (1 - z^(4 * [i])) / (1 - z^[i]), where [i] = (4^i - 1) / 3.
MAPLE
a := proc(n)
option remember;
if n <= 1 then return 1 end if;
if n <= 4 then return n end if;
return add(a(n - i + 1 - a(n - i)), i = 1 .. 4)
end proc
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca), Jun 20 2006
STATUS
approved