OFFSET
0,10
COMMENTS
Equivalently, number of trees total weight n when the weight of each node is the size of its subtree. To get the equivalence, simply distribute the weights on each node one each to the node and each of its ancestors. - Franklin T. Adams-Watters, Oct 03 2009
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
If a<k>(n) is the equivalent of this sequence with the root node considered to be at level k, then a<k>(n) is the Euler transform of a<k+1>(n) shifted right k places. To compute N terms, take k so that (k+1)*(k+2)/2 > N, approximate a<k>(n) by 1 if n=k, 0 otherwise and apply this rule repeatedly. Formula from Christian G. Bower.
EXAMPLE
a(9) = 2; there is one tree with root at height 1 and 4 nodes at height 2 (1+4*2 = 9) and one with root at height 1, 1 node at height 2 and 2 nodes at height 3 (1+2+2*3 = 9).
MAPLE
g:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
binomial(g(i-k, i-k, k+1)+j-1, j)*g(n-i*j, i-1, k), j=0..n/i)))
end:
a:= n-> g(n-1, n-1, 2):
seq(a(n), n=0..60); # Alois P. Heinz, May 16 2013
MATHEMATICA
g[n_, i_, k_] := g[n, i, k] = If[n==0, 1, If[i<1, 0, Sum[Binomial[g[i-k, i - k, k+1]+j-1, j]*g[n-i*j, i-1, k], {j, 0, n/i}]]]; a[n_] := g[n-1, n-1, 2]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Feb 21 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Mar 09 2006
STATUS
approved