|
|
A131890
|
|
a(n) is the number of shapes of balanced trees with constant branching factor 4 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.
|
|
6
|
|
|
1, 1, 4, 6, 4, 1, 16, 96, 256, 256, 1536, 3456, 3456, 1296, 3456, 3456, 1536, 256, 256, 96, 16, 1, 64, 1536, 16384, 65536, 1572864, 14155776, 56623104, 84934656, 905969664, 3623878656, 6442450944, 4294967296, 17179869184, 25769803776, 17179869184, 4294967296
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
a(0) = a(1) = 1; a(4n+1+m) = (4 choose m) * a(n+1)^m * a(n)^(4-m), where n >= 0 and 0 <= m <= 4.
|
|
MAPLE
|
a:= proc(n) option remember; local m, r; if n<2 then 1 else
r:= iquo(n-1, 4, 'm'); binomial(4, m) *a(r+1)^m *a(r)^(4-m) fi
end:
|
|
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, 4];
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|