OFFSET
0,4
COMMENTS
Equivalently, T(n,k) is the number of endofunctions whose functional digraph has exactly k leaves.
Equivalently, T(n,k) is the number of doubly rooted trees with k leaves. Here, a doubly rooted tree is a labeled tree in which two special vertices have been selected and the order of the selection matters. [Bona page 266]
Row sums are n^n.
REFERENCES
M. Bona, Introduction to Enumerative Combinatorics, McGraw Hill, 2007.
FORMULA
T(n,k) = n!/k! * Stirling2(n,n-k).
T(n,0) = n!.
T(n,k) = A055302(n,k)*(n-k) + A055302(n,k+1)*(k+1). The first term (on rhs of this equation) is the number of such functions in which the preimage of f(n) contains more than one element. The second term is the number of such functions in which the preimage of f(n) contains exactly one element.
T(n,k) = binomial(n,k) Sum_{j=0..n-k}(-1)^j*binomial(n-k,j)*(n-k-j)^n. - Geoffrey Critzer, Aug 20 2013
E.g.f.: 1/(1 - (A(x,y) - y*x + x)) where A(x,y) is the e.g.f. for A055302. - Geoffrey Critzer, Jan 24 2022
From Alois P. Heinz, Jan 24 2022: (Start)
Sum_{k=0..n} k * T(n,k) = A209290(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A344053(n). (End)
EXAMPLE
Triangle T(n,k) begins:
1;
1, 0;
2, 2, 0;
6, 18, 3, 0;
24, 144, 84, 4, 0;
120, 1200, 1500, 300, 5, 0;
720, 10800, 23400, 10800, 930, 6, 0;
...
MATHEMATICA
Table[Table[n!/k!StirlingS2[n, n-k], {k, 0, n}], {n, 0, 8}]//Grid
PROG
(PARI) row(n) = vector(n+1, k, k--; n!/k! * stirling(n, n-k, 2)); \\ Michel Marcus, Jan 24 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Geoffrey Critzer, Dec 01 2012
STATUS
approved