Nicomachus's Theorem

Theorem
$$ $$ $$ $$ $$

In general:
 * $$\forall n \in \N^*: n^3 = \left({n^2 - n + 1}\right) + \left({n^2 - n + 3}\right) + \ldots + \left({n^2 + n - 1}\right)$$

In particular, the first term for $$\left({n + 1}\right)^3$$ is $$2$$ greater than the last term for $$n^3$$.

Proof 1
Proof by induction:

For all $$n \in \N^*$$, let $$P \left({n}\right)$$ be the proposition $$n^3 = \left({n^2 - n + 1}\right) + \left({n^2 - n + 3}\right) + \ldots + \left({n^2 + n - 1}\right)$$.

Basis for the Induction

 * $$P(1)$$ is true, as this just says $$1^3 = 1$$.

This is our basis for the induction.

Induction Hypothesis

 * Now we need to show that, if $$P \left({k}\right)$$ is true, where $$k \ge 1$$, then it logically follows that $$P \left({k+1}\right)$$ is true.

So this is our induction hypothesis:
 * $$k^3 = \left({k^2 - k + 1}\right) + \left({k^2 - k + 3}\right) + \ldots + \left({k^2 + k - 1}\right)$$.

Then we need to show:
 * $$\left({k + 1}\right)^3 = \left({\left({k + 1}\right)^2 - \left({k + 1}\right) + 1}\right) + \left({\left({k + 1}\right)^2 - \left({k + 1}\right) + 3}\right) + \ldots + \left({\left({k + 1}\right)^2 + \left({k + 1}\right) - 1}\right)$$.

Induction Step
Let $$T_k = \left({k^2 - k + 1}\right) + \left({k^2 - k + 3}\right) + \ldots + \left({k^2 + k - 1}\right)$$.

We can express this as:
 * $$T_k = \left({k^2 - k + 1}\right) + \left({k^2 - k + 3}\right) + \ldots + \left({k^2 - k + 2k - 1}\right)$$

We see that there are $$k$$ terms in $$T_k$$.

Let us consider the general term $$\left({\left({k + 1}\right)^2 - \left({k + 1}\right) + j}\right)$$ in $$T_{k+1}$$:

$$ $$

So, in $$T_{k+1}$$, each of the terms is $$2k$$ larger than the corresponding term for $$T_k$$.

So:

$$ $$ $$ $$ $$

So $$P \left({k}\right) \implies P \left({k+1}\right)$$ and the result follows by the Principle of Mathematical Induction.

Therefore $$\forall n \in \N^*: n^3 = \left({n^2 - n + 1}\right) + \left({n^2 - n + 3}\right) + \ldots + \left({n^2 + n - 1}\right)$$.

Finally, note that the first term in the expansion for $$\left({n + 1}\right)^3$$ is $$n^2 - n + 1 + 2 n = n^2 + n + 1$$.

This is indeed two more than the last term in the expansion for $$n^3$$.

This is the proof given by Donald E. Knuth in his, Volume 1, exercise 1.2.1: 8.

Proof 2
From the definition:
 * $$\left({n^2 - n + 1}\right) + \left({n^2 - n + 3}\right) + \ldots + \left({n^2 + n - 1}\right)$$

can be written:
 * $$\left({n^2 - n + 1}\right) + \left({n^2 - n + 3}\right) + \ldots + \left({n^2 - n + 2 n - 1}\right)$$

Writing this in sum notation:

$$ $$ $$ $$ $$