Why does this always equals the same number?

208 Views Asked by At

After playing around with my calculator in English lesson I found out something very peculiar.

Here are the steps for my magic trick:

  1. Pick a number which is not a palindrome (Example: $3546$)
  2. Subtract that number backwards from the same number and get the absolute value of that number (Example: $abs(3546 - 6453) = 2907$)
  3. Add all the characters in the number (Example: $2+9+0+7=18$)
  4. If the number is not 1 character long repeat step 3
  5. 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

2

There are 2 best solutions below

0
On BEST ANSWER

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$$

0
On

If you subtract abcd from dcba, you always get a multiple of 9. The reason is than 1000-1=999 and 100-10=90 are multiples of 9. Repeatedly taking digit sums is the standard test for divisibility by 9: a positive integer is divisible by 9 if and only if you end up with 9