Identity proofs I'm strugling with these two combinatorial identities:
$$  \binom{n+2}{3}=\sum_{i=1}^{n} i(n+1-i) $$
and
$$\binom{n+1}{2}^2=\sum_{i=1}^{n} i^3$$
Please give me some footholds and hints
 A: HINTS:


*

*The lefthand side is the number of $3$-element subsets of $S=\{0,1,\ldots,n+1\}$. For $k=1,\ldots,n$, how many $3$ element subsets of $S$ have $k$ as their middle element (in size)?

*$\binom{n+1}2^2$ is the number of ordered pairs $\langle P,Q\rangle$ such that $P$ and $Q$ are $2$-element subsets of $S=\{0,\ldots,n\}$. Let $X$ be the set of such ordered pairs. Let $$Y=\{\langle a,b,c,d\rangle\in S^4:a,b,c<d\}\;;$$ for $1\le k\le n$ there are $k^3$ members of $Y$ whose last component is $k$. Try to find a bijection $h$ from $Y$ to $X$; one way uses three cases, so that $h(\langle a,b,c,d\rangle)$ is defined differently depending on whether $a<b$, $a>b$, or $a=b$.
A: To find formulas for $\sum_{i=1}^{n}i^k$ we can use the following technique:
Begin by considering the sum
$$\sum_{i=1}^{n}i^{k+1}.$$
Then we do 
$$\begin{align}\sum_{i=1}^{n}i^{k+1}&=n^{k+1}+\sum_{i=1}^{n-1}i^{k+1}\\
&=n^{k+1}+\sum_{i=2}^{n}(i-1)^{k+1}\\
&=n^{k+1}-1+\sum_{i=1}^{n}(i-1)^{k+1}\end{align}$$
Use the binomial formula to open the brackets
$$\begin{align}\sum_{i=1}^{n}i^{k+1}&=n^{k+1}-1+\sum_{i=1}^{n}(i-1)^{k+1}\\&=n^{k+1}-1+\sum_{r=0}^{k+1}\binom{k+1}{r}(-1)^{k+1-r}\sum_{i=1}^{n}i^{r}\end{align}$$
and the $\sum_{i=1}^{n}i^{k+1}$ cancels on both sides. This gives us a formula to compute $\sum_{i=1}^{n}i^{k}$ if we have formulas for $\sum_{i=1}^{n}i^{r}$, for $r=1,2,...,k-1$.
So, for example, we know that $$\sum_{i=1}^{n}i^0=n,$$ then we can use the technique above to find that $$\sum_{i=1}^{n}i=\frac{n(n+1)}{2}.$$ Having these two we can then use the technique to find that $$\sum_{i=1}^{n}i^2=\frac{n(n+1)(2n+1)}{6}.$$ Finally knowing these we can use the technique once more to get that $$\sum_{i=1}^{n}i^3=\frac{n^2(n+1)^2}{4}.$$
From these formulas you easily get what you want. Problem (2) is just the last formula we obtained. Problem (1)'s right hand side is just $(n+1)\sum_{i=1}^{n}i-\sum_{i=1}^{n}i^2$, which using the formulas is equal to $(n+1)\frac{n(n+1)}{2}-\frac{n(n+1)(2n+1)}{6}$.
The advantage is that this method allows you to solve many other problems besides (1) and (2).
A: For the first problem split the RHS:
$$\sum_{i=1}^n i(n+1-i) = \sum_{i=1}^n in +i - i^2 = n\sum_{i=1}^n i + \sum_{i=1}^n i - \sum_{i=1}^n i^2$$
Now we know that the some for consecutive integer from $1$ to $n$ is $\frac{n(n+1)}{2}$ and for the squares of consecutive integers from $1$ to $n$ is $\frac{n(n+1)(2n+1)}{6}$. So we substitute and we have:
$$n\sum_{i=1}^n i + \sum_{i=1}^n i - \sum_{i=1}^n i^2 = n \times \frac{n(n+1)}{2} + \frac{n(n+1)}{2} - \frac{n(n+1)(2n+1)}{6}$$
$$n \times \frac{n(n+1)}{2} + \frac{n(n+1)}{2} - \frac{n(n+1)(2n+1)}{6} = \frac{n(n+1)}{6} \times (3n + 3 - 2n - 1) = \frac{n(n+1)(n+2)}{3!} = \frac{(n+2)!}{3!(n-1)!} = \binom{n+2}{3}$$
And for the second problem it's a direct consequence from:
$$\sum_{i=1}^n i^3 = \left(\frac{n(n+1)}{2}\right)^2 = \binom{n+1}{2}^2$$
Note that this substitutions for the summations are well known, but they are proven using induction.
