OFFSET
1,4
COMMENTS
A p-tree of weight n is either a single node (if n = 1) or a finite sequence of p-trees whose weights are weakly decreasing and sum to n.
A tree is balanced if all leaves have the same height.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..500
EXAMPLE
The a(1) = 1 through a(7) = 4 balanced p-trees:
o (oo) (ooo) (oooo) (ooooo) (oooooo) (ooooooo)
((oo)(oo)) ((ooo)(oo)) ((ooo)(ooo)) ((oooo)(ooo))
((oooo)(oo)) ((ooooo)(oo))
((oo)(oo)(oo)) ((ooo)(oo)(oo))
MATHEMATICA
ptrs[n_]:=If[n==1, {"o"}, Join@@Table[Tuples[ptrs/@p], {p, Rest[IntegerPartitions[n]]}]];
Table[Length[ptrs[n]], {n, 12}]
Table[Length[Select[ptrs[n], SameQ@@Length/@Position[#, "o"]&]], {n, 12}]
PROG
(PARI) seq(n)={my(p=x + O(x*x^n), q=0); while(p, q+=p; p = 1/prod(k=1, n, 1 - polcoef(p, k)*x^k + O(x*x^n)) - 1 - p); Vec(q)} \\ Andrew Howroyd, Oct 26 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 07 2018
EXTENSIONS
Terms a(17) and beyond from Andrew Howroyd, Oct 26 2018
STATUS
approved