Skip to main content

Nicomachus's Theorem: the Sum of Cubes and the Square of Sums

·6 mins

Nicomachus’s Theorem describes a fundamental identity in number theory relating sums of cubic numbers to sums of integers. It states that the sum of the first \( n \) cubes is equal to the square of the sum of the first \( n \) integers.

Mathematically, this is expressed as:

$$ \sum_{k=1}^{n} k^3 = \left( \sum_{k=1}^{n} k \right)^2 $$

This article explores the numerical verification, geometric intuition, algebraic proof, and the deeper connections to Triangular numbers, Faulhaber’s formula, and Calculus.

1. Numerical Verification #

We can verify the theorem by calculating the values for the first few integers.

  • For \( n = 1 \): $$1^3 = 1$$ $$1^2 = 1$$

  • For \( n = 2 \): $$1^3 + 2^3 = 1 + 8 = 9$$ $$(1 + 2)^2 = 3^2 = 9$$

  • For \( n = 3 \): $$1^3 + 2^3 + 3^3 = 1 + 8 + 27 = 36$$ $$(1 + 2 + 3)^2 = 6^2 = 36$$

The identity holds for these cases. Since the sum of the first \( n \) integers is given by \( \frac{n(n+1)}{2} \), the theorem asserts that:

$$ 1^3 + 2^3 + \dots + n^3 = \left[ \frac{n(n+1)}{2} \right]^2 $$

2. Geometric Proof and Visual Intuition #

The theorem can be understood geometrically by constructing a large square whose side length is the sum of integers \( 1 + 2 + \dots + n \). The area of this square represents the right-hand side of the equation: \( (1 + 2 + \dots + n)^2 \).

To prove the theorem, we must show that this large square can be perfectly tiled by regions with areas corresponding to \( 1^3, 2^3, \dots, n^3 \).

Construction by Gnomons #

We build the square recursively. Starting with a unit square (\( 1^3 \)), we increase the side length by adding an L-shaped border, known as a gnomon, for each subsequent integer \( k \).

When expanding from side length \( S_{k-1} \) to \( S_k \) (where \( S_k = 1 + \dots + k \)), the area added is the difference between the new square and the old square. We must demonstrate that this added area equals \( k^3 \).

Symmetry and Parity: The “Slicing” Phenomenon #

A distinct visual pattern emerges when arranging \( k \) squares of size \( k \times k \) (total area \( k^3 \)) into the L-shaped gnomon. The arrangement depends on the parity of \( k \).

  1. Odd Integers (e.g., \( k=3 \)): We have \( k \) squares of size \( k \times k \). One square is placed in the corner of the L-shape to preserve symmetry. The remaining \( k-1 \) squares are an even number, allowing them to be distributed equally between the vertical and horizontal arms of the gnomon without modification.

  2. Even Integers (e.g., \( k=2 \)): We place one square in the corner. The remaining \( k-1 \) squares are an odd number. To maintain the symmetry of the square, the final remaining block cannot be placed on just one side. It must be sliced in half: one half-rectangle is placed on the vertical arm, and the other on the horizontal arm.

This slicing of even-numbered blocks is a geometric necessity to preserve the axis of symmetry along the diagonal of the growing square.

3. Algebraic Proof #

We can prove the theorem by examining the difference between consecutive terms. Let \( S_n \) be the sum of the first \( n \) integers: \( S_n = \frac{n(n+1)}{2} \).

We examine the difference between the square of the sum at step \( n \) and step \( n-1 \):

$$ S_n^2 - S_{n-1}^2 = \left( \frac{n(n+1)}{2} \right)^2 - \left( \frac{(n-1)n}{2} \right)^2 $$

Factoring out \( \frac{n^2}{4} \):

$$ = \frac{n^2}{4} \left[ (n+1)^2 - (n-1)^2 \right] $$

Simplifying the term in brackets \( (n^2 + 2n + 1) - (n^2 - 2n + 1) = 4n \):

$$ = \frac{n^2}{4} \cdot 4n = n^3 $$

This confirms that the area added to the square at step \( n \) is exactly \( n^3 \).
Since the base case \( 1^3 = 1^2 \) holds, the theorem is true for all \( n \).

4. Deeper Mathematical Connections #

Triangular Numbers #

The sum of the first \( n \) integers is known as the Triangular Number, denoted as \( T_n \). $$T_n = 1 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}$$

Nicomachus’s theorem can therefore be restated concisely as: the sum of the first \( n \) cubes is the square of the \( n \)-th triangular number. $$\sum_{k=1}^{n} k^3 = T_n^2$$

Faulhaber’s Formula and Bernoulli Numbers #

In the early 17th century, Johann Faulhaber investigated sums of powers of integers, denoted as \( \sum k^p \). He discovered a deep relationship between these sums and Triangular Numbers.

Faulhaber’s Formula states that the sum of any odd power of integers (e.g., \( k^3, k^5, k^7 \)) can be expressed as a polynomial function of the triangular number \( T_n \). Nicomachus’s Theorem is the simplest non-trivial example of this rule:

  • For \( p=1 \): sum is \( T_n \)
  • For \( p=3 \): sum is \( T_n^2 \) (Nicomachus’s Theorem)
  • For \( p=5 \): sum is \( \frac{4T_n^3 - T_n^2}{3} \)

These formulas rely on Bernoulli Numbers (\( B_n \)), a sequence of rational numbers that appear frequently in number theory, particularly in the expansion of trigonometric functions and the Riemann zeta function.

Calculus Analogy #

The theorem has a continuous analogue in calculus. If we treat summation as integration:

  • The integral of \( x \) corresponds to the sum of integers: \( \int x dx = \frac{x^2}{2} \).
  • The integral of \( x^3 \) corresponds to the sum of cubes: \( \int x^3 dx = \frac{x^4}{4} \).

Notice that \( \frac{x^4}{4} = \left( \frac{x^2}{2} \right)^2 \). The theorem is the discrete version of this continuous power rule.

Cubes as Sums of Consecutive Odd Numbers #

Finally, the “slicing” symmetry discussed earlier relates to the property that every cube \( n^3 \) is the sum of \( n \) consecutive odd integers.

  • \( 1^3 = 1 \)
  • \( 2^3 = 3 + 5 \)
  • \( 3^3 = 7 + 9 + 11 \)

Summing \( 1^3 + \dots + n^3 \) is equivalent to summing the first \( \frac{n(n+1)}{2} \) odd integers. Since the sum of the first \( m \) odd integers is always \( m^2 \), the total sum must be \( \left( \frac{n(n+1)}{2} \right)^2 \).

5. Sources and Further Reading #

  1. Nicomachus of Gerasa, Introduction to Arithmetic.
  2. Johann Faulhaber, Academia Algebrae.
  3. Roger B. Nelsen, Proofs Without Words: Exercises in Visual Thinking (Mathematical Association of America).
  4. J. H. Conway and R. K. Guy, The Book of Numbers.
  5. Albert H. Beiler, Recreations in the Theory of Numbers.
  6. Wolfram MathWorld, “Nicomachus’s Theorem”.
  7. OEIS (On-Line Encyclopedia of Integer Sequences), Sequence A000537.

This article was created by a human using AI tools. It has been reviewed and edited to ensure accuracy.