Proof that the sum of the first $n$ cubes is equal to the square of the $n^{th}$ triangular number [duplicate]

Show that the difference between the squares of two consecutive triangular numbers is a cube. Hence or otherwise, show that the sum of the first $n$ cubes is equal to the square of the $n^{th}$ triangular number.

I have managed to show that the difference between the squares of two consecutive triangular numbers is a cube by subbing $n$ and $n+1$ into the formula for a triangular number and working through to get a result of $(n+1)^3$ which is indeed a cubed number.

However, I don not know how to use this to show that the sum of the first $n$ cubes is equal to the square of the $n^{th}$ triangular number, any advice?

marked as duplicate by Rohan, zhoraster, Shailesh, Leucippus, JunivenFeb 17 '17 at 1:11

Let's start with the fact that the $n$th triangular number is given by the formula $n(n+1)/2$ (if you haven't seen this before, have a go at proving it by induction!).
So the square of the $n$th triangular number is $n^2(n+1)^2 /4$. Now, let's prove the desired result by induction:
Our base case is trivial, the first cube is $1$, and the first triangular number squared is $1^2=1$, so we're good.
Our inductive hypothesis is that the sum of the first $m-1$ cubes is equal to the square of the $(m-1)$th triangular number. That is, it's equal to $(m-1)^2(m)^2 /4$.
Now, by inductive hypothesis, the sum of the first $m$ cubes is $m^3 + (m-1)^2(m)^2 /4$. Then rearrange this to complete the proof. :)