12
$\begingroup$

Kaprekar discovered the Kaprekar constant or $6174$ in $1949$. He showed that $6174$ is reached in the limit as one repeatedly subtracts the highest and lowest numbers that can be constructed from a set of four digits that are not all identical.

e.g. starting with $1234$, we have $4321 − 1234$ = $3087$, then $8730 − 0378$ = $8352$, and $8532 − 2358$ = $6174$.

But, Why we reach to $6174$ through this process ? I think, subtraction is always divisible by $3$....(not sure)

  • 0
    What happens with numbers like $\,1792\,$? Here we get $$9721-1279=8442...$$and the end comes abruptly as I get a number with two equal digits!?2012-08-12
  • 0
    @DonAntonio: If you continue your example, you do eventually reach 6174.2012-08-12
  • 0
    Sir, if we continue this process,then we will get 1782, which has no digits in common.2012-08-12
  • 0
    @ram: Have you studied the cases of 2 and 3 digits first? For 2 digits, one can get cyclic behavior without a fixed point. (E.g. $01 \rightarrow 09 \rightarrow 81 \rightarrow 63 \rightarrow 27 \rightarrow 45 \rightarrow 09 \rightarrow \dots$)2012-08-12
  • 0
    @MichaelJoyce, I know: I already did the calculations, but the OP mentions number with 4 *different* digits...2012-08-12
  • 0
    Not 4 different, but 4 not all identical, since as you see starting with $nnnn$ immediately goes to $0000$. There are unique Kaprekar constants in 3 and 4 digits, but cyclic "constants" in other lengths-I don't know if it's proven that no larger length has a single fixed point, or results for other bases, but I don't believe there's any general fact that answers the OP's "why."2012-08-12
  • 2
    @DonAntonio When the OP says "4 digits which are not all identical", I believe he/she means 4 digits which are not all the same digit.2012-08-12
  • 0
    Ah, we know that there are only finitely many Kaprekar's constants in any base (digit lengths that give a unique fixed point under this procedure) and that 495 and 6174 are the only ones in base 10. http://www.emis.ams.org/journals/HOA/IJMMS/2005/182999.pdf2012-08-12
  • 0
    With 1112 you go to [0]999 which has a digit sum of 27 (similarly 1113 to 1998 ...)2012-08-12
  • 0
    See also http://oeis.org/A099009 and references there.2012-08-12

3 Answers 3

10

$6174$ is a fixed-point of this process, i.e. $7641 - 1467 = 6174$. It turns out that it is the only fixed point, and there are no nontrivial cycles.

The sum of digits of the difference could also be $27$, e.g. for $6555-5556$.

  • 0
    Do you have a proof on hand for these assertions (uniqueness of fixed point, no cycles)?2013-01-30
  • 0
    I missed the link to http://oeis.org/A099009 posted above. However my questions still remain unanswered. Furthermore, there are non-trivial fixed points, just none of them are small enough to matter.2013-01-30
  • 0
    Did you look at the paper Kevin Carlson referred to, and the references therein?2013-01-30
  • 0
    There are only $9000$ four-digit decimal numbers. One way to prove the uniqueness of fixed point and absence of cycles is to check what happens to each of those numbers.2013-01-30
  • 0
    Thanks for the comments. I missed the link to the paper and I now I see that this is a well-studied problem. The uniqueness method you suggest is pretty brute-force; I suppose this indicates that this is a pretty "artificial" question, without interesting mathematical content behind it.2013-01-30
0

After one subtraction you will have a number divisible by $9$ because the remainder on division by $9$ is not changed when you rearrange the digits. That is not a problem as $6174$ is divisible by $9$. The statement that we always reach $6174$ rests on (as best I know) a search of the possibilities. If you just look at multiples of $9$ there are only $1000$ to look at, which is not so many even by hand. You only have to look at one permutation of each set of digits, which reduces the search considerably. There may be other ways to limit the search.

0

When considering only 4 digit numbers, this problem can be expanded to any base and when you do that it can then be reduced to a system of 14 equations. 6174 is the only solution in base 10.

Other length 4 solutions are: $$0111_2, 1001_2,3021_4, \qquad 3032_5, 6174_{10}, 92b6_{15}, c3f8_{20},\dots $$