Squared triangular number

A square whose side length is a triangular number can be partitioned into squares and half-squares whose areas add to cubes. From Gulley (2010). The nth coloured region shows n squares of dimension n by n (the rectangle is 1 evenly divided square), hence the area of the nth region is n times n x n.

In number theory, the sum of the first n cubes is the square of the nth triangular number. That is,

The same equation may be written more compactly using the mathematical notation for summation:

This identity is sometimes called Nicomachus's theorem, after Nicomachus of Gerasa (c. 60c. 120 CE).