## Friday, October 16, 2009

### 101 Interesting Things, part twenty-seven: Kaprekar's constant

Hi, everybody! D here, with a magic trick just for you! I'm only half-joking, I promise.

Today's 101 Interesting Things is brought to you by Rhodopsin. It's also interactive, and all you need is a pencil and paper, or a calculator, or a head for numbers. Let's get started! Pick a four-digit number, any four-digit number, as long as all four digits aren't the same (you can't pick 0000, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, or 9999). Numbers with leading zeroes, such as 0103, or even 0001, are perfectly fine.

Got it yet? OK, now arrange the digits in ascending and descending order. For example, if you picked 4092, you would write 0249 and 9420. Still with me? Now calculate their difference. With our sample, 9420-0249=9171.

Lather, rinse, and repeat:
9711-1179=8532
8532-2358=6174
7641-1467=6174
OH SHIT, SON! Look at that! Now here's the magic part: I bet you can't find a number that will take more than seven steps to get to 6174. You know why? Because 6174 is Kaprekar's constant. Or, rather, it's called Kaprekar's constant because an Indian mathematician named Kaprekar discovered this rather interesting property of what I would have thought was just a regular old number. Now, quick! Go and pull this trick on anyone you can, and find a way to take their money with it!

EDIT: An anonymous contributor has mentioned, below, a sourceforge.net page which lists several interesting consequents of the Kaprekar constant. It's not all quite as interesting as perhaps the Kaprekar constant might be in everyday life, but it's still way more interesting than your life is in comparison to... umm... any historical figure. That is, assuming I'm not addressing any historical figures at the moment... anyway, it's November now, which means that it's National Novel Writing Month, which means that I'm devoting most of my time to novelling and less of it to blogging. Point is, if you like math, you should check out Anonymous' contribution.

#### 4 comments:

Ebonmuse said...

Holy crow, that's cool! My fiancee and I tried a few different starting points just so we could ooh and aah at it all. :)

I often oscillate between believing that mathematics is just another human-constructed language, albeit a more rigorous and precise one, and believing that it's a window into a strange and beautiful world of pure ideas, which we did not invent but were waiting to be discovered. I must confess that results like this incline me more toward the latter view.

D said...

In the words of my friend Andrew, "Mathematics is the study of interesting tautologies." Things like Kaprekar's constant are emergent properties of a decimal counting system, and different interesting things would emerge from an octal counting system (which is like decimal, but without thumbs), or a binary one (which is like decimal, but only thumbs), or any other one.

Oh, man... I can't believe I'm a quarter of the way through this project already, and I haven't even written about the sieve of Eratosthenes or the proof that the square root of two is an irrational number!

But yeah, as for ideas "waiting to be discovered," think of it this way: phonetic language entails rhymes, and a theory of music entails melodies. It's just a matter of finding the most interesting ones from there.

Anonymous said...

You can generate a whole bunch of these using the Kaprekar number generator - http://kaprekar.sourceforge.net/

D said...

Wow, that's some awesome math right there! Thanks for the contribution, I've added your link and credited you. Have a great one, Anonymous!