TITLE: Evaluate complicated sum $\sum \sum {n \choose k}{n-k \choose l}(j-i-1)^{n-k-l}.$
QUESTION [6 upvotes]: Evaluate following sum:
$$\sum_{1\leqslant i< j \leqslant m}\sum_{\substack{1\leqslant k,l \leqslant n\\ k+l\leqslant n}} {n \choose k}{n-k \choose l}(j-i-1)^{n-k-l}.$$
Hint: use combinatorial interpretation.
I tried to solve it with the hint. We have a set of $n$ people, we choose first subset of $k$ of them, then we choose second subset of $l$ people from the rest. Those who weren't chosen neither to first nor to second group we divide into $j-i-1$ groups... I don't know what to do next? Thanks in advance.

REPLY [7 votes]: Consider $n$ balls coloured with $m$ different colours, such that:

Not all the colours need to be used
The balls can not be all of the same colour (i.e. at least two different colours are used).

Then:  

Let $i$ be the smallest colour used and $j$ be largest one ($1\leq i<j\leq m$); all the possible combinations of $i$ and $j$ result in distinct colourings.
You can choose $k$ ($\geq 1$) balls of the colour $i$ in $\binom{n}{k}$ ways.
From the remaining $(n-k)$ balls, $l$ (again, $\geq 1$) will be of colour $j$: $\binom{n-k}{l}$ ways.
Obviously, $k+l\leq n$.
Finally, the remaining ($n-k-l)$ balls can be coloured with the remaining $(j-i-1)$ colours in any way we like: $(j-i-1)^{n-k-l}$

Since the total number of ways to colour $n$ balls with $m$ colours is $m^n$ and we disallow $m$ all-the-same-colour choices, the sum is equal to $(m^n-m)$.