# Repeated arithmetic differences approach $6174$

Anybody know a way of proving this?

Take any $4$-digit number. Subtract the smallest number possible from rearranging the digits from the largest number possible, and repeat. By repeating the process a few times you eventually reach $6174$ as a steady number.

E.g., starting with $1242$ results in \begin{align*} 4221-1224&=2997 \\ 9972-2799&=7173 \\ 7731-1377&=6354 \\ 6543-3456&=3087 \\ 8730- 378&=8352 \\ 8532-2358&=6174 \ldots \end{align*}

If I take $2$-digit starting numbers I eventually reach $9$; $3$-digit starting numbers result in $495$. (Trivially $1$-digit numbers will reach $0$ in one step.) $$9,495,6174, \ldots$$ Is there a formula for knowing the steady number for a $n$-digit starting number?

I'll take more of a look later, and throw a computer at it when I get time.

• The claim is not even correct: $1121\mapsto 2111-1112=999\mapsto 999-999=0$, or is $999$ to be viewed as $0999$, so $999\mapsto 9990-0999=8991\mapsto 9981-1899=8082\mapsto 8820-288\mapsto\ldots$? – Hagen von Eitzen Apr 21 '14 at 11:29
• I think it will make the most mathematical sense to assume that in the case $n = 4$, a $3$-digit number starts with a $0$. – 6005 Apr 21 '14 at 11:32
• These numbers are called Kaprekar-constants. For $n=5$ there is no such constant but three cycles, for instance $(53955, 59994)$. mathworld.wolfram.com/KaprekarRoutine.html – benh Apr 21 '14 at 11:49
• What if the following condition is added:- "the digits of the original number are distinct"? – Mick Apr 21 '14 at 11:50