# Proof of convergence of Kaprekar's Constant

I've tried googling this one a bit but nothing seems to come up, even though its considered to be a well known fact.

Why does the kaprekar process of taking a 4 digit number: L, generating L' and L'' such that L' is the digits of L in ascending order and L'' is the digits in descending order and subtracting L' - L'' always converge to the Kaprekar constant of 6174?

Clearly the only value for which this process is constant is 6174 but that doesn't explain why there should be convergence.

One attempt at proof is to determine all the possible numbers that converge to 6174 after a single iteration, and then attempt to reason that each too can be reached by the convergence of even more numbers in such a way that if I continue this reasoning I should cover ALL 4 digit numbers.

But to turn my strategy into induction from brute force casework has become futile. What is the actual proof?

• This old question has some nice links to the literature, so you might look there as well – Semiclassical Jul 26 '14 at 4:08
• I read recently that it is essentially a set of cases, so it's not too illuminating. – marty cohen Jul 26 '14 at 5:16
• What are the basic cases? – frogeyedpeas Jul 27 '14 at 19:58
• You map repeatedly the finite set $\{1000, 1001, \dots9999\}$ onto itself, so either you hit a fixed point, either you reach a cycle. To find out all possibilities, you only have a finite computation to do (but a computer may help). Note that for $3$ digits the only fixed point is $495$, but for $5$ digits there is no fixed point except $0$, and there are $3$ possible cycles, $(62964, 71973, 83952, 74943)$, $(61974, 82962, 75933, 63954)$ and $(53955, 59994)$. – Stop hurting Monica Dec 6 '18 at 10:57

Other solutions are: $$0111_2, 1001_2,3021_4, \qquad 3032_5, 6174_{10}, 92b6_{15}, c3f8_{20},\dots$$
• How you get that system of $14$ equations? – Eduardo S. Oct 23 at 15:24