login
Number of n-node rooted trees of height equal to the number of internal (non-leaf) nodes.
18

%I #14 Apr 15 2024 04:56:44

%S 0,0,0,0,1,4,14,41,111,282,688,1627,3761,8540,19122,42333,92851,

%T 202078,436916,939359,2009781,4281696,9087670,19223905,40544951,

%U 85284194,178956984,374691171,782936761,1632982372,3400182458,7068800357,14674471611,30422685030

%N Number of n-node rooted trees of height equal to the number of internal (non-leaf) nodes.

%H Andrew Howroyd, <a href="/A358587/b358587.txt">Table of n, a(n) for n = 1..200</a>

%F Conjectures from _Chai Wah Wu_, Apr 15 2024: (Start)

%F a(n) = 5*a(n-1) - 7*a(n-2) - a(n-3) + 8*a(n-4) - 4*a(n-5) for n > 7.

%F G.f.: x^5*(x^2 - x + 1)/((x - 1)^2*(x + 1)*(2*x - 1)^2). (End)

%e The a(5) = 1 through a(7) = 14 trees:

%e ((o)(o)) ((o)(oo)) ((o)(ooo))

%e (o(o)(o)) ((oo)(oo))

%e (((o)(o))) (o(o)(oo))

%e ((o)((o))) (oo(o)(o))

%e (((o))(oo))

%e (((o)(oo)))

%e ((o)((oo)))

%e ((o)(o(o)))

%e ((o(o)(o)))

%e (o((o)(o)))

%e (o(o)((o)))

%e ((((o)(o))))

%e (((o)((o))))

%e ((o)(((o))))

%t art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];

%t Table[Length[Select[art[n],Count[#,_[__],{0,Infinity}]==Depth[#]-1&]],{n,1,10}]

%o (PARI) \\ Needs R(n,f) defined in A358589.

%o seq(n) = {Vec(R(n, (h,p)->polcoef(subst(p, x, x/y), -h, y)), -n)} \\ _Andrew Howroyd_, Jan 01 2023

%Y For leaves instead of height we have A185650 aerated, ranked by A358578.

%Y These trees are ranked by A358576.

%Y The ordered version is A358588.

%Y Square trees are counted by A358589, ranked by A358577, ordered A358590.

%Y A000081 counts rooted trees, ordered A000108.

%Y A034781 counts rooted trees by nodes and height, ordered A080936.

%Y A055277 counts rooted trees by nodes and leaves, ordered A001263.

%Y A358575 counts rooted trees by nodes and internal nodes, ordered A090181.

%Y Cf. A000891, A065097, A342507, A358552, A358581-A358584, A358591.

%K nonn

%O 1,6

%A _Gus Wiseman_, Nov 23 2022

%E Terms a(19) and beyond from _Andrew Howroyd_, Jan 01 2023