login
A297791
Number of series-reduced leaf-balanced rooted trees with n nodes. Number of orderless same-trees with n nodes and all leaves equal to 1.
7
1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 5, 1, 3, 3, 4, 3, 5, 3, 6, 4, 6, 3, 12, 3, 10, 7, 9, 6, 12, 9, 13, 16, 14, 22, 22, 24, 21, 24, 28, 14, 32, 15, 42, 20, 60, 27, 84, 44, 100, 59, 113, 74, 116, 85, 110, 97, 96, 113, 106, 149, 147, 234, 235, 377, 380, 580, 576, 838
OFFSET
1,7
COMMENTS
An unlabeled rooted tree is leaf-balanced if all branches from the same root have the same number of leaves. It is series-reduced if all positive out-degrees are greater than one.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..84
EXAMPLE
The a(13) = 5 trees: (((oo)(oo))(oooo)), ((ooooo)(ooooo)), ((ooo)(ooo)(ooo)), ((oo)(oo)(oo)(oo)), (oooooooooooo).
MATHEMATICA
alltim[n_]:=alltim[n]=If[n===1, {{}}, Join@@Function[c, Select[Union[Sort/@Tuples[alltim/@c]], And[SameQ@@(Count[#, {}, {0, Infinity}]&/@#), FreeQ[#, {_}]]&]]/@IntegerPartitions[n-1]];
Table[Length[alltim[n]], {n, 20}]
PROG
(PARI) lista(nn) = my(k, r, t, u, w=vector(nn, i, vector(i))); w[1][1]=1; for(s=2, nn, fordiv(s, d, if(d<s, u=select(i->w[i][d], [d..nn]); forvec(v=vector(s/d, i, [1, #u]), if(nn>=r=1+sum(i=1, #v, u[v[i]]), k=1; t=1; for(i=2, #v, if(v[i]==v[i-1], k++, t*=binomial(w[u[v[i-1]]][d]+k-1, k); k=1)); w[r][s]+=t*binomial(w[u[v[#v]]][d]+k-1, k)), 1)))); vector(nn, i, vecsum(w[i])); \\ Jinyuan Wang, Feb 25 2025
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 06 2018
EXTENSIONS
a(51) onward from Robert G. Wilson v, Jan 07 2018
STATUS
approved