How to show that $\sum_{k=1}^n k(n+1-k)=\binom{n+2}3$?

Let us choose three numbers from $\{0,1,2,\ldots, n+1\}$, beginning with the middle one, which has to be some $k\in \{1,\ldots,n\}$. We then have $k$ choices for the smallest and $n+1-k$ choices for the largest of the three. It follows that $${n+2\choose3}=\sum_{k=1}^n k(n+1-k)\ .$$


I think of this as the "twelve days of Christmas equality", because if $n = 12$ then we get $1 \times 12 + 2 \times 11 + \cdots + 12 \times 1 = {14 \choose 3}$ and both sides represent the number of gifts which are given in the song "The Twelve Days of Christmas". (This happens to be 364, one less than the number of days in a year.)

Here's a combinatorial proof of that equality, which I have previously written about at my blog. As I wrote there, let's try to prove the identity $\sum_{j=2}^{n+1} (j-1)(n+2-j) = {n+2 \choose 3}$, which differs from your equality by a change of index. To do this, we count subsets of the set $\{ 1, 2, \ldots, n+2 \}$ of size 3. We can write each such subset as $\{ x, y, z \}$ where we require $x < y < z.$ Then we’ll count these subsets according to the difference $z - x$. To construct such a set with $z - x = j$ we must:

  • choose $x$. $x$ must be between $1$ and $n+2-j$ inclusive, so there are $n+2-j$ possible choices.
  • choose $y$. $y$ must be between $x$ and $z=x+j$ exclusive, so there are $j-1$ possible choices.

At this point $z$ is fixed. So there are $(j-1)(n+2-j)$ ways to choose a $3$-set with $z - x = j$; summing over the possible values of $j$ gives the desired identity.


A convolution is always a good way. Since: $$ \sum_{k\geq 0} k z^k = \frac{z}{(1-z)^2}, \tag{1}$$ we have: $$\begin{eqnarray*}\sum_{k=1}^{n}k(n+1-k) = \sum_{k=0}^{n+1}k(n+1-k) &=& [z^{n+1}]\frac{z^2}{(1-z)^4}\\&=&[z^n]\frac{z}{(1-z)^4}\tag{2}\end{eqnarray*}$$ and the claim follows from: $$ \sum_{k\geq 0}\binom{k+2}{3}z^k = \frac{z}{(1-z)^4}.\tag{3}$$

Tags:

Summation