by olooney on 6/14/24, 1:01 PM with 6 comments
by dash2 on 6/14/24, 2:56 PM
'wxyz' - 'zyxw' = 999(w - z) + 90(x - y)
w - z is between 1 and 9, since w > z (we have ruled out numbers like 1111). x - y is between 0 and 9. So there are at most 90 such numbers. In fact there are fewer because x-y <= w-z.
This is why there are many collisions in the first step.
by dimastopel on 6/14/24, 3:48 PM
by hiperlink on 6/14/24, 2:46 PM
by pierrebai on 6/14/24, 8:29 PM
length 3: fixed-point 495 length 5: 2-cycle containing 59994 length 6: fixed-point 59994
Similarly for digits 6, 1, 4, 7:
length 4: 6174 length 5: 4-cycle containing 61974 length 6: fixed-point 631764
by ur-whale on 6/14/24, 2:12 PM