6174 is known as Kaprekar's constant after the Indian mathematician D. R. Kaprekar. This number is notable for the following properties :

- Take any four-digit number, using at least two different digits. (Leading zeros are allowed.)
- Arrange the digits in descending and then in ascending order to get two four-digit numbers, adding leading zeros if necessary.
- Subtract the smaller number from the bigger number.
- Go back to step 2 and repeat.

You will get the 6174....