How would one write a proof that this summation including only a number and it's reverse always add up to the same integer for any number of digits?

102 Views Asked by At

So, according to this guy: if you reverse a number, the subtract the reversal from the original number to get oh say x, then you add x to the reversal of x you always get 1089.

I also notice that if the reversal subtracted from the original number is negative, you then subtract the reversal of that sum from itself and then you get negative 1089.

For two digit numbers following the process always seems to add up to 99 or -99!

This rule is broken for palindromes, at least at first glance.

(Remember, leading zeros: ie, 9 becomes 09->90.)

You could write some software pretty easily to test all of these cases and beyond, but I'm not sure the results would be very insightful.

I assume this is like the 9's trick, with equivalents in other bases but I haven't been able to generalize it...

Does anyone have a more general proof of why this works?

3

There are 3 best solutions below

0
On

Say $n = a_1a_2a_3$ is a 3-digit number with $a_1 \geq a_3$ (so the reversal isn't bigger, just for simplicity; we don't lose any generality), and also that $a_1 > 0$. So $n = a_1 \cdot 100 + a_2\cdot 10 + a_3$. Then $x$ is $$a_1(100 - 1) + a_2(10 - 10) + a_3(1 - 100) = 99(a_1 - a_3)$$ From here, there are only 10 cases to check (and you saw that it breaks for palindromes). If a three-digit multiple of 99 is positive, it has a 9 in the penultimate digit (consider $99y \equiv -y$ mod 100; since $y < 10$ as we're three digits, we're a multiple of 100 minus something less than 10). Then, its digits must add to 9, so the first and third sum to 9 total. So when we add it to its reverse, we get a 9 in the last place (first and third add to 9), an 8 in the second (9 and 9 add to 18), a 0 in the third (third and first add to 9, carry the 1), and the carry in the most significant slot. 1089. This is also the reverse of $99^2$ if you really want to mess with people, I don't know if the video mentions this.

This breaks in larger number of digits since we lose the property of $x$ being a nice multiple of 99.

0
On

You are correct that the rule does not work for palindromes which is why we have $a>c$ below.

Let $n=100a+10b+c$ for digits $a,b,c$ with $a>c$. Then the reversal is $100c+10b+a$ and the difference (after carries) is $$100(a-c-1)+90+(10+c-a).$$

Adding this number to its reversal i.e. $$100(10+c-a)+90+(a-c-1)$$ gives $$900+180+9=1089.$$

0
On

An extension to any number of digits

All that is required is for each digit on the left of the number to be greater than the corresponding digit on the right.

So for a 5 digit number written as $$abcde$$we require $a>e$ and $b>d$. The process then always gives $$109890.$$

If the number of digits of our initial number is odd and greater than $1$, then the answer is always $$10*89*$$ where the RH $*$ is a string of 0s and the LH $*$ is a string of an equal number of 9s. (These strings are empty for 3 digit numbers.)

If the number of digits of our initial number is even and greater than $2$, then the answer is always $$10*89*$$ where the RH $*$ is a string of 0s and the LH $*$ is a string of one fewer 9s.

You might like to prove these results for different numbers of digits using the same idea as in the answer to the post.