1. The problem
Take any four-digit number whose digits are not all the same, say 3524. Arrange its digits in descending order (5432) and ascending order (2345) and subtract:
Try another start. And another. Where do you end up?
2. The answer
3. Why it works
Write the digits in order a ≥ b ≥ c ≥ d. Then
So the result depends only on two differences, a − d (1 to 9) and b − c (0 to a − d). After the very first step there are only about 50 possible numbers, and one can simply check them all — the map squeezes everything into a tiny set, which funnels into the single fixed point 6174. It is a proof by exhaustion rather than an elegant argument, which is part of its charm.
D. R. Kaprekar, a school teacher from Devlali, Maharashtra, found it in 1949. He also discovered Kaprekar numbers (45² = 2025 and 20 + 25 = 45) and self numbers.
4. Try it
How many steps do all starting numbers need?
5. Fine print
- Keep leading zeros: 2111 − 1112 = 0999, and the next step uses 9990 − 0999 = 8991.
- For two digits the routine falls into a loop (63 → 27 → 45 → 09 → 81 → 63) instead of a single number; for five digits there are loops too. Four and three digits are special.