If someone could provide some explanation/proof, it would be greatly appreciated.
$$\binom{n+2}{3} = \sum_{i=1}^{n} i(n-i+1)$$
Q: What's the reasoning behind the RHS?
If someone could provide some explanation/proof, it would be greatly appreciated.
$$\binom{n+2}{3} = \sum_{i=1}^{n} i(n-i+1)$$
Q: What's the reasoning behind the RHS?
For the first question count the three element subsets of $\{0,\dotsc,n+1\}$ in two different ways. There are $\binom{n+2}{3}$ such subsets. Classify the subsets based on their middle element (i.e. the element which is not maximum and not minimum). If the middle element is $i$, then there are $i$ choices for the minimum element and $(n+1)-(i+1)+1=n-i+1$ choices for the maximum element where $1\leq i\leq n$.
Using the variation of Vandermonde's Identity proven in this answer, $$ \begin{align} \sum_{i=1}^ni(n-i+1) &=\sum_{i=0}^{n+1}\binom{i}{1}\binom{n+1-i}{1}\\ &=\binom{n+2}{3} \end{align} $$