OFFSET
2,3
COMMENTS
T(n,k) is the number of forests of labeled rooted trees with n nodes and height k Cf. A210725. Equivalently, T(n,k) is the number of nilpotent partial functions on [n] with index k+1. - Geoffrey Critzer, Nov 26 2021
LINKS
Alois P. Heinz, Rows n = 2..142, flattened
FORMULA
A234953(n) = Sum_{k=1..n} k*T(n,k).
EXAMPLE
Triangle begins:
1.
1, 2,
1, 9, 6,
1, 40, 60, 24,
1, 195, 560, 420, 120,
1, 1056, 5550, 6240, 3240, 720,
1, 6321, 59472, 94710, 68880, 27720, 5040,
1, 41392, 692440, 1527456,1426320, 792960, 262080, 40320,
1, 293607, 8753040, 26418168, 30560544, 21213360, 9676800, 2721600, 362880,
...
MAPLE
b:= proc(n, h) option remember; `if`(min(n, h)=0, 1, add(
binomial(n-1, j-1)*j*b(j-1, h-1)*b(n-j, h), j=1..n))
end:
T:= (n, k)-> b(n-1, k-1)-b(n-1, k-2):
seq(seq(T(n, d), d=1..n-1), n=2..12); # Alois P. Heinz, Aug 21 2017
MATHEMATICA
gf[k_] := gf[k] = If[k == 0, x, x*E^gf[k-1]]; a[n_, k_] := n!*Coefficient[Series[gf[k], {x, 0, n+1}], x, n]; t[n_, k_] := (a[n, k] - a[n, k-1])/n; Table[t[n, k], {n, 2, 11}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Mar 18 2014, after Alois P. Heinz *)
PROG
(Python)
from sympy import binomial
from sympy.core.cache import cacheit
@cacheit
def b(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*j*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1)])
def T(n, k): return b(n - 1, k - 1) - b(n - 1, k - 2)
for n in range(2, 13): print([T(n, d) for d in range(1, n)]) # Indranil Ghosh, Aug 26 2017, after Maple code
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Jan 14 2014
STATUS
approved