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} $$
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}$$