How can I prove $ \sum_{i=0}^{n-1} i^2=\frac{n(n-1)(2n-1)}{6} $?

74 Views Asked by At

Suppose I know that $$\sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6}\,\,\,\, \tag{1} $$ How can I prove the the following? $$ \sum_{i=0}^{n-1} i^2=\frac{n(n-1)(2n-1)}{6} $$


I have looked up the solution to the other problem but it seems to be a bit confusing to me. Is it possible to find a solution derived from equation 1 if you did NOT know this part: $$ \frac{n(n-1)(2n-1)}{6} $$

3

There are 3 best solutions below

7
On BEST ANSWER

Simply note that

$$\sum_{i=0}^{n-1} i^2=\frac{n(n-1)(2n-1)}{6}=\left(\sum_{i=1}^n i^2\right)-n^2$$

indeed

$$\sum_{i=0}^{n-1} i^2=\sum_{i=1}^{n-1} i^2=\left(\sum_{i=1}^n i^2\right)-n^2=\frac{n(n+1)(2n+1)}{6}-n^2=\frac{n(n-1)(2n-1)}{6}$$

0
On

Put $n=N-1$ in $(1)$:

$$\sum_{i=1}^{N-1}i^2=\frac {\overbrace{(N-1)}^n\ \overbrace{N}^{n+1}\ [\overbrace{2(N-1)+1}^{2n+1}]}6=\frac {N(N-1)(2N-1)}6\tag{2}$$ Now write $n$ instead of $N$ in $(2)$ above: $$\sum_{i=1}^{n-1}i^2=\frac {n(n-1)(2n-1)}6$$ Adding $0^2$ gives $$\sum_{i=0}^{n-1}i^2=\frac {n(n-1)(2n-1)}6$$

0
On

The OP asked for how to get the RHS if you didn't know about it. One way to do this is through rising factorials, which work like ordinary integration.

define $$n^{\bar 1} = n$$ $$n^{\bar 2} = n(n+1)$$ and so on

We can rewrite $n^2 = n^{\bar 2} - n^{\bar 1}$

$$\sum_{i=0}^{n} i^2= \sum_{i=0}^{n} i^{\bar 2} - i^{\bar 1} = \frac{n^{\bar 3}}{3} - \frac{n^{\bar 2}}{2} + C$$

We can show $C = 0$ for $n = 0$

$$LHS = \frac{(n)(n+1)(n+2)}{3} - \frac{(n)(n+1)}{2} = \frac{(n)(n+1)(2n+1)}{6}$$