Combinatorial proof of $\sum_{k=1}^n k^2 =\binom{n+1}{3} + \binom{n+2}{3}$

combinatoricsdiscrete mathematics

What reason or hint would there be that
$$\sum_{k=1}^n k^2 =\binom{n+1}{3} + \binom{n+2}{3}$$

Every combinatoric proof I have seen, seemed quite intuitive with the equation already giving hints to how to prove it. This statement above however does not seem logical. Although algebraically it does work out.
My question specific:

What does the left side mean? How would you interpret it combinatorially?

Best Answer

Consider trying to count ordered triples $(x,y,z)$ of integers where

  • $0\le x< z$

  • $0\le y< z$

  • $1\le z\le n$

When $z=k$, there are $k$ choices for $x$ and $k$ choices for $y$, so the number of triples is indeed $\sum_{k=1}^nk^2$.

Alternatively, let us take all triples where $x<y$ and identify them with the subset $\{x,y,z\}$ of $\{0,1,2,\dots,n\}$. There are $\binom{n+1}3$ such subsets, each uniquely representing a triple where $x<y$.

The only remaining triples are the ones where $x\ge y$. Associate each such triple $(x,y,z)$ to the subset $\{y,x+1,z+1\}$ of $\{0,1,2,\dots,n+1\}$. There are $\binom{n+2}3 $ such subsets, each again uniquely representing a triple where $x\ge y$. The triple corresponding to $\{a<b<c\}$ is $(b-1,a,c-1)$.