top | item 2625832

Mysterious number 6174

188 points| shii | 15 years ago |plus.maths.org | reply

64 comments

order
[+] alphaBetaGamma|15 years ago|reply
I find Kaprekar's operation totally uninteresting because it is (or at least seems to me) totally linked to base ten representation of numbers.

If at least you had a result like "in any base, the analogue of Kaprekar's operation in that base has a fixed point for digits of length 3 or 4 only", it would be mildly interesting. But as it is it's not math, just senseless symbol manipulation.

[+] JoachimSchipper|15 years ago|reply
"Recreational mathematics". Don't take it too seriously, the practitioners don't either.

But yes, the fact that this is bound to a decimal system suggests that there are no deep wisdoms here.

[+] lurker19|15 years ago|reply
Perhaps you should set out to prove or disprove that conjecture, instead of writing an uninteresting post that is just senseless symbol manipulation linked to the base-26 representation of English.
[+] raganwald|15 years ago|reply
It looks like this essay is saying that 6174 is a fixed point for Kaprekar's operation on four-digit numbers.

http://en.wikipedia.org/wiki/Fixed_point_(mathematics)

[+] shou4577|15 years ago|reply
In fact, it says that 6174 is more than just a fixed point, it is also the only fixed point, and an attracting fixed point. That is, every four digit number with transform to 6174 in finite (indeed, less than 7) steps under Kaprekar's operation.

This is significantly stronger than just being a fixed point. As an analogy, when modeling population dynamics, one often finds both stable and non-stable equilibrium solutions. The stable ones are the only solutions that can occur in nature, and so their stability is an important thing to note. This stability often (I hesitate to say always) is the result of the solution having the same attractive nature as 6174 does.

[+] pnathan|15 years ago|reply
I am drawn to wonder if there is a discrete limit operation, and taking the discrete limit of Kaprekar's operation on all 4-digit numbers yields 6174.

My mastery of fixed-point mathematics is rusty, so I am unsure if that is identical to the above...

[+] andrewflnr|15 years ago|reply
This is indeed very interesting, but it's no surprise that it's just incidental. This and similar phenomena are just artifacts of our base-10 number system.
[+] GrangalanJr|15 years ago|reply
Made a visualization: x coordinate is the initial numbers, y coordinates are the "intermediate" numbers hit on the way to 6174. Diagonal is obviously the plot of the starting numbers. :-)

http://i.imgur.com/DfxRB.png

[+] vorg|15 years ago|reply
Have you compared this visualization with the one for 495 and with the two digit numbers?
[+] caf|15 years ago|reply
Kaprekar's operation on binary numbers behaves in a much more predictable fashion - for example, under Kaprekar's operation on N digit binary numbers, 2^(N-1) - 1 is always a fixed point.
[+] thesz|15 years ago|reply
If you look close enough, all those "special" numbers are divisible by 9.

I made a quick experiment with other bases.

3-digits numbers, base 8 has fixed point 374_8=252_10. 252 `mod` 7 = 0.

base-9, base-11 and base 13 seem do not have fixed points.

base-12, 3 digits has (at least one) fixed point 5b6_12 = 858_10. 858 `mod` 11 = 0.

I think, it exploits some properties of positional notation of numbers so that fixed points all divisible by (base-1).

[+] davnola|15 years ago|reply
Not just the special numbers.

Kaprekar's operation always results in a multiple of 9.

Given a > b > c > d. Kaprekar's operation gives:

    1000a + 100b + 10c + d - (1000d + 100c + 10b + a)
    =999(a - d) + 90(b - c)
    =9(111(a - d) + 10(b - c))
And so on for integers with other numbers of digits.
[+] Luyt|15 years ago|reply
"The program, which was about 50 statements in Visual Basic, checked all of 8991 four digit numbers from 1000 to 9999..."

Whoa, you need 50 statements in VB for that? I need 14 in Python:

    import collections

    def kaprekar(k):
        nr = 0
        while True:
            if k == 6174: return nr
            small = int("".join(sorted(list("%04d" % k))))
            large = int("".join(sorted(list("%04d" % k), reverse=True)))
            k = large - small
            nr += 1
    
    freqs = collections.defaultdict(int)        
    for i in range(1000, 10000):
        if not i % 1111: continue # skip 1111, 2222, etc...
        freqs[kaprekar(i)] += 1

    for k,v in freqs.items():
        print k, v
Outputs:

  0 1
  1 356 
  2 519
  3 2124
  4 1124
  5 1379
  6 1508
  7 1980
[+] Sandman|15 years ago|reply
And somebody programming in some other language might need even less lines. What's your point?
[+] Ruudjah|15 years ago|reply
Every number is special. Every number has something on where you can apply rules to, and thus makes it special. Is there a database containing all the numbers and a list of atributes that make them special?
[+] andrewflnr|15 years ago|reply
All the numbers? ALL of them? :)
[+] ZeSmith|15 years ago|reply
Which domain? Reals? That's a lot of numbers. Infinity, in fact.
[+] 51Cards|15 years ago|reply
Thanks for posting this, really enjoyed reading it.
[+] mohsen|15 years ago|reply
i appreciate posts that anyone can enjoy regardless of their profession
[+] ChuckMcM|15 years ago|reply
Its all fun and games until you think May 21st is the date the world will end.

More seriously, numbers, and number theory, can be quite interesting and often leads to computational insight in algorithm computation or numerical solving. But ultimately, unless you're a numbers geek, it [ edit: Kaprekar numbers [1] ] doesn't [ don't ] really teach anything.

[1]Sheesh, this place has lost its sense of humor.

[+] raganwald|15 years ago|reply
Let's say you fancy yourself as a cryptographer. You come up with a black box, it's a function that takes a number and produces another number. You figure you can use it to build a pseudorandom stream of numbers that will be the source of a cipher.

Your algorithm is to start with a random number (the key) and and feed it to your function, producing another number. Which you feed to your function, producing a third number. And so you go, generating a stream of numbers for your cipher.

After reading how Kaprekar's operation leads to a fixed point for four digit numbers and various cycles for other numbers, you might be nudged into investigating to see if there are inputs for your function that lead to cycles and fixed points. Which would pretty-much break your cipher entirely.

Is this interesting? Yes. Is there computational insight? There is for me. Does it teach anything? I dunno, how is teaching something distinguished from providing insight?

[+] Xk|15 years ago|reply
> Its all fun and games until you think May 21st is the date the world will end.

... what? That has nothing to do with number theory.

> More seriously, numbers, and number theory, can be quite interesting and often leads to computational insight in algorithm computation or numerical solving. But ultimately, unless you're a numbers geek, it doesn't really teach anything.

There are a number [1] [2] [3] [4] of practical uses of number theory that do teach something. I've only listed the simplest uses with respect to cryptography, because those are the ones with which I am familiar, but I assure you, number theory is one of the more applied branches of mathematics.

Granted, some number theory has very few applications. But you won't ever find something practical if you're always asking "Is this practical? I better not look further if it isn't."

[1] http://en.wikipedia.org/wiki/RSA

[2] http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exch...

[3] http://en.wikipedia.org/wiki/Digital_Signature_Algorithm

[4] http://en.wikipedia.org/wiki/Elliptic_curve_cryptography

[+] JoachimSchipper|15 years ago|reply
I think you're getting downvoted for conflating gematria ("bible numerics", although it's originally Jewish) and number theory as the word is understood by (recreational) mathematicians. This is not terribly useful, but it's not the kind of crazy that led to the May 21 prediction.