STATUS
editing
approved
editing
approved
...
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
g[n_] := g[n] = If[n<2, 1, g[n-1] + (n-1)*g[n-2]]; H[0, 0] = 1; H[n_, k_] := Sum[Binomial[n-k, i]*Binomial[k, i]*i!*g[k-i]*n^(n-k-i), {i, 0, Min[k, n-k]}]; T[n_, k_] := H[n, k] - H[n, k+1]; Table[T[n, k], {n, 0, 10}, { k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2017, translated from Maple *)
approved
editing
editing
approved
editing
approved
T(3,1) = 7: (1,1,1), (1,1,2), (1,1,3), (1,3,1), (1,3,3), (3,1,1), (3,3,1).
T(3,2) = 4: (1,2,1), (1,2,2), (2,1,1), (2,1,2).
T(3,3) = 4: (1,2,3), (1,3,2), (2,1,3), (3,2,1).
approved
editing