13

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)

Learning
  • 1,301
ram
  • 909
  • 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!? – DonAntonio Aug 12 '12 at 07:00
  • @DonAntonio: If you continue your example, you do eventually reach 6174. – Michael Joyce Aug 12 '12 at 07:05
  • Sir, if we continue this process,then we will get 1782, which has no digits in common. – ram Aug 12 '12 at 07:06
  • @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$) – Michael Joyce Aug 12 '12 at 07:07
  • @MichaelJoyce, I know: I already did the calculations, but the OP mentions number with 4 different digits... – DonAntonio Aug 12 '12 at 07:11
  • 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." – Kevin Carlson Aug 12 '12 at 07:13
  • 3
    @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. – Alex Becker Aug 12 '12 at 07:13
  • 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.pdf – Kevin Carlson Aug 12 '12 at 07:17
  • With 1112 you go to [0]999 which has a digit sum of 27 (similarly 1113 to 1998 ...) – Mark Bennet Aug 12 '12 at 08:22
  • See also http://oeis.org/A099009 and references there. – Robert Israel Aug 12 '12 at 21:37
  • Many more details are available at https://math.stackexchange.com/questions/495399/kaprekars-constant-is-6174-proof-without-calculation/3890249#3890249 – Ross Millikan Nov 06 '20 at 15:11

3 Answers3

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$.

Robert Israel
  • 448,999
  • Do you have a proof on hand for these assertions (uniqueness of fixed point, no cycles)? – pre-kidney Jan 30 '13 at 01:08
  • 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. – pre-kidney Jan 30 '13 at 01:29
  • Did you look at the paper Kevin Carlson referred to, and the references therein? – Robert Israel Jan 30 '13 at 01:48
  • 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. – Robert Israel Jan 30 '13 at 01:51
  • 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. – pre-kidney Jan 30 '13 at 01:54
  • 1
    @pre-kidney Uniqueness of the fixed point can be proved (without calculating concrete cases), take a look at this fresh answer to an older Kaprekar question. – Hanno Nov 02 '20 at 16:34
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.

Ross Millikan
  • 374,822
  • That 6174 is the unique interesting fixed point can be shown without wild and/or concrete 'number crunching', cf this recent answer to an older & parallel question. Would be nice to get your opinion on it. – Hanno Nov 06 '20 at 11:19
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 $$

Ben Crossley
  • 2,544
  • I am intrigued by the "system of 14 equations" that you mention, do you have any sources on this or care to explain how to arrive at that result? – TheOutZ Jan 10 '22 at 16:46
  • Any combination of the numbers 123456789 will result in 864197532, but are there other base 10 solutions to this problem that have such a consistent result? In my own crunching, any set of numbers will eventually provide a loop beyond 4 digits, but 987654321-123456789=864197532 is the only other "mysterious" number I can find. – mkinson May 23 '23 at 16:57
  • @TheOutZ This was my final year project at uni. I've got a 23 page pdf somewhere that has the system of equations in it. – Ben Crossley Aug 16 '23 at 17:37
  • @BenCrossley If you can give a rough outline of how you did it or send me the PDF (how do you actually send PMs?), that would be very much appreciated :)! – TheOutZ Aug 17 '23 at 06:59
  • @TheOutZ From memory, (it was a few years ago) I considered mapping each permutation of digits as its own equation and then solved each one. So something like: let digits a≤b≤c≤d then solve f(a,b,c,d) = abcd. f(b,a,c,d) = back, etc – Ben Crossley Aug 17 '23 at 07:12
  • @TheOutZ if you leave an email here / on your profile I can send over a pdf when I get a chance. The system reduced down to 14 equations because 10 of them failed on some other criteria that I proved must occur. – Ben Crossley Aug 17 '23 at 07:14
  • @BenCrossley Done. I've put my gmail in my profile so that I don't need to copy-paste it everytime. I would put my institutional mail if I wouldn't be known under my nickname under a lot of platforms... Anyway, thank you for taking the effort for finding and sending me the PDF :)! – TheOutZ Aug 17 '23 at 08:28
  • @TheOutZ let me know what you think after you've read it. – Ben Crossley Aug 17 '23 at 14:18