It’s well known, and easy to prove, that

.

But here’s a generalization of that which has been attributed to Joseph Liouville (1809 – 1882). Pick any number, say 56, and write down all of its divisors:

Now, for each number in that list, write down the *number* of its divisors:

For example, 7 has 2 divisors (1 and 7), and 14 has 4 divisors (1, 2, 7 and 14). But for this second list, the sum of its cubes equals the square of its sum!

.

Here’s a quick check with Sage:

sage: n = 56 sage: L=[number_of_divisors(i) for i in divisors(n)];L [1, 2, 3, 2, 4, 4, 6, 8] sage: sum(L)^2,sum(i^3 for i in L) (900, 900)

And now to prove this result. Start by saying that a list has the *square-cube (SC) property* if the sum of its cubes equals to the square of its sum. So any list has the SC property, as does the list . Also define the pairwise product of two lists and to be the list consisting of all possible products of pairs of elements from and . In other words:

where of course is the Cartesian product. From the definition then it is easy to show that,

For example, if and then

with sum 60, which is equal to the product of the sums of and . Note that

It follows immediately from this that if and are two lists each of which has the SC property, then so does . To see this, suppose that

and

Multiplying these together produces

.

The right hand side is equal to

By the same reasoning as above, the left hand side is equal to

By induction, if is a collection of lists all with the SC property, then has the SC property.

Consider and its decomposition into prime factors:

.

For any prime power the number of divisors of is ; the divisors are all the powers of from 1 to . And the *numbers* of divisors of all those prime powers are . Consider now . The divisors are for all values of between 1 and , and all values of between 1 and . The number of divisors of are . From this it follows that the number of divisors of the divisors of is

.

and hence which has the SC property. The general result follows by induction on the number of distinct prime factors of .

Published proofs and further discussion can be found in “An Interesting Number Fact” by David Pagni, The Mathematical Gazette, Vol. 82, No. 494, Jul., 1998, and “Generalising ‘Sums of Cubes Equal to Squares of Sums'” by John Mason, The Mathematical Gazette, Vol. 85, No. 502, Mar., 2001.

Great result, but is it really a “generalization”? It’s clearly related but I don’t see the original result as a special case.

Sure it’s a generalization, though not 100% obvious.

Remember, the list has to come from the number of divisors of the divisors of a number. So pick ; the divisors are exactly , so the number of divisors of each of those is .

What a cool result! I’ll be sure to use it the next time I teach number theory.

In fact, Alasdair essentially uses this in the proof, which I should have read carefully before responding :)

Quite interesting.

Very nice… Think I need to take some time to wrap my head around it…thanks

Pity it is all completely plagarised – but that is the way with most of this so called “academics” work.

Is it really? Where from? I know the result is old, but I hadn’t seen this proof before! Please send me the links. (I haven’t actually read the articles I referenced at the end.)

Snape, that’s flame-bait! I wouldn’t say plagiarized, just well-known, as amca01 himself points out.

I hadn’t seen this proof before either. As it turns out, because he didn’t use the standard notation for the ‘number of divisors’ function, I forgot that this is a standard ‘hard’ exercise in many number theory texts. But a nice way to present it, and nice way to introduce it for folks who are not familiar with arithmetic functions.

This must be some unfamiliar usage of the word “plagiarized” – the author presents a well known theorem, then a cute result that is attributed to Liouville. This is popularization, not plagiarism, bringing to light an interesting but perhaps unknown-to-the audience result. I found it interesting and learned something, thus it served its purpose for me. Plagiarism would have been if the author had claimed the result as his own, which he very clearly did not.

Heh heh – sucked in my love. Severus S.xxx

I’m extremely pleased to uncover this web site. I need to to thank you for ones time for this particularly wonderful read!! I definitely liked every little bit of it and I have you book marked to look at new stuff on your blog.

Coming late to this party, but just wanted to add that the original “sum of the first n cubes equals the square of the sum of the first n integers” is clearly a special case of Liouville’s rule. Consider any nth power of some prime p, eg 3^4 = 81. It has five divisors, ie 81, 27, 9, 3 and 1. 27 has four divisors. 9 has three. 3 has two. And 1 has one. The rest should be obvious.