GCSE
GCSE (Foundation)GCSE (Higher)
A-level
IB
IB AA (Standard Level)IB AA (Higher Level)
1-1 Tutoring
← All articles

Every four-digit number falls into the same black hole

Pick any four-digit number that uses at least two different digits, and a simple subtraction game will drag it to 6174 in at most seven moves — every single time. The rule, discovered by the Indian mathematician D. R. Kaprekar in 1949, is this: arrange the digits in descending order, arrange them in ascending order, and subtract the smaller from the larger. Then do it again to the result. Whatever you start with, you fall into 6174 — and once there, you never leave. Mathematicians call it Kaprekar's constant, and it behaves exactly like a numerical black hole.

The best part: this is one famous claim we do not have to take on trust. There are only 9,000 four-digit numbers, so in this paper we will check all of them.

The routine in action

Let us feed it 3524. Sort the digits descending (5432), sort them ascending (2345), subtract:

54322345=30875432 - 2345 = 3087

Now repeat with 3087. Descending gives 8730, ascending gives 0378 — we keep leading zeros, treating every number as four digits:

87300378=83528730 - 0378 = 8352

Once more, with 8352:

85322358=61748532 - 2358 = 6174

Three steps, and we have arrived. And 6174 is a genuine trap: its digits sorted give 7641 and 1467, and

76411467=61747641 - 1467 = 6174

The process eats its own output and returns it unchanged — a fixed point.

The Kaprekar routine pulling 3524 into the fixed point 6174 in three steps

The rule demands "at least two different digits", and the reason is immediate. Take a repdigit like 1111: descending order is 1111, ascending order is 1111, and the subtraction gives 0000 — which then produces 0000 forever. Zero is a black hole too, just a boring one, and only the nine repdigits (1111, 2222, ..., 9999) fall into it. Every one of the other 8,991 four-digit strings escapes this fate, because sorting the digits two ways gives two genuinely different numbers, so the subtraction can never collapse to zero.

Checking all 8,991 — no exceptions

The claim is finite, so we verified it by brute force: run the routine on every four-digit number from 1000 to 9999 that is not a repdigit. The result is total: all 8,991 starting numbers reach 6174, and none needs more than 7 steps. The step counts break down like this: 356 numbers arrive in one step, 519 in two, 2,124 in three, 1,124 in four, 1,379 in five, 1,508 in six, and 1,980 numbers need the full seven (6174 itself is already home in zero). The longest journeys are common — more than a fifth of all starting points take the maximum route — but nothing wanders, nothing cycles, nothing escapes.

Why does it work? Roughly: the descending-minus-ascending subtraction cares only about which digits you hold, not their order, so 9,000 numbers instantly funnel into a much smaller set of possible differences — and within that small set, iterating the map happens to leave 6174 as the only closed loop. It is less a deep theorem than a lucky property of base ten and four digits, which the exhaustive check confirms directly.

Four digits are not special in having a black hole, but they are special in having such a tidy one. Run the same game on three-digit numbers (again banning repdigits like 555) and every one of the 891 valid starting points falls into 495 within at most 6 steps — we checked those exhaustively too. But the pattern is fragile: for two-digit and five-digit numbers there is no single constant at all; the process settles into cycles, orbiting several values forever instead of freezing on one. The existence of a lone fixed point at 6174 and 495 is a quirk of those particular digit lengths in base ten.

A black hole we have mapped

Kaprekar's constant is honestly labelled a curiosity: no grand theory rests on 6174, and the "why" bottoms out in checking cases rather than in some deep structural insight. But it earns its fame in a way many famous claims do not — it is completely verified. All 8,991 valid starting numbers, all confirmed, at most 7 steps, forever. Contrast that with the superficially similar Collatz conjecture, where an even simpler rule has been tested on absurdly many numbers yet remains unproven to this day. Kaprekar's black hole is small, but it is one of the few whose event horizon we have mapped in full.


References:

[1] D. R. Kaprekar, "Another Solitaire Game," Scripta Mathematica 15 (1949), 244–245.

[2] Yutaka Nishiyama, "Mysterious number 6174," Plus Magazine (March 2006), plus.maths.org.

Note: All convergence counts in this paper come from an exhaustive computer check of every four-digit starting number, with leading zeros retained at each step (so 999 is treated as 0999).