Every valid 4-digit number reaches 6174 in at most 7 iterations.
Numbers with all digits identical (1111, 2222, 9999, etc.) are exceptions because the process immediately produces 0000.
There is a similar phenomenon for 3-digit numbers, which leads to 495 instead of 6174.
