<s>[INST] Cubes as the sum of odd integers It is well known that
$1^3=1$
$2^3=3+5$
$3^3=7+9+11$
$4^3=13+15+17+19$
$5^3=21+23+25+27+29$
and so on. This is typically proven using induction. I have come up with a proof and I'm wondering what you guys think or if you have seen this solution before :)
We will consider the array
\begin{align*}
\begin{matrix}
1\\
3 & 5\\
7 & 9 & 11\\
13& 15 & 17 & 19\\
&&&&\ddots
\end{matrix}
\end{align*}
and in the fashion of matrices, we let $A_{ij}$ denote the entry in row $i$ and column $j$. To be clear, $A_{11}=1, A_{21}=3, A_{22}=5$, etc. Then it suffices to show that $\sum_{j=1}^i A_{ij}=i^3$. Let us consider our array up to row $i$.
\begin{align*}
\begin{matrix}
1\\
3 & 5\\
7 & 9 & 11\\
13& 15 & 17 & 19\\
\vdots \\
A_{(i-1)1}&...&A_{(i-1)(i-1)}\\
A_{i1}&...&A_{ij} &...&A_{ii}
\end{matrix}
\end{align*}
It is clear to see that for $i \geq 2$ we have $A_{ii}=A_{(i-1)(i-1)}+2i$ as row $i$ consists of the $i$ odds following $A_{(i-1)(i-1)}$. We can solve for $A_{(i-1)(i-1)}$ by iteration.
\begin{align*}
A_{(i-1)(i-1)}&=A_{(i-2)(i-2)}+2(i-1)\\
&=A_{(i-3)(i-3)}+2(i-1)+2(i-3)\\
&=A_{(i-4)(i-4)}+2(i-1)+2(i-3)+2(i-4)\\
&...\\
&=1+2(i-1)+2(i-3)+2(i-4)+...+2(3)+2(2)\\
&=(i-1)i-1.
\end{align*}
Remarking that $A_{ij}=A_{(i-1)(i-1)}+2j$, we conclude that $A_{ij}=(i-1)i-1+2j$. Making use of this formula, it follows that $\sum_{j=1}^i A_{ij}=i^3$ as desired.
Let me know if there is any clarification necessary!
 [/INST] The proposed identity says that
$n^3
=\sum_{k=0}^{n-1}(n(n-1)+1+2k)
$.
(Figuring out how to write this
is the hard part.)
The right side is
$\sum_{k=0}^{n-1}(n(n-1)+1+2k)
=n(n(n-1)+1)+2\sum_{k=0}^{n-1}k
=n^3-n^2+n+n(n-1)
=n^3
$.
</s>