# Sum of Sequence of Squares/Proof by Binomial Coefficients

## Theorem

$\displaystyle \forall n \in \N: \sum_{i \mathop = 1}^n i^2 = \frac {n \paren {n + 1} \paren {2 n + 1} } 6$

## Proof

$\dbinom n 1 = n$
$\dbinom n 2 = \dfrac {n \paren {n - 1} } 2$

Thus:

 $\ds 2 \binom n 2 + \binom n 1$ $=$ $\ds 2 \dfrac {n \paren {n - 1} } 2 + n$ $\ds$ $=$ $\ds n \paren {n - 1} + n$ $\ds$ $=$ $\ds n^2$

Hence:

 $\ds \sum_{i \mathop = 1}^n i^2$ $=$ $\ds \sum_{i \mathop = 1}^n \paren {2 \binom i 2 + \binom i 1}$ $\ds$ $=$ $\ds 2 \binom {n + 1} 3 + \binom {n + 1} 2$ Sum of Binomial Coefficients over Upper Index $\ds$ $=$ $\ds \frac {2 \paren {n + 1} n \paren {n - 1} } {3 \times 2 \times 1} + \frac {\paren {n + 1} n} 2$ Definition of Binomial Coefficient $\ds$ $=$ $\ds \frac {n \paren {n + 1} \paren {2 n + 1} } 6$ after algebra

$\blacksquare$