Abstract
Arrange the digits of a number in descending order and subtract the number with them in ascending order; repeat on the difference (Kaprekar’s routine). For each number of digits, where it ends up is counted over all starting points. No new theorem or law is claimed.
First, four digits reach $6174$ from every start——all $9990$ numbers other than repdigits reached $6174$ within $7$ steps. $6174$ returns to itself: $7641-1467=6174$. The most common count is $3$ steps ($2400$ numbers), then $7$ steps ($2184$) (Section 2).
Second, three digits reach $495$——all $990$ numbers reached $495$ within $6$ steps (Section 2).
Third, and this is the core. Five and two digits have nowhere to stop——the $99990$ five-digit numbers split into two cycles of four numbers ($48480$ and $48320$) and one cycle of two ($3190$), none stopping at a single number. The $90$ two-digit numbers enter the cycle through $9$, $81$, $63$, $27$, $45$ (Section 2).
Fourth, the fixed points can be found directly from digit combinations——searching for digit combinations whose sorted difference returns the same combination gives $495$ for three digits, $6174$ for four, $549945$ and $631764$ for six, and none for five or two. They matched the fixed points found by running the routine (Section 3).
Fifth, the separator is the number of digits——the same routine stops at one number for three and four digits, circles for five and two, and splits into two numbers and a cycle for six (Section 4).
Keywords: Kaprekar’s routine, 6174, fixed point, cycle, digit rearrangement.
Scope (what is not claimed)
No new theorem or law is claimed——the property of $6174$ (Kaprekar, $1955$) and the classification of destinations for each number of digits (Prichett and coauthors, $1981$) are known. The general theory for any number of digits is not treated——two to six digits are only counted over all starting points. Bases other than ten are not treated——in other bases the destinations change. Relation to earlier papers: Paper 161 showed that “fixed point” theorems are different things according to what each demands and delivers——here the fixed point of the same routine exists or not depending only on the number of digits. What is added is counting the destinations of all starting points for two to six digits (six digits weighted by the number of arrangements of each digit combination), matching the fixed points by two routes, running and searching combinations, and placing the separator on the number of digits.
1. Notation and the Question
Setting: for a $d$-digit number (leading zeros counted as digits), subtract the number with the digits in ascending order from the number with them in descending order, and repeat. Repdigits (such as $1111$) give $0$ and are excluded. A number returned to itself by the routine is called a fixed point.
Question: for each number of digits, where does the routine end up, and when is there a fixed point?
2. Running Every Start
Computation 2.1: for two to five digits every starting point was run; for six digits each digit combination was run once and weighted by its number of arrangements (the weights summed to $10^6$ minus the $10$ repdigits).
| digits | starts | destination |
|---|---|---|
| 2 | $90$ | the cycle $9$, $81$, $63$, $27$, $45$ |
| 3 | $990$ | $495$ |
| 4 | $9990$ | $6174$ |
| 5 | $99990$ | a 4-cycle ($48480$), a 4-cycle ($48320$), a 2-cycle ($3190$) |
| 6 | $999990$ | a 7-cycle ($935520$), $631764$ ($62520$), $549945$ ($1950$) |
The five-digit cycles are $\{61974,63954,75933,82962\}$, $\{62964,71973,74943,83952\}$ and $\{53955,59994\}$; the six-digit cycle is $\{420876,642654,750843,840852,851742,860832,862632\}$.
Computation 2.2: for four and three digits, the steps to the fixed point were counted.
| steps | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $7$ |
|---|---|---|---|---|---|---|---|---|
| four digits (to $6174$) | $1$ | $383$ | $576$ | $2400$ | $1272$ | $1518$ | $1656$ | $2184$ |
| three digits (to $495$) | $1$ | $149$ | $144$ | $270$ | $222$ | $150$ | $54$ | — |
Observation 2.3 four digits stop at $6174$ within $7$ steps from every start. Rearranging the digits of $6174$ gives $7641$ and $1467$, whose difference is exactly $6174$ again——most numbers arrive in $3$ steps, but $2184$ need $7$.
3. Searching Combinations
Computation 3.1: independently of running, every combination of $d$ digits was arranged and those whose descending-minus-ascending difference has the same digit combination were sought.
| digits | fixed points found from combinations |
|---|---|
| 2 | none |
| 3 | $495$ |
| 4 | $6174$ |
| 5 | none |
| 6 | $549945$, $631764$ |
For every number of digits they matched the destinations of length $1$ found by running.
Observation 3.2 fixed points are fixed by the digit combination alone. The result of the routine depends only on the combination of digits, not their order, so a number returning to itself comes from a combination satisfying “the digits of the difference form the same combination”——for five digits no combination satisfies it, so five-digit numbers never stop, wherever they start.
4. The Separator
Observation 4.1 this is the core: the separator is the number of digits. The same routine of sorting and subtracting stops at one number for three and four digits, keeps circling for two and five, and splits into two fixed points and a cycle for six——one more digit decides whether a fixed point exists.
Observation 4.2 beside Paper 161. Paper 161 showed that “fixed point” theorems are different things according to what each demands and delivers——here, for a finite map with neither continuity nor convexity, whether a fixed point exists is decided not by a theorem but by counting. Only $1950$ of the $999990$ six-digit numbers reach $549945$: existing and attracting many are different things.
Observation 4.3 what is not said. The general theory for any number of digits and bases other than ten are not treated——what is shown is the destination of every starting point from two to six digits, and the matching of fixed points by two routes.
5. Roll Call and Closing
- all $9990$ four-digit numbers reach $6174$ (Computation 2.1): within $7$ steps.
- $7641-1467=6174$ (Observation 2.3): it returns to itself.
- $3$ steps for $2400$, $7$ steps for $2184$ (Computation 2.2): the distribution of steps.
- all $990$ three-digit numbers reach $495$ (Computation 2.1): within $6$ steps.
- five digits have nowhere to stop (Computation 2.1): three cycles.
- two digits form a cycle of length $5$ (Computation 2.1): $9$, $81$, $63$, $27$, $45$.
- six digits: two fixed points and a 7-cycle (Computation 2.1): $549945$ and $631764$.
- fixed points from combinations match (Computation 3.1): two routes.
- the separator is the number of digits (Observation 4.1): the core.
- existing is not attracting many (Observation 4.2): Paper 161.
Closing: Repeatedly subtract the number with the digits in ascending order from the one with them in descending order. Four digits reach $6174$ within $7$ steps from every start, three digits reach $495$——confirmed over all $9990$ and $990$ starting points. Five and two digits have nowhere to stop——five digits split into three cycles and never stop, two digits circle a cycle of length $5$; searching digit combinations directly, no fixed point exists for five or two digits. The separator is the number of digits——the same routine stops or keeps circling depending on a single digit more or less. Placed among the earlier papers——unlike the fixed-point theorems of Paper 161, the fixed points of a finite map are decided by counting. To be honest——neither a general theory nor other bases are entered; two to six digits were only counted.
References
- Kaprekar, D. R. (1955). An interesting property of the number 6174. Scripta Mathematica.
- Prichett, G. D., Ludington, A. L., & Lapenta, J. F. (1981). The determination of all decadic Kaprekar constants. The Fibonacci Quarterly.
- Yamagishi, Y. (2026). A Fixed Point Is Not One Theorem [Paper 161]. Zenodo. 10.5281/zenodo.22092530
Reference
Yamagishi, Y. (2026). Sorting Digits and Subtracting Reaches 6174 for Four Digits, and Reaches No Fixed Point for Five [Paper 622]. YOI: https://www.yamagishiyuuki.com/yoi/622
DOI: 10.5281/zenodo.23014520
ORCID: 0009-0006-8587-3450
PDF (English) · PDF (Japanese) · Date proof of the English PDF (OpenTimestamps .ots) · SHA256SUMS
The record page for this paper (in Japanese, with the PDFs in each language and the date proof): YOI 622. This paper is a preprint and has not been peer reviewed.