I’ve been getting mail all day asking me to explain something

that appeared in today’s XKCD comic. Yes, I’ve been reduced to explaining geek comics to my readers. I suppose that there are worse fates. I just can’t

think of any. ğŸ™‚

But seriously, I’m a huge XKCD fan, and I don’t mind explaining interesting things no matter what the source. If you haven’t read today’s

comic, follow the link, and go look. It’s funny, and you’ll know what

people have been asking me about.

The comic refers to *friendly numbers*. The question,

obviously, is what are friendly numbers?

First, we define something called a divisors function over the integers, written σ(n). For any integer, there’s a set of integers that divide

into it. For example, for 4, that’s 1, 2, and 4. For 5, it’s just 1 and 5. And for 6, it’s 1, 2, 3, 6. The divisors function, σ(n) is the sum of all of the divisors of n. So

$ sigma(4)=8, sigma(5)=6, sigma(6)=12.$

For each integer, there is a *characteristic ratio*, defined

using the divisors function. For the integer n, the characteristic

is the ratio of the divisors function over the the number itself: σ(n)/n. So the characteristic ratio of 4 is 7/4; for 6, it’s

12/6=2.

For any characteristic ratio, the set of numbers that share that characteristic are *friendly* with each other. A friendly number is,

therefore, any integer that shares its characteristic ratio with at least one other integer. If an integer isn’t friendly, then it’s called a *solitary* number. 1, 2, 3, 4, and 5 are all solitary numbers. 6 is

friendly with 28 (1+2+4+7+14+28/28 = 56/28 = 2).

replaceMath( document.body );

MgcclInteresting that 58/28 = 2…

Mark C. Chu-CarrollD’oh.

I can do the math, I just can’t

typeit.cinereasteI love recreational number theory.

So, do friendly numbers share other properties with each other? Is this useful for anything?

Mark C. Chu-Carrollcinereaste:

As far as I know, no, the idea of friendly numbers is completely useless. The only place between XKCD that I’ve ever seen it pop up is in number puzzles.

joeeSo the numbers with characteristic ratio 2 are the perfect numbers. Are there other groups of numbers with the same characteristic ratio that have a special name?

SpotWeldI wonder how long before someone figures out how to port LaTeX over to a blog format…

Chang YangWordPress actually has the ability to render LaTeX:

http://faq.wordpress.com/2007/02/18/can-i-put-math-or-equations-in-my-posts/

Terence Tao uses it in his blog.

Jabebut can you explain the “That’s nothing. I once lost my genetics, rocketry, and stripping licenses in a single incident” joke?

John Armstrongjoee: when Ïƒ(n)/n=k a whole number we say that n is “k-multiply perfect”. Mathematicians in the 17th century had called them “k-pluperfect”.

Jabe: that one wasn’t a joke.

MatrixFrogThere’s a whole forum on the xkcd message board for discussion of the XKCD comics. You might advise your readers to check there if they have future questions about XKCD, although it’s great that they wanted to ask you instead, as it gives you some material to blog about.

.mau.But is there a generalization for friendly numbers in the Gauss plane? Of course it has unique factorization, so the notion of “sum of divisors” needs little generalization, apart from remembering that there are more units than 1 and -1. But I wonder if there are imaginary friendly numbers, or at least complex friendly numbers.

TorbjÃ¶rn Larsson, OMSorry – it’s a fundamental property of comics mechanics that any attempt of explanation will collapse the joke.

Stevecinereaste, you get a penny ğŸ™‚

One of the Pythagorean mottos was: “A diagram and a step, not a diagram and a penny”. Euclid, who belonged to the Pythagorean tradition, once rebuked a student who asked what profit could be gained from a knowledge of geometry. Euclid called a slave and said (pointing at the student): “He wants to profit from geometry. Give him a penny.” The student was then dismissed from Euclid’s school.

Blake StaceyYou can put math into most types of blog with this trick.

Stephen WellsIs there a simple proof that 1-5 are solitary numbers? You’d have to prove that no higher integers could have divisors summing to the same multiple of n, but it’s not clear to me at the moment.

Starhawk LaughingsunDoesn’t Ïƒ(4) = 1 + 2 + 4 = 7 not 8 as you claim above: “sigma(4)=8”?

DavisStephen,

Here’s a quick proof that all primes must be solitary:

The characteristic ratio of any prime is (p+1)/p. Suppose some other number

nhad this characteristic ratio. Then we must have Ïƒ(n)=k(p+1) andn=kp for some integer k (bigger than 1). This means that kp, k and 1 are (some) factors ofn. So Ïƒ(n) is at least kp+k+1=k(p+1)+1, which is too big. Contradiction, therefore no such k exist.This covers 2, 3, and 5. Showing 1 is a solitary number is left to the reader. The proof above can (probably, I haven’t tried yet) be extended to any prime power pn, which would then cover 4.

DavisAddendum to my previous comment:

This proof can be extended to prime powers. For a prime number p, Ïƒ(pm)=1+p+p2+…+pm (let’s call this S for short, writing it in HTML stinks). So the characteristic ratio of pn is S/pm. We’ll note that S(mod p)=1, so this ratio is in lowest terms.

If

nhas the same ratio, we must then have Ïƒ(n)=kS andn=kpm. This means 1, k, kp, kp2,…, kpm are all factors ofn. So Ïƒ(n) is at least kS+1, which is too big..mau..mau. It is a little trickier than that. Mark wrote that sigma(n) is the sum of all the divisor of n, but it is really the sum of the positive divisors of n. (The sum of *all* divisors of 6 would be (-6)+(-3)+(-2)+(-1)+1+2+3+6=0.) Of course, throwing in the negative divisors is completely boring because you always get zero. The same probelm occurs with the Gaussian integers (if a divides b, so do i*a, -a and -i*a) but this time the solution isn’t obvious. So coming up with a good Gaussian generalization of the firendly numbers is not vacuous. (That said, it is probably not the best topic for a dissertation, either :).)

LexivoreThere is a generalization of the divisor function to the Gaussian integers. Mathematica even includes it as DivisorSigma[1, z, GaussianIntegers -> True]. The entry at Mathworld explains the generalized divisor function and has a table containing the first few results: http://mathworld.wolfram.com/DivisorFunction.html

cinereasteSteve (#13),

I hadn’t heard that story before, thanks!

It’s not that I need math to have some use to be able to appreciate it, it’s just that often I find that results that at first seem frivolous are actually signs of deeper connections.

Thaylan$ sigma(4)=7, not 8 as per the article.

Epic Fail GuyAt the risk of sounding like a troglodyte, the friendliness of a number doesn’t seem very useful.

But then the gender of a number (according to the Pythagoreans) is a very important thing… ğŸ™‚

Stephen WellsThanks for the neat proof re. primes and prime powers, very clear now.

billSurely “So $sigma(4)=8,” is another typo, as the proper value of 7 is used later.