There are $n$ grooves distributed on a slope evenly. We index the highest groove with $n$, while the lowest is $1$. If we choose a number $i$, let a ball fall freely over the $i$th groove, three different situations may happen. If the $i$th groove is empty, then the ball will occupy it. If the $i$th groove is already occupied, the ball will roll down and occupy the first empty groove. If all the grooves below the $i$th groove are occupied, the ball will fall out of the slope.
Now Lucida has $m$ balls. He wondered how many different ways for him to throw these balls such that there are exactly $k$ of them falling out of the slope.
A way to throw these m balls can be represented by a sequence p($\{p_1,p_2,...,p_n\}$, $1\leq p_i\leq n$). $p_i$ means that the $i$th ball is fall freely over the $p_i$ groove.
Two ways are considered the same if the sequence $p$ is the same.