Marvelously, the square of the sum of natural numbers is the sum of their cubes! Equivalently, the sum of their cubes is the square of their sum. This mathematical gem is attributed to Nicomachus of Gerasa who lived almost 2000 years ago.
For example,(1+2+3)^2 = 36 = 1^3 +2^3 + 3^3.
More generally,(1 + 2 + \ldots + n)^2 = 1^3 + 2^3 + \cdots n^3
or\left( \sum n \right)^2 = \sum n^3.
The accompanying animation illustrates the identity, where the cubes can be rearranged into either a square or a sequence of composite cubes of the same total volume.