We saw this wonderful identity in Sum of Cubes:

**1**^{3} + **2**^{3} + … + **n**^{3} = (**1** + **2** + … + **n**)^{2}.

Hence the set of numbers {1,2,…,n} has the property that the sum of its cubes is the square of its sum. Are there any other collections of numbers with this property? Yes, and the following method is guaranteed to generate such a set.

Pick a number, any number. Did I hear you say 63? Fine.

List the divisors of 63, and for each divisor of 63, count the number of divisors it has:

63 has **6** divisors (63, 21, 9, 7, 3, 1)

21 has **4** divisors (21, 7, 3, 1)

9 has **3** divisors (9, 3, 1)

7 has **2** divisors (7, 1)

3 has **2** divisors (3, 1)

1 has **1** divisor (1).

The resulting collection of numbers has the same cool property. Namely

**6**^{3} + **4**^{3} + **3**^{3} + **2**^{3} + **2**^{3} + **1**^{3} = 324 = (**6**+**4**+**3**+**2**+**2**+**1**)^{2}.

Neat, huh?

**Presentation Suggestions:**

If you are short on time, you can just present the sum of cubes fact.

**The Math Behind the Fact:**

From number theory, *multiplicative functions* are functions f defined over the positive integers that satisfy f(xy)=f(x)f(y) whenever integers x,y have no common factors.

Observation. Once you know the value of f for all prime powers you can determine f(N) for all integers N.

Easy examples of multiplicative functions are f(x)=x^{n} for any fixed n. Note also that if f(x) is multiplicative, so is [f(x)]^{2} and [f(x)]^{2}, etc. It is harder to prove (reference NZM) that:

Theorem (*). If f is multiplicative, so is F(n) defined by F(n)=SUMm|nf(m), where the sum is over all divisors of n.

Easy examples of multiplicative functions are f(x)=x^{n} for any fixed n. Note also that if f(x) is multiplicative, so is [f(x)]^{2} and [f(x)]^{2}, etc. It is harder to prove (reference NZM) that

Using (*) we see that d(n)=SUM_{m|n}1 must be multiplicative since f(x)=1 is. But then [d]^{3} is multiplicative, and (*) shows that SUM_{m|n}d^{3}(m) is. Also, from (*) and squaring, [SUM_{m|n}d(m)]^{2} is multiplicative. We wish to show thatSUM_{m|n}d^{3}(m) = [SUM_{m|n}d(m)]^{2}.By the Observation, it is enough to show this equality holds for n any prime power. But this reduces to the simpler sum of cubes Fun Fact, which is easy to verify!

**How to Cite this Page:**

Su, Francis E., et al. “Sum of Cubes and Beyond.” *Math Fun Facts*. <https://www.math.hmc.edu/funfacts>.

**References:**

Edward J. Barbeau, *Power Play*, MAA.

Niven, Zuckerman, and Montgomery, *An Introduction to the Theory of Numbers.*

**Fun Fact suggested by: **

Arthur Benjamin