10

Kaprekar's constant, or 6174, is a constant that arises when we take a 4-digit integer, form the largest and smallest numbers from its digits, and then subtract these two numbers. Continuing with this process of forming and subtracting, we will always arrive at the number 6174. 6174 is known as Kaprekar's constant after the Indian mathematician D. R. Kaprekar. The above process, known as Kaprekar's routine, will always reach its fixed point, 6174, in at most 8 iterations. Once 6174 is reached, the process will continue yielding 7641 – 1467 = 6174.

What exactly is the logic behind this process? Is there any intuitive proof?

Adit T.
  • 101
  • 1
    Probably not; the outcome could have been lots of things, but it seems that it just happened to be this outcome. – Greg Martin Jun 26 '21 at 05:58
  • 1
    This may help: https://math.stackexchange.com/questions/1325033/proof-of-6174-as-the-unique-4-digit-kaprekars-constant – Aniketh Malyala Jun 26 '21 at 07:40
  • (a) Given the procedure, the first digit is likely to be close to $6$ (largest digit minus smallest digit, possibly minus an additional $1$). (b) Similarly, the last digit will be $10$ plus the smallest digit, minus the largest digit. So the outer digits will add up to $9$ or $10$. (c) The number will be divisible by $9$, which means that the sum of digits is $18$, meaning that the inner digits (which likely contain the largest and smallest digits) will add up to either $8$ or $9$. These observations limit the choices considerably. – Brian Tung Apr 21 '25 at 22:27

3 Answers3

5

The way I see it: imagine all the possible procedures you could do on all the possible intervals of numbers. You're looking for one reasonably simple procedure on an easily described interval which has the property that it has a unique fixed point. Loads of procedures have fixed points (e.g. Brouwer's theorem; $1-1/e \approx 63\%$ of all permutations are not derangements and therefore have at least one fixed point; etc.). Some of them will have unique fixed points. Finding a particularly nice procedure with a unique fixed point is probably going to be challenging, but when crowd-sourced it's not too surprising that somebody found one.

From that perspective, it's likely to be a fluke without any interesting proof. It'd be like looking through millions of rocks on a beach and trying to explain why the roundest one you found was so round. (That said, I'm completely ignorant of the specifics here, and for all I know there is a "nice" proof. That would be surprising, and I'd like to see it.)

2

Here's some hand-waving. You have a function on a finite set. Most functions are not one-to-one, so the image of the function is probably smaller than the original set. Now apply the function to the image. The image of the image is probably smaller than the image. If you keep doing this, you shouldn't be surprised that you arrive as some smaller fixed set that maps onto (and one-to-one) itself. For some functions, that final fixed set has only one element.

The proof of Kaprekar's constant uses that idea. After one application of the function, you have a lot fewer cases to check. Step one is to show that after one application of the function, you have a multiple of $9$. So the image set is $1/10$ the size of the original set. Step two is to realize that it's sufficient to check only numbers which have decreasing digits. There are only $79$ four-digit multiples of $9$ with decreasing digits.

B. Goddard
  • 33,728
1

I think the reason is that, in base 10, the map $f:X \rightarrow X$ defined by Kaprekar is onto and contractive, so by the contraction mapping theorem, there is a unique fixed point. In other bases the map is not contractive but is onto, so by the Brouwer Fixed Point Theorem, it must have a fixed point (possibly more than one). The Wikipedia page Kaprekar's routine gives exact results for many bases.

GKordas
  • 36