6174 is known as Kaprekar’s constant as it was invented by Indian mathematician DR Kaprekar in 1949.
Even mathematicians, till date, aren’t sure how to explain this magic number. Wondering, what’s so unique about the number? This number is known for the following rule:
- Take any four-digit number (at least two digits should be different)
- Arrange the digits in descending and ascending order to get two new four-digit numbers
- Now, subtract the smaller number from the bigger number
- Go back to step 2 and repeat
For example, lets take the number 5432.
5432 — 2345 = 3087 8730 — 0378 = 8352 8532 — 2358 = 6174 7641 — 1467 = 6174
Now, lets follow the same method with another four-digit number for example, 2005.
5200 - 0025 = 5175 7551 - 1557 = 5994 9954 - 4599 = 5355 5553 - 3555 = 1998 9981 - 1899 = 8082 8820 - 0288 = 8532 8532 - 2358 = 6174 7641 - 1467 = 6174
You can try this out yourself. Take any four-digit number and follow the same method mentioned above and you’ll see that in the end you are always left with the number 6174.
This process is called Kaprekar’s routine. The routine states that you’ll always reach number 6174 in at most 7 iterations and once you reach 6174, the process will continue generating the same number. How cool is that?
This procedure can be applied to any four digit numbers expect repdigits like 1111, 2222 and so on, which give the result 0000 after a single itercation.