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.

  • 1
    $\begingroup$ 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$? $\endgroup$ – Hagen von Eitzen Apr 21 '14 at 11:29
  • 1
    $\begingroup$ 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$. $\endgroup$ – 6005 Apr 21 '14 at 11:32
  • 3
    $\begingroup$ 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 $\endgroup$ – benh Apr 21 '14 at 11:49
  • $\begingroup$ What if the following condition is added:- "the digits of the original number are distinct"? $\endgroup$ – Mick Apr 21 '14 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.