Prove that $\sum_{i=1}^{n}i^3=\binom{n+1}{2}+6\binom{n+1}{3}+6\binom{n+1}{4}$ By double counting prove that : $\sum_{i=1}^{n}i^3=\binom{n+1}{2}+6\binom{n+1}{3}+6\binom{n+1}{4}$ 
$S = \{(a,b,c,d) \mid a,b,c,d \in \{1,2,...,n + 1\},a < d,b < d,c < d\}$

The idea is to count the number of elements of the set $S$ in two ways.
On the one hand, we have $|S| = \sum_{i=1}^n i^3$ since $S$ contains $i^3$ elements of the form $(a,b,c,i+1)$ for each $1 \leq i \leq n$ (and these are exactly all elements).
On the other hand, let $k(a,b,c,d)$ the number of distinct elements in the set $\{a,b,c,d\}$. Then $S$ contains $\binom{n+1}{2}$, $6\binom{n+1}{3}$ and $6\binom{n+1}{4}$ elements $(a,b,c,d)$ with $k(a,b,c,d) = 2,3,4$, respectively (when $k(a,b,c,d) > 2$ there are $6$ ways to assign values to $a$, $b$, $c$).
In conclusion, we have $$\sum_{i=1}^n i^3 = |S| = \binom{n+1}{2} + 6 \binom{n+1}{3} + 6 \binom{n+1}{4}.$$
