# Sum of Sequence of Cubes

## Theorem

$\displaystyle \sum_{i \mathop = 1}^n i^3 = \left({\sum_{i \mathop = 1}^n i}\right)^2 = \frac{n^2 \left({n + 1}\right)^2} 4$

## Proof by Induction

First, from Closed Form for Triangular Numbers:

$\displaystyle \sum_{i \mathop = 1}^n i = \frac {n \left({n + 1}\right)} 2$

So:

$\displaystyle \left({\sum_{i \mathop = 1}^n i}\right)^2 = \frac{n^2 \left({n + 1}\right)^2} 4$

Next we use induction on $n$ to show that $\displaystyle \sum_{i \mathop = 1}^n i^3 = \frac{n^2 \left({n + 1}\right)^2} 4$.

The base case holds since $\displaystyle 1^3 = \frac{1 \left({1 + 1}\right)^2} 4$.

Now we need to show that if it holds for $n$, then it holds for $n + 1$.

 $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle \sum_{i \mathop = 1}^{n+1} i^3$$ $$=$$ $$\displaystyle$$ $$\displaystyle \sum_{i \mathop = 1}^n i^3 + \left({n + 1}\right)^3$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \frac{n^2 \left({n + 1}\right)^2} 4 + \left({n + 1}\right)^3$$ $$\displaystyle$$ $$\displaystyle$$ (by the induction hypothesis) $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \frac{n^4 + 2 n^3 + n^2} 4 + \frac {4 n^3 + 12 n^2 + 12 n + 4} 4$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \frac{n^4 + 6 n^3 + 13 n^2 + 12 n + 4} 4$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \frac{\left({n + 1}\right)^2 \left({n + 2}\right)^2} 4$$ $$\displaystyle$$ $$\displaystyle$$

By the Principle of Mathematical Induction, the proof is complete.

$\blacksquare$

## Proof by Nicomachus

By Nicomachus's Theorem, we have:

$\forall n \in \N_{>0}: n^3 = \left({n^2 - n + 1}\right) + \left({n^2 - n + 3}\right) + \ldots + \left({n^2 + n - 1}\right)$

Also by Nicomachus's Theorem, we have that the first term for $\left({n + 1}\right)^3$ is $2$ greater than the last term for $n^3$.

So if we add them all up together, we get:

 $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle \sum_{i \mathop = 1}^n i^3$$ $$=$$ $$\displaystyle$$ $$\displaystyle \sum_{\stackrel {1 \mathop \le i \mathop \le n^2 \mathop + n \mathop - 1} {i \text { odd} } } i$$ $$\displaystyle$$ $$\displaystyle$$ ... the sum of all the odd numbers up to $n^2 + n - 1$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \sum_{i \mathop = 1}^{\frac {n^2 \mathop + n} 2} 2 i - 1$$ $$\displaystyle$$ $$\displaystyle$$ ... that is, the first $\dfrac {n^2 + n} 2$ odd numbers $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \left({\frac {n^2 + n} 2}\right)^2$$ $$\displaystyle$$ $$\displaystyle$$ by the Odd Number Theorem

Hence the result.

$\blacksquare$

## Proof by Recursion

$(1): \quad \displaystyle A \left({n}\right) := \sum_{i \mathop = 1}^n i = \frac{n \left({n + 1}\right)} 2$
$(2): \quad \displaystyle B \left({n}\right) := \sum_{i \mathop = 1}^n i^2 = \frac{n \left({n + 1}\right) \left({2 n + 1}\right)} 6$

Let $\displaystyle S \left({n}\right) = \sum_{i \mathop = 1}^n i^3$.

Then:

 $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle S \left({n}\right)$$ $$=$$ $$\displaystyle$$ $$\displaystyle n^3 + \left({n - 1}\right)^3 + \left({n - 2}\right)^3 + \cdots + 2^3 + 1^3$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \sum_{k \mathop = 0}^{n \mathop - 1} \left({n - k}\right)^3$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \sum_{k \mathop = 0}^{n \mathop - 1} \left({n^3 - 3 n^2 k + 3 n k^2 - k^3}\right)$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle n^4 - 3 n^2 \cdot A \left({n - 1}\right) + 3 n \cdot B \left({n - 1}\right) - S \left({n - 1}\right)$$ $$\displaystyle$$ $$\displaystyle$$ $$(3):$$ $$\displaystyle$$ $$\displaystyle \implies$$ $$\displaystyle$$ $$\displaystyle S \left({n}\right)$$ $$=$$ $$\displaystyle$$ $$\displaystyle n^4 - 3n^2 \cdot \frac{n \left({n - 1}\right)} 2 + 3n \cdot \frac{n \left({n - 1}\right) \left({2 n - 1}\right)} 6 - S \left({n - 1}\right)$$ $$\displaystyle$$ $$\displaystyle$$ substituting from $(1)$ and $(2)$ $$(4):$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle S \left({n}\right)$$ $$=$$ $$\displaystyle$$ $$\displaystyle n^3 + S \left({n - 1}\right)$$ $$\displaystyle$$ $$\displaystyle$$ recursive definition $$\displaystyle$$ $$\displaystyle \implies$$ $$\displaystyle$$ $$\displaystyle 2 S \left({n}\right)$$ $$=$$ $$\displaystyle$$ $$\displaystyle n^4 + n^3 - 3n^2 \cdot \frac{n \left({n - 1}\right)} 2 + 3n \cdot \frac{n \left({n - 1}\right) \left({2 n - 1}\right)} 6$$ $$\displaystyle$$ $$\displaystyle$$ adding $(3)$ and $(4)$ $$\displaystyle$$ $$\displaystyle \implies$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \frac{n^2 \left({n + 1}\right)^2} 2$$ $$\displaystyle$$ $$\displaystyle$$ simplification $$\displaystyle$$ $$\displaystyle \implies$$ $$\displaystyle$$ $$\displaystyle S \left({n}\right)$$ $$=$$ $$\displaystyle$$ $$\displaystyle \frac{n^2 \left({n + 1}\right)^2} 4$$ $$\displaystyle$$ $$\displaystyle$$

$\blacksquare$

## Historical Note

This result was documented by Āryabhaṭa in his work Āryabhaṭīya of 499 CE.