Gaussian proof for the sum of squares? There is a famous proof of the Sum of integers, supposedly put forward by Gauss.
$$S=\sum\limits_{i=1}^{n}i=1+2+3+\cdots+(n-2)+(n-1)+n$$
$$2S=(1+n)+(2+(n-2))+\cdots+(n+1)$$
$$S=\frac{n(1+n)}{2}$$
I was looking for a similar proof for when $S=\sum\limits_{i=1}^{n}i^2$
I've tried the same approach of adding the summation to itself in reverse, and I've found this:
$$2S=(1^2+n^2)+(2^2+n^2+1^2-2n)+(3^2+n^2+2^2-4n)+\cdots+(n^2+n^2+(n-1)^2-2(n-1)n$$
From which I noted I could extract the original sum;
$$2S-S=(1^2+n^2)+(2^2+n^2-2n)+(3^2+n^2-4n)+\cdots+(n^2+n^2-2(n-1)n-n^2$$
Then if I collect all the $n$ terms;
$$2S-S=n\cdot (n-1)^2 +(1^2)+(2^2-2n)+(3^2-4n)+\cdots+(n^2-2(n-1)n$$
But then I realised I still had the original sum in there, and taking that out mean I no longer had a sum term to extract.
Have I made a mistake here? How can I arrive at the answer of  $\dfrac{n (n + 1) (2 n + 1)}{6}$ using a method similar to the one I expound on above? I.e following Gauss' line of reasoning?

Since I think the solution Tyler proposes is very useful and accesible, I'll spell it out for you:
We know that
$$(k+1)^3-k^3=3k^2+3k+1$$
If we give the equation values from $1$ to $n$ we get the following:
$$(\color{red}{1}+1)^3-\color{red}{1}^3=3\cdot \color{red}{1}^2+3\cdot \color{red}{1}+1$$
$$(\color{red}{2}+1)^3-\color{red}{2}^3=3 \cdot \color{red}{2}^2+3 \cdot \color{red}{2}+1$$
$$(\color{red}{3}+1)^3-\color{red}{3}^3=3 \cdot \color{red}{3}^2+3 \cdot \color{red}{3}+1$$
$$\cdots=\cdots$$
$$(\color{red}{n-1}+1)^3-(\color{red}{n-1})^3=3(\color{red}{n-1})^2+3(\color{red}{n-1})+1$$
$$(\color{red}{n}+1)^3-\color{red}{n}^3=3\color{red}{n}^2+3\color{red}{n}+1$$
We sum this orderly in columns.
Note that in the LHS the numbers cancel out with each other, except for the $(n+1)^3$ and the starting $-1$ ($2^3-1^3+3^3-2^3+4^3-3^3+\cdots+n^3-(n-1)^3+(n+1)^3-n^3$). We get:
$$(n+1)^3-1 = 3(1+2^2+3^2+\cdots +(n-1)^2+n^2)+ 3(1+2+3+\cdots +(n-1)+n)+(\underbrace{1+1+\cdots+1}_{n})$$
We can write this in sigma notation as:
$$(n+1)^3-1=\sum\limits_{k=1}^n(3k^2+3k+1)$$
Naming our sum $S$ we have that:
$$(n+1)^3-1=3S+\sum\limits_{k=1}^n(3k+1)$$
We know how to compute the sum in the RHS, because
$$\sum\limits_{k=1}^n 3k =3\frac{n(n+1)}{2}$$
$$\sum\limits_{k=1}^n 1 =n$$
(We're summing $n$ ones in the last sum.)
$$(n+1)^3-1=3S+3 \frac{n(n+1)}{2}+n$$
$$n^3+3n^2+3n=3S+\frac{3}{2}n^2+\frac{3}{2}n+n$$
$$n^3+\frac{3n^2}{2}+\frac{n}{2}=3S$$
$$\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6}=S$$
This factors to
$$\frac{n(2n+1)(n+1)}{6}=S$$
which is what you wanted.
