OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..781
Jeffrey Barnett, Counting Balanced Tree Shapes
FORMULA
a(0) = a(1) = 1; a(5n+1+m) = (5 choose m) * a(n+1)^m * a(n)^(5-m), where n >= 0 and 0 <= m <= 5.
MAPLE
a:= proc(n) option remember; local m, r; if n<2 then 1 else
r:= iquo(n-1, 5, 'm'); binomial(5, m) *a(r+1)^m *a(r)^(5-m) fi
end:
seq(a(n), n=0..50); # Alois P. Heinz, Apr 10 2013
MATHEMATICA
a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n - 1, k]; Binomial[k, m]*a[r + 1, k]^m*a[r, k]^(k - m)]]];
a[n_] := a[n, 5];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jeffrey Barnett, Jul 24 2007
STATUS
approved