Proving “The sum of $n$ consecutive cubes is equal to the square of the sum of the first $n$ numbers.”

No! Generally speaking, one shows by induction that $\,1^r+2^r+\dots+n^r\,$ has a closed form which is a polynomial in $n$ of degree $\color{red}{r+1}$.

Examples:

  1. $1 +2 +\dots+n =\dfrac{n(n+1)}2$.
  2. $1^2+2^2+\dots+n^2=\dfrac{n(n+1)(2n+1)}6$
  3. $1^0+2^0+\dots+n^0=\underbrace{1+1++\dots+1}_{n \ \text{times}}=n$

and the formula you posted about. What you propose hasn't the required degree, so it can't be true.


Argument:

Every $k^3$ is the sum of $k$ consecutive odd numbers.
E.g.: $8 = 3+5$, $\quad 27 = 7+9+11$, $\quad 64 = 13+15+17+19$.

The sum of $n$ consecutive $k^3$ numbers, starting from $k = 1$, is the sum of
$n(n+1)/2$ consecutive odd numbers.

But the sum of a number of consecutive odd numbers is the square of that number.

Therefore, the sum of $n$ consecutive $k^3$ starting with $1$ is $[n(n+1)/2]^2$.

Elaboration:

It is well known that $k^2$ is the sum of $k$ consecutive odd numbers starting from $1$. But $k^3$, $k^4$, and $k^p$ generally, are also the sum of $k$ consecutive odd numbers. This is because $k$ numbers whose arithmetic mean is $k$ sum to $k^2$; $k$ numbers whose mean is $k^2$ sum to $k^3$, et cetera. What is unique about the sum of cubes is that it is a sum of consecutive odd numbers with no gaps and no repetitions. E.g., the sum of the first five cubes is:

$$\underbrace{1^3}_{1} +\underbrace{2^3}_{3+5} +\underbrace{3^3}_{7+9+11} +\underbrace{4^3}_{13+15+17+19} +\underbrace{5^3}_{21+23+25+27+29}.$$

Therefore the sum is a square. But what square? In summing the first five cubes we have summed the first $1+2+3+4+5 = 15$ odd numbers, giving us $15^2$. And $15$ is the fifth triangle number. Hence generally, the sum of the first $n$ cubes is the square of the $n$th triangle number, or $[n(n+1)/2]^2$, i.e. the square of the sum of the first $n$ integers.

With sums of squares, there is repetition because all the sums of odd numbers start from $1$:

$$1^2 +2^2 +3^2 +4^2 = 1 +(1+3) +(1+3+5) +(1+3+5+7).$$

With fourth and higher powers there is no repetition, but there are gaps between the sets of odd numbers being summed:

$$1^4 +2^4 +3^4 +4^4 = 1 +(7+9) +(25+27+29) +(61+63+65+67).$$

Only sums of cubes are sums of consecutive odd numbers starting from $1$, and therefore have this special connection with squares.