I had a go at this question:
You have $n$ balls numbered $1,2,...,n$ that you are placing in $n$ buckets. In how many ways can you do this such that:
(i) no bucket remains empty?
(ii) exactly one bucket remains empty?
I hope I have part (i) correct, I thought it would just be the number of ways of rearranging the balls, so the answer would be simply $n!$.
Part (ii) isn't so obvious to me, but I thought that there are $(n-1)!$ ways of rearranging the balls amongst the boxes, then there's $(n-1)$ positions the left-over ball can take, and there's $n$ positions for the whole.
Is the answer to part (ii) just $n(n-1)(n-1)!$?
In the second case you're not counting a lot of configurations. Here's a way how you can do it. First choose which bucket will be empty. There are $n$ ways to do it. Then choose which two balls will be together. This can be done in $\binom{n}{2}$ ways. Now "pair" those two balls and consider them as one. There are $(n-1)!$ ways to distribute them s.t. no bucket is empty. Finally the wanted number is: $$n \binom{n}{2} (n-1)!$$