How many options are there to distribute $n$ balls into $k$ baskets, so there are exactly $m$ baskets with at least 1 ball and the other $k-m$ baskets are empty?
I defined a function: $W[n, k, m] = S_2[n, m]k! - k((k - m)! - 1)$ but I am not sure if it is correct.
A few examples:
$W[4, 3, 1] = 3$ $W[4, 3, 2] = 42$ $W[4, 3, 3] = 36$
Regards