In details

The incredible repetition of number 6174


Choose a 4-digit number (except 1111, 2222, etc.) and do the following:

1) Put your digits in ascending order
2) Put your digits in descending order
3) Subtract the smaller number from the larger number

Repeat steps 1, 2 and 3 for the result, and so on. What happens?

Let's try number 8415.

Digits in ascending order: 1458
Digits in descending order: 8541
Subtracting the smallest from the largest: 8541 - 1458 = 7083
Repeating the process with the number 7083:
8730 - 0378 = 8352
8532 - 2358 = 6174
7641 - 1467 = 6174
7641 - 1467 = 6174
7641 - 1467 = 6174 (the repetition continues…)

Incredibly, all 4-digit numbers that are not multiples of 1111 end up falling into this repetition.