TITLE: Proof that sum of first $n$ cubes is always a perfect square
QUESTION [6 upvotes]: I know that
$$1^3+2^3+3^3+\cdots+n^3=\left(\frac{n(n+1)}{2}\right)^2$$
What I would like to know is whether there is a simple proof (that obviously does not use the above info) as to why the sum of the first $n$ cubes always a perfect square.

REPLY [3 votes]: A common complaint students have with proving identities like these via induction is that the proof by induction presumes you already know what the right-hand-side of the formula is supposed to look like. Here's an alternative to PBI that takes a more constructive approach.
The basic idea is to mimic the famous "Gaussian proof" for the sum of the first $n$ integers by adding the terms in reverse order. Define $S_{m}{\left(n\right)}$ to be the sum of the first $n$ integers each raised to the $m$-th power:
$$S_{m}{\left(n\right)}:=\sum_{k=1}^{n}k^m.$$
In particular, the sum of the first $n$ cubes would be $S_{3}{\left(n\right)}$. Since it doesn't matter what order in which we add the terms, we note:
$$S_{3}{\left(n\right)}=\sum_{k=1}^{n}k^3=\sum_{k=1}^{n}\left(n-k+1\right)^3.$$
Next, we add these two series together and make use of the general algebraic identity for the sum of two cubes, $a^3+b^3=(a+b)(a^2-ab+b^2)$, to simplify the general term:
$$\begin{align}
2\,S_{3}{\left(n\right)}
&=\sum_{k=1}^{n}k^3+\sum_{k=1}^{n}\left(n-k+1\right)^3\\
&=\sum_{k=1}^{n}\left[k^3+\left(n-k+1\right)^3\right]\\
&=\sum_{k=1}^{n}\left(k+n-k+1\right)\left(k^2-k(n-k+1)+(n-k+1)^2\right)\\
&=\sum_{k=1}^{n}\left(n+1\right)\left(k^2-3(n+1)k+(n+1)^2\right)\\
&=\left(n+1\right)\sum_{k=1}^{n}\left(k^2-2(n+1)k+(n+1)^2-(n+1)k\right)\\
&=\left(n+1\right)\sum_{k=1}^{n}\left((k-n-1)^2-(n+1)k\right)\\
&=\left(n+1\right)\sum_{k=1}^{n}(n-k+1)^2-\left(n+1\right)\sum_{k=1}^{n}(n+1)k\\
&=\left(n+1\right)\sum_{k=1}^{n}k^2-\left(n+1\right)^2\sum_{k=1}^{n}k\\
&=\left(n+1\right)S_{2}{\left(n\right)}-\left(n+1\right)^2S_{1}{\left(n\right)}.\\
\end{align}$$
Presuming you've already figured out the formulas for the sum of the first $n$ squares and the sum of the first $n$ integers, the last line above can readily be seen to be equivalent to the desired expression for the sum of cubes.