Kaprekars Constant
Kaprekar's Constant is 6174
Take a 4-digit number (with at least two different digits) and then repeat this:
a) Arrange the digits in descending order (largest to smallest) and ascending order (smallest to largest).
b) Subtract the smaller number from the larger one
and we will soon end up with 6174
Example: For 3524, descending = 5432, ascending = 2345, and 5432 − 2345 = 3087
Again: 8730 − 378 = 8352
Again: 8532 − 2358 = 6174
This will now repeat forever because 7641 − 1467 = 6174
So we have reached a stable value. This happens in at most 7 rounds.
Example: 1525
5521 − 1255 = 4266
6642 − 2466 = 4176
7641 − 1467 = 6174
The only numbers that don't work are fully repeated digits like 1111, 2222, etc as they become 0
Discovered by Indian mathematician D. R. Kaprekar in 1949