TITLE: Proving “The sum of $n$ consecutive cubes is equal to the square of the sum of the first $n$ numbers.”
QUESTION [7 upvotes]: This site 
states: 

Example $\boldsymbol 3$. The sum of consecutive cubes. Prove this remarkable fact of arithmetic: $$1^3 +2^3 +3^3 +\ldots +n^3 =(1 +2 +3 +\ldots +n)^2.$$
  “The sum of $n$ consecutive cubes is equal to the square of the sum of the first $n$ numbers.”
In other words, according to Example $1$: $$1^3 +2^3 +3^3 +\ldots +n^3 = \frac{n^2 (n+1)^2}{4}.$$

Should:
$$1^3 +2^3 +3^3 +\ldots +n^3 = \frac{n^2 (n+1)^2}{4}$$
not be:
$$1^3 +2^3 +3^3 +\ldots +n^3 = \frac{n^3 +(n + 1)^3}{2^3}$$
as everything in the left-hand side is cubed?

REPLY [2 votes]: Consider the infinite "multiplication table" array $M$ defined by $M_{i,j}=ij$
$M =
\left[\begin{array}{r}
 1 &  2 &  3 &  4  & 5 \\
 2 &  4 &  6 &  8 & 10 \\
 3 &  6 &  9 & 12 & 15 & \cdots\\
 4 &  8 & 12 & 16 & 20 \\
 5 & 10 & 15 & 20 & 25 \\
&& \vdots &&& \ddots
\end{array}\right]$
Let $L(n) = 
\{M_{i,j} : 1 \le i \le n \wedge j=n \} \cup
\{M_{i,j} : i=n \wedge 1 \le j \le n \}$
be sum of the the _| shaped region consisting of all elements of $M$ whose first or second index is $n$ and whose other index is less than or equal to $n$. For example, the elements of $L(4)$ are shown below.
$M =
\left[\begin{array}{r}
 1 &  2 &  3 &  \color{red}4  & 5 \\
 2 &  4 &  6 &  \color{red}8 & 10 \\
 3 &  6 &  9 & \color{red}{12} & 15 & \cdots\\
 \color{red}4 &  \color{red}8 & \color{red}{12} & \color{red}{16} & 20 \\
 5 & 10 & 15 & 20 & 25 \\
&& \vdots &&& \ddots
\end{array}\right]$
It turns out that $L(1)=1,\; L(2)=8,\; L(3)=27,\; L(4)=64,$ and $L(5)=125$.
We show that $L(n) = n^3$.
\begin{align}
   L(n) 
   &= \sum_{i=1}^n M_{i,n} + \sum_{j=1}^n M_{n,j} - M_{n,n} \\
   &= n\sum_{i=1}^n i + n\sum_{j=1}^n j - n^2 \\
   &= n^2(n+1) - n^2 \\
   &= n^3
\end{align}
Let $S(n)$ be the sum of the $n^2$ elements in the $n \times n$ subarray of elements in the upper-left corner of $M$.
For example, $S(3) = (1+2+3) + (2 + 4 + 6) + (3 + 6 + 9) = 36$
We will compute $ S(n)$ two ways.
\begin{align}
   \sum_{i=1}^n \sum_{j=1}^n M_{i,j}
   &= \sum_{i=1}^n \sum_{j=1}^n ij \\
   &= \left(\sum_{i=1}^n i \right) \left(\sum_{j=1}^n j \right) \\
   &=\left[\frac{n(n+1)}{2}\right]^2
\end{align}
Also,
\begin{align}
   S(n) &= L(1) + L(2) + \cdots + L(n) \\
   S(n) &= \sum_{i=1}^n i^3
\end{align}
So $\displaystyle \sum_{i=1}^n i^3 = \left[\frac{n(n+1)}{2}\right]^2$