Why is the following identity true?
$\displaystyle \sum_{r=1}^{n}r^2 = \frac{1}{6} n(n+1)(2n+1)$
$\displaystyle \sum_{r=0}^{n}r^2=?$
Solution via 'Differences Series' (Or LaTex practice )
Step no. 0:
$\displaystyle \sum_{r=0}^{n}r^2$
Step no. 1:
$\displaystyle \sum_{r=0}^{n+1}r^2-\sum_{r=0}^{n}r^2=n^2$
Step no. 2:
$\displaystyle n^2-(n-1)^2=2n-1$
Step no. 3:
$\displaystyle 2n-1-[2(n-1)-1]=2$
Step no. 4:
$\displaystyle 2-2=0 $
Now we find the generating function from 4 and up...
The generating function of #4 is $\displaystyle x+x^2$
The generating function of #3 is $\displaystyle \frac{x+x^2}{1-x}$
The generating function of #2 is $\displaystyle \frac{x+x^2}{(1-x)^2}$
The generating function of #1 is $\displaystyle \frac{x+x^2}{(1-x)^3}$
The generating function of #0 is $\displaystyle \frac{x+x^2}{(1-x)^4}$
We get that generating function of $\displaystyle (\sum_{r=0}^{n}r^2)_{n=0}^{\infty} is \frac{x+x^2}{(1-x)^4}$.
So, $\displaystyle \sum_{r=0}^{n}r^2$ is the coefficient of $\displaystyle x^n in \frac{x+x^2}{(1-x)^4}$:
$\displaystyle \frac{x+x^2}{(1-x)^4}=(x+x^2)\cdot \frac{1}{(1-x)^4}=(x+x^2)\sum_{i=0}^{\infty}\binom{i+3}{3}x^i$
Hence the coefficient of $\displaystyle x^n$ is:
$\displaystyle \binom{n-1+3}{3}+\binom{n-2+3}{3}$
The conclusion is:
$\displaystyle \sum_{r=0}^{n}r^2=\binom{n+2}{3}+\binom{n+1}{3}$
There are a number of ways to show why the formula holds.
One easy method is to use the fact that there is a relationship
between the sum of positive natural numbers
and the sum of their squares....
$\displaystyle \sum_{r=1}^nr=\frac{n(n+1)}{2}$
as it is a very basic arithmetic series.
$\displaystyle 1+2=3;\;\;\;1^2+2^2=3\left(\frac{5}{3}\right)$
$\displaystyle 1+2+3=6;\;\;\;1^2+2^2+3^2=6\left(\frac{7}{3}\right )$
$\displaystyle 1+2+3+4=10;\;\;\;\;1^2+2^2+3^2+4^2=10\left(\frac{9 }{3}\right)$
Hence, induction can prove without doubt that
$\displaystyle \sum_{r=1}^nr^2=\frac{2n+1}{3}\sum_{r=1}^nr$