Now on ScienceBlogs: The Heaving, Voluptuous Breasts of the IPCC Chief

Enter to Win

Good Math, Bad Math

Finding the fun in good math; Shredding bad math and squashing the crackpots who espouse it.

Search

Profile

markcc.jpg
Mark Chu-Carroll (aka MarkCC) is a PhD Computer Scientist, who works for Google as a Software Engineer. My professional interests center on programming languages and tools, and how to improve the languages and tools that are used for building complex software systems.

Donors Choose

Other Information

Add this blog to my Technorati Favorites!

Recent Posts

Recent Comments

Categories

Blogroll

Old Topic Indices

Great Online Books

« Ben Stein and Darwin: Truth is what matters. | Main | Asteroid Apophosis, Orbit Changes, and Boy (not)Geniuses »

XKCD and Friendly Numbers

Category: Numbers
Posted on: April 14, 2008 9:13 PM, by Mark C. Chu-Carroll

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).

Share this: Stumbleupon Reddit Email + More

Comments

1

Interesting that 58/28 = 2...

Posted by: Mgccl | April 14, 2008 9:21 PM

2

D'oh.

I can do the math, I just can't type it.

Posted by: Mark C. Chu-Carroll | April 14, 2008 9:29 PM

3

I love recreational number theory.

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

Posted by: cinereaste | April 14, 2008 9:35 PM

4

cinereaste:

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.

Posted by: Mark C. Chu-Carroll | April 14, 2008 9:37 PM

5

So 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?

Posted by: joee | April 14, 2008 10:03 PM

6

I wonder how long before someone figures out how to port LaTeX over to a blog format...

Posted by: SpotWeld | April 14, 2008 10:25 PM

7

Wordpress 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.

Posted by: Chang Yang | April 14, 2008 10:34 PM

8

but can you explain the "That's nothing. I once lost my genetics, rocketry, and stripping licenses in a single incident" joke?

Posted by: Jabe | April 14, 2008 11:48 PM

9

joee: 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.

Posted by: John Armstrong | April 15, 2008 12:05 AM

10

There'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.

Posted by: MatrixFrog | April 15, 2008 12:39 AM

11

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.

Posted by: .mau. | April 15, 2008 3:40 AM

12
can you explain the [...] joke?

Sorry - it's a fundamental property of comics mechanics that any attempt of explanation will collapse the joke.

Posted by: Torbjörn Larsson, OM | April 15, 2008 7:51 AM

13

cinereaste, 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.

Posted by: Steve | April 15, 2008 9:48 AM

14

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

Posted by: Blake Stacey | April 15, 2008 10:37 AM

15

Is 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.

Posted by: Stephen Wells | April 15, 2008 11:12 AM

16

Doesn't σ(4) = 1 + 2 + 4 = 7 not 8 as you claim above: "\sigma(4)=8"?

Posted by: Starhawk Laughingsun | April 15, 2008 12:38 PM

17

Stephen,

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 n had this characteristic ratio. Then we must have σ(n)=k(p+1) and n=kp for some integer k (bigger than 1). This means that kp, k and 1 are (some) factors of n. 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.

Posted by: Davis | April 15, 2008 1:13 PM

18

Addendum 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 n has the same ratio, we must then have σ(n)=kS and n=kpm. This means 1, k, kp, kp2,..., kpm are all factors of n. So σ(n) is at least kS+1, which is too big.

Posted by: Davis | April 15, 2008 1:23 PM

19

.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 :).)

Posted by: .mau. | April 15, 2008 5:59 PM

20

There 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

Posted by: Lexivore | April 15, 2008 6:31 PM

21

Steve (#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.

Posted by: cinereaste | April 15, 2008 8:03 PM

22

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

Posted by: Thaylan | April 16, 2008 10:15 AM

23

At 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... :)

Posted by: Epic Fail Guy | April 16, 2008 10:52 PM

24

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

Posted by: Stephen Wells | April 17, 2008 5:11 AM

25

Surely "So $\sigma(4)=8," is another typo, as the proper value of 7 is used later.

Posted by: bill | April 22, 2008 8:02 PM

Post a Comment

(Email is required for authentication purposes only. On some blogs, comments are moderated for spam, so your comment may not appear immediately.)






Stats

ScienceBlogs

Search ScienceBlogs:

Go to:

Advertisement
Collective Imagination
Enter to win the daily giveaway
Advertisement
Collective Imagination

© 2006-2009 ScienceBlogs LLC. ScienceBlogs is a registered trademark of ScienceBlogs LLC. All rights reserved.