6,174 is the fixed destination of a genuinely self-verifying arithmetic routine discovered in 1949 by Dattatreya Ramchandra Kaprekar, an Indian schoolteacher working in Devlali, Maharashtra, who spent much of his career exploring recreational number properties independently, largely outside formal academic mathematics, and published his findings in low-circulation local journals that took decades to reach wider international recognition.
Kaprekar's Routine, Step by Step
The routine, now called Kaprekar's routine in his honor: take any four-digit number with at least two different digits (a repdigit like 1111 breaks the process, since every rearrangement is identical). Arrange its digits to form the largest possible number and the smallest possible number, then subtract the smaller from the larger. Repeat the same process with the result. Try it starting from 2,856: largest arrangement 8,652, smallest 2,568, difference 6,084. Repeat with 6,084: largest 8,640, smallest 0,468 (=468), difference 8,172. Repeat with 8,172: largest 8,721, smallest 1,278, difference 7,443. Repeat with 7,443: largest 7,443, smallest 3,447, difference 3,996. Repeat with 3,996: largest 9,963, smallest 3,699, difference 6,264. Repeat with 6,264: largest 6,642, smallest 2,466, difference 4,176. Repeat with 4,176: largest 7,641, smallest 1,467, difference 6,174. Once reached, 6,174 becomes a fixed point: 7,641 − 1,467 = 6,174, forever, no matter how many more times you repeat the process.
Almost Every Starting Number Converges
What makes this genuinely remarkable is that it works for essentially every valid four-digit starting number — not just carefully chosen examples — always converging to exactly 6,174 within at most seven iterations (some starting numbers reach it in a single step; the specific example above happened to take the full seven, deliberately chosen to show the routine's full worst-case length). This isn't proven by any single elegant formula the way, say, Euclid's perfect-number construction is; it's been verified by exhaustive computer checking of every valid four-digit starting value, confirming there's no exception anywhere in the range.
Beyond Four Digits
Kaprekar's routine isn't limited to four-digit numbers — applying the identical process to three-digit numbers instead converges to a different fixed point, 495, in at most six iterations, a distinct but structurally parallel result also discovered by Kaprekar. Interestingly, the routine doesn't produce a single clean fixed point for every digit-length: some digit counts instead cycle between a small set of repeating values rather than settling on one constant, a genuinely more complicated behavior that depends on the specific number of digits involved in a way that isn't fully predictable from a simple pattern.
Kaprekar's broader body of recreational-mathematics work extends well beyond this one routine — he's also credited with studying "Demlo numbers" (a family of numbers related to repunits and their squares) and various other digit-pattern curiosities, publishing largely in Indian mathematical circles for decades before Western mathematicians took wider notice of his work later in the 20th century. As a plain integer, 6,174 factors as 2 × 3² × 7³ — a composite number whose ordinary divisor structure has no direct bearing on the digit-rearrangement property that made it famous, much like other numbers on this site whose fame rests on a specific digit-based behavior rather than their prime factorization alone.
Kaprekar's routine also extends, with genuinely different behavior, to digit counts beyond three and four: some digit-lengths converge to a single fixed point the way three and four digits do, while others instead settle into a short repeating cycle of several values rather than a single constant — a distinction that depends on deeper structural properties of each specific digit length rather than following any simple, predictable rule from one digit-count to the next. This variability is itself part of what makes 6,174's clean, universal, single-fixed-point behavior for four-digit numbers feel especially notable rather than a routine, expected outcome of the general process.
Kaprekar's own account of discovering the constant reportedly came from playing with digit-rearrangement games during ordinary arithmetic teaching, rather than from a deliberate, formal research program — a genuinely grassroots origin for a mathematical result that later attracted formal academic attention and verification well beyond the informal circumstances of its original discovery, and a small reminder that genuinely interesting mathematics doesn't always originate from formal institutional research settings, sometimes emerging instead from ordinary, curious tinkering with numbers that anyone with pencil and paper could, in principle, have stumbled onto themselves.