# 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!

• If your goal was to elude induction, your iteration approach on $A_{(i-1)(i-1)}$ is formally done using induction. However your proof seems good to me Jul 17, 2020 at 16:58
• Do you know of any methods which successfully elude induction?
– JMM
Jul 17, 2020 at 17:49

See my answer to this question.

It is a little appreciated fact that every power $$k\ge 2$$ of any positive integer $$n$$ can be expressed as the sum of exactly $$n$$ consecutive odd numbers, viz: $$n^k=\sum_{i=\frac{n^{k-1}-n}{2}+1}^{\frac{n^{k-1}+n}{2}}(2i-1)$$ So $$n$$ consecutive odd numbers can be found that sum to $$n^3$$ for any $$n$$. $$n^3=\sum_{i=\frac{n^{2}-n}{2}+1}^{\frac{n^{2}+n}{2}}(2i-1)$$ If you compute the starting and ending values for the summation for any particular $$n$$, you get exactly the numbers in your exposition.

The general formula specifies $$n$$ consecutive odd numbers with an average value of $$n^{k-1}$$ summing to $$n\cdot n^{k-1}=n^k$$, and is not dependent on induction in any particular case.

• Awesome! This is exactly the kind of answer I'm looking for! +1 my friend :)
– JMM
Jul 18, 2020 at 3:50

There is a simple way to find the odd numbers that sum up to a cube. A cube can be written as $$n^3=n.n^2$$. So a cube $$n^3$$ is a sum of $$n$$ squares. There are two cases to consider: odd and even $$n$$. I will simply provide two examples to illustrate the method.

$$5^3= 5^2 + 5^2 + 5^2 + 5^2 + 5^2$$
$$5^3 =(5^2-4) + (5^2-2) + 5^2 + (5^2+2) + (5^2+4)$$
$$5^3= 21 + 23 + 25 + 27 + 29$$

In other words, we subtract or add $$2,4,...$$ from $$n^2$$ to get the corresponding odd number while keeping the square in the middle.

For even numbers, we use the same principle which says that a cube $$n^3$$ is a sum of $$n$$ squares.

$$4^3= 4^2 + 4^2 + 4^2 + 4^2$$
$$4^3= (4^2-3) + (4^2-1) + (4^2 +1) + (4^2+3)$$
$$4^3= 13 + 15 + 17 + 19$$

The only difference between odd and even case is the fact that for odd numbers we keep the middle square and we subtract or add $$2,4,6,...$$ from the other squares to get an odd number. For even number, we do not keep a square but we subtract or add $$1,3,5,...$$ to get an odd number.

Edit #1 Dec 29 2022

Here's a method that doesn't rely on induction. It is based on the properties of the square of a triangular number $$T_{n}$$ and few other properties that will be pointed out when they are used.
We know that $$T_{n}^2 = 1^3 + 2^3 + 3^3 + ... + n^3$$. I think it's easier to take an example and show how to get the odd numbers that sum up to the given cube.
Example:
$$4^3= 13 + 15 +17 +19$$
At this point we introduce the triangular number $$T_{4}=4(4+1)/2=10$$. We consider the square $$T_{4}^2=10^2=100$$. The sum of the (equal) factors of $$T_{4}^2$$ is $$s=10+10=20$$. If we consider $$4^3=4\cdot16=64$$ we see that the sum of the factors of $$4^3$$ is $$t=4+16=20$$, it is the same as that of $$T_{4}^2$$. We know that there are $$9$$ integers that have the same sum of factors as $$T_{4}^2$$ and they are:
$$19,36,51,64,75,84,91,96,99$$. Note that $$4^3=64$$ is one of them. These factors are $$1+19=2+18=3+17=...=9+11$$. It turned out that $$19$$ is the forth and last odd number that add up to $$4^3=64$$. At this point we can just go backward and find the other $$3$$ odd numbers by subtracting $$2$$ from $$19$$ then $$2$$ from $$17$$ then $$2$$ from $$15$$ and then $$2$$ from $$15$$ to get $$4^3= 13 + 15 + 17 + 19= 64$$. We can do better. We know that the ending number of $$(n-1)^3$$ and the starting number of $$n^3$$ differ by $$2$$ as shown by the data provided by the OP. So it's enough to consider $$T_{3}=T_{4}-4=6$$ and square it and consider the sum of factors equal to $$s=6+6=1+11$$. So we know that the the last odd number of the three odd numbers that add up to $$3^3=27$$ is $$11$$ since $$3^3= 7 + 9 + 11$$. Therefore we know that the first odd number of the four that add up to $$4^3$$ is $$11+2=13$$. So now we have the both the starting odd number and the ending one and we can write:
$$4^3 = 13 + 15 + 17 + 19$$
In fact the starting and ending odd numbers are given by $$2T_{n-1}+1$$ and $$2T_{n}-1$$. In our case $$2T_{3} + 1 =2\cdot6 + 1=13$$ and $$2T_{4}-1=2\cdot10 - 1=19$$.

In fact the starting and ending odd number sandwich the square $$n^2$$ in the multiplication table and are listed in the diagonal above and below the main diagonal of the squares. In our case we have $$12$$, $$4^2=16$$, $$20$$. It's enough to remember to add $$1$$ to the smaller number and subtract $$1$$ from the larger number.
The starting odd number has the same difference of factors as $$n\cdot(n^2)$$ and the ending odd number of the sum has the same sum of factors as $$n\cdot(n^2)$$. In our case $$16-4=12= 13-1$$ and $$16+4=20= 1 + 19$$.

Finally, another way to get $$4^3$$ is to add up $$4+8+12+16+12 +8+4=64$$, the inverted L in the multiplication table starting with $$4$$ and ending with $$4$$. This is valid for any integer $$n^3$$.

• Hey this is a really cool way of looking at it! Thanks a lot for the insight! :)
– JMM
Jul 21, 2020 at 13:45

The OP's claim can be summarized by saying that $$n^3$$ can be expressed as the sum of $$n$$ consecutive odd numbers starting with $$n(n+1) - (2n - 1)$$ and ending with $$n(n+1) - 1$$.

This is easy to show by a direct proof, using a result for $$n^2$$ that is well-known and easy to prove by induction.

Take the series of odd numbers in reverse order, from largest to smallest. Then we are saying that: $$\begin{eqnarray} n^3 & = & \big[(n^2 + n - 1) + (n^2 + n - 3) + \ldots + (n^2 + n - (2n - 1))\big] \\ & = & n (n^2 + n) - [1 + 3 + \ldots + 2n - 1] \end{eqnarray}$$ This in turn gives:

$$$$n^2 = 1 + 3 + \ldots + 2n - 1$$$$

which is an exercise in elementary proof by induction.

• Terrific insight. Best answer yet!
– JMM
Dec 22, 2020 at 14:30

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$$.

There are identitity's given below:

For even cube:

$$p^3=(p^2-p+1)+\cdots+(p^2-5)+(p^2-3)+(p^2-1)+(p^2+1)+(p^2+3)+(p^2+5)+\cdots+(p^2+p-1)$$

For odd cube:

$$q^3=(q^2-q+1)+\cdots+(q^2-6)+(q^2-4)+(q^2-2)+(q)^2+(q^2+2)+(q^2+4)+(q^2+6)+\cdots+(q^2+p-1)$$

For, $$p=8$$ we get:

$$8^3=(57+59+61+63+65+67+69+71)$$

For, $$q=9$$ we get:

$$9^3=(73+75+77+79+81+83+85+87+89)$$