In my last post I introduced the concept of perfect numbers, which are positive integers n for which , where
denotes the sum of all the divisors of n. Incidentally, we could write the definition of
as
,
that is, the sum ranging over all d for which d divides n (). Of course, this is slightly nonstandard
-notation; usually there is some sort of index variable which counts by ones from a starting to an ending value, but here the index varaible, d, doesn’t count by ones but instead only takes on values that evenly divide n. This notation is actually fairly common, though, and there’s not really any chance of confusion.
While I’m on a tangent, I should also mention that in general, is used to denote the sum of the kth powers of the divisors of n, that is,
For example, . So, the function that we have been calling
is really
, and
tells how many divisors n has, instead of giving their sum (do you see why?).
Now, as you may recall, in my last post I claimed the following formula for calculating , assuming that n can be factored as
:
But I didn’t explain where this formula comes from! Well, today I’d like to rectify that. Let’s start with an example: let’s add up all the divisors of 18. Simple enough: 1 + 3 + 9 + 2 + 6 + 18 = 39. But we can write this in a slightly different form which shows more clearly what is going on:
Do you see the pattern? 18 can be factored as , and every divisor of 18 is of the form
, where
and
. This makes sense — clearly, any divisor of 18 can only use the same prime factors that 18 has, and a given prime factor must occur between zero times and the number of times it occurs in 18 (since otherwise we wouldn’t get a divisor — for example, nothing with a factor of
can be a divisor of 18). In fact, we can make a stronger statement than this: we can obtain every single divisor of 18 exactly once by taking
for every possible combination of values for
and
.
There’s nothing special about 18 here, of course. In general, if we have , then every divisor of n will be of the form
, where
(that is, each
falls between 0 and the corresponding
, inclusive). We get every divisor exactly once if we take all possible combinations of values for the
‘s.
Now, going back to our example of adding up the divisors of 18 for a moment: notice that we can factor it nicely, like so:
In other words, to get a divisor of 18, first choose a power of 2 and then choose a power of 3
; multiplying these expressions gives us the sum of all possible choices. In the general case, the sum of all divisors of the form
, for all possible combinations of values for the
‘s, can be factored as:
The dots in the middle indicate that there is one term for every different prime
. Again, this represents first choosing a power of
, then choosing a power of
, and so on up to
; multiplying all of these terms gives us the sum of all possible choices. As an example, consider
: we obtain
You can verify for yourself that this is, in fact, the sum of all the divisors of 720! OK, we’re almost there. The only step that remains is to simplify the sums of the form . You may recognize this as a geometric series, a sum of terms where each term is a constant multiple of the previous. Note that
, so if we subtract S from this, all the terms cancel out except for the first and last, giving
and therefore
Looks familiar, doesn’t it? Sure it does! Now do you see where the formula for comes from?
Next up: finding more perfect numbers!
Of course! So simple, now that you explained it! Thanks for a really fun and well-written blog.
P.S. There’s a typo: you said 2^r 3^2 when you meant 2^r 3^s, in the paragraph that starts, “Do you see the pattern?”
I understood these last two posts! What powerful notations exist in math; it feels like programming languages did not so much invent anything as they did translate it. You do a great job translating math, Brent, thanks so much.
@DB: Thanks for the kind words! And thanks for the typo catch, I’ve fixed it now.
@Jonathan: Hooray! These last two posts were a bit more notation-heavy/technical than usual so I’m very glad to hear that it made sense to people. And your statement about programming languages is more true than you know; the theory behind computers and programming languages always has been, and still is, heavily based in mathematics.
I was reading the other Jonathan’s comment, and getting confused. I know it sounds right, but I know I didn’t write that.
The factoring bit is very nice. I think I will give my combinatorics class a day off next week – I’ll steal some of your perfect number material, do some work, and let them search a bit…
Thanks!
(other) Jonathan
Jonathan: excellent, steal away. Let me know how your combinatorics class does with it! Perhaps I will write about Catalan numbers sometime…
heh, I know the other Jonathan (a friend from college) wasn’t you; I can tell since I can see posters’ e-mail addresses, although they don’t show up on the comments page.
Brent– I found your page somehow a while ago and am enjoying the posts, especially this one. As a child, 6 was my favorite number because it was perfect (evidently this is what happens when one has math teachers for parents). I hope that all is well with you!
-Zan
Hi Zan! Glad you’re enjoying the posts. =) That’s really cute, lacking math-teacher parents I don’t think I even knew what perfect numbers were until middle school or so.
I’m doing well, just finished applying to PhD programs in CS, now I just have to wait… hope you’re well too!
Hi,
It’s beautiful, simple and elegant. Writing ideas this way makes creates bridge to a lot of math enthusiast. Truly appreciates this blog.
I am not a math expert but love math secret mysteries like these. Now I see some interesting relationship between additive and multiplicative structure of numbers. Are there more structures that can be described like this?
Personally I am working on the mysteries of Mersenne numbers and its relationship with prime numbers. I observed that there is a close relationship between the two numbers. It’s not surprising that Mersenne numbers exhibit these properties. Like relationship with perfect numbers, wagstaff prime numbers and I believed in all prime numbers.
Looking forward for more post.