1

I've tried googling this one a bit but nothing seems to come up, even though its considered to be a well known fact.

Why does the kaprekar process of taking a 4 digit number: L, generating L' and L'' such that L' is the digits of L in ascending order and L'' is the digits in descending order and subtracting L' - L'' always converge to the Kaprekar constant of 6174?

Clearly the only value for which this process is constant is 6174 but that doesn't explain why there should be convergence.

One attempt at proof is to determine all the possible numbers that converge to 6174 after a single iteration, and then attempt to reason that each too can be reached by the convergence of even more numbers in such a way that if I continue this reasoning I should cover ALL 4 digit numbers.

But to turn my strategy into induction from brute force casework has become futile. What is the actual proof?

  • 1
    This old question has some nice links to the literature, so you might look there as well – Semiclassical Jul 26 '14 at 04:08
  • 1
    I read recently that it is essentially a set of cases, so it's not too illuminating. – marty cohen Jul 26 '14 at 05:16
  • What are the basic cases? – Sidharth Ghoshal Jul 27 '14 at 19:58
  • You map repeatedly the finite set ${1000, 1001, \dots9999}$ onto itself, so either you hit a fixed point, either you reach a cycle. To find out all possibilities, you only have a finite computation to do (but a computer may help). Note that for $3$ digits the only fixed point is $495$, but for $5$ digits there is no fixed point except $0$, and there are $3$ possible cycles, $(62964, 71973, 83952, 74943)$, $(61974, 82962, 75933, 63954)$ and $(53955, 59994)$. – Jean-Claude Arbaut Dec 06 '18 at 10:57

2 Answers2

2

Somewhere I have a complete proof written out, but I'll just share a couple of random things here. First, with some work you can show that if two digits of a fixed point are equal, then three digits have to be equal, and in turn all four digits have to be equal, and hence you must have $0000$. So you can assume all the digits of a non-trivial fixed point are different.

Second, notice that after one iteration of the process, you must have a multiple of $9$. This considerably reduces the number of cases to check.

Of these multiples of $9$, if you do two iterations to all of them, you end up with a small set. Some clever things help you get a small system of equations to solve. If the snow ever melts in Austin, I might post the whole proof, if I can find it. I hope my hints help.

1

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 solutions are: $$0111_2, 1001_2,3021_4, \qquad 3032_5, 6174_{10}, 92b6_{15}, c3f8_{20},\dots $$

Ben Crossley
  • 2,544
  • How you get that system of $14$ equations? – ESCM Oct 23 '19 at 15:24
  • @Eduardo S. are you working on Kaprekar Routine or just generally interested? – Ben Crossley Oct 25 '19 at 09:37
  • The second, im interested – ESCM Oct 27 '19 at 18:27
  • @Eduardo S. Just wanted to determine how much info to give. In short there are a few patterns that appear in the numbers, the first being that the number always follows the structure BCC...CCD99...99DCC...B where a B represents 2 digits that sum to the base, a C is 2 digits that sum to base-1 and the D is 2 digits that sum to base-2. If you look at longer examples of fixed points this pattern becomes clearer. The second pattern is that all of the digits to the left of the central block of 9s are decreasing. These 2 patterns offer a number of restrictions on possible candidates for constants... – Ben Crossley Oct 28 '19 at 21:00
  • ... from which 14 equations can be found to encompass all length 4 constants. – Ben Crossley Oct 28 '19 at 21:01