OFFSET
1,5
COMMENTS
We say that a tree is square if it has the same height as number of leaves.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
EXAMPLE
The a(1) = 1 through a(7) = 11 trees:
o . (oo) . ((ooo)) ((o)(oo)) (((oooo)))
(o(oo)) (o(o)(o)) ((o(ooo)))
(oo(o)) ((oo(oo)))
((ooo(o)))
(o((ooo)))
(o(o(oo)))
(o(oo(o)))
(oo((oo)))
(oo(o(o)))
(ooo((o)))
((o)(o)(o))
MATHEMATICA
art[n_]:=If[n==1, {{}}, Join@@Table[Select[Tuples[art/@c], OrderedQ], {c, Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n], Count[#, {}, {0, Infinity}]==Depth[#]-1&]], {n, 1, 10}]
PROG
(PARI) \\ R(n, f) enumerates trees by height(h), nodes(x) and leaves(y).
R(n, f) = {my(A=O(x*x^n), Z=0); for(h=1, n, my(p = A); A = x*(y - 1 + exp( sum(i=1, n-1, 1/i * subst( subst( A + O(x*x^((n-1)\i)), x, x^i), y, y^i) ) )); Z += f(h, A-p)); Z}
seq(n) = {Vec(R(n, (h, p)->polcoef(p, h, y)), -n)} \\ Andrew Howroyd, Jan 01 2023
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 23 2022
EXTENSIONS
Terms a(19) and beyond from Andrew Howroyd, Jan 01 2023
STATUS
approved