After playing around with my calculator in English lesson I found out something very peculiar.
Here are the steps for my magic trick:
- Pick a number which is not a palindrome (Example: $3546$)
- Subtract that number backwards from the same number and get the absolute value of that number (Example: $abs(3546 - 6453) = 2907$)
- Add all the characters in the number (Example: $2+9+0+7=18$)
- If the number is not 1 character long repeat step 3
- If you followed these steps you should always get the number $9$ (Example: $1+8=9$)
Can someone explain why that works? I just found it randomly when playing with my calculator
hint
$$abcd-dcba$$ is always a multiple of $9$.
$$10^3a+10^2b+10c+d-10^3d-10^2c-10b-a=$$
$$999a+90b-90c-999d$$