Definition. Let K act on 4‑digit strings (leading zeros kept) as follows: write the digits in descending and ascending order to form two 4‑digit numbers, then subtract and pad with leading zeros to 4 digits. We denote the result by K(x).
Fixed points and traps. (i) 6174 is a fixed point: K(6174) = 6174. (ii) For every rep‑digit aaaa, the ascending and descending sorts coincide, so K(aaaa) = 0000 and then K(0000) = 0000. Thus the only non‑converging starts are the ten rep‑digits, which fall into the absorbing state 0000.
Claim. Every non‑rep‑digit 4‑digit state reaches 6174 in finitely many steps. The map K acts on the finite set of 10,000 states. Aside from the trap at 0000 (reached exactly by rep‑digits), there are no other cycles; consequently every orbit that avoids 0000 must flow into the fixed point 6174. Our harness below confirms this by exhaustive enumeration and shows that the worst‑case time‑to‑reach is 7 steps.
In short: rep‑digits collapse to 0000; everything else flows to the unique fixed point 6174.
Do convergers + non‑convergers add up to 10,000?
| k steps | count | percent | example path |
|---|
Everything is computed on page load by sweeping all 10,000 states with leading zeros kept. You can view source to see the tiny harness.