Reversing Numbers: Why Does Answer = 0 or Divisible by 3?

  • Thread starter Thread starter V8Maverick
  • Start date Start date
  • Tags Tags
    Numbers
V8Maverick
Messages
6
Reaction score
0
Okay, this one is probably going to get laughed out of town, but it's annoying me so I shall ask it anyway.

1. Take any number of 2 digits or greater, reverse it (i.e. 12 becomes 21 or 4765 becomes 5674).
2. Take the 'reversed' number away from the original number.
3. Why is the answer to this simple sum ALWAYS either 0* or divisible by 3?

Try it with any random numbers
12-21 = -9
4765-5674 = -909
863789532 - 235987368 = 627802164

All of these answers are divisible by 3. WHY?

* I had to put in the bit about it could be 0 for those who will point out that 121 or anything similar when reversed is still 121 and hence taken away from itself results in 0.
 
Mathematics news on Phys.org
I think it is easy to prove this by induction.

Let n be a natural number and let L be its length (number of digits). Denote by n' its "reversed" number.
Suppose that for n it is true that n - n' = 0 (mod 3).
Now add 1 to n. Then if we take the reverse of n + 1, we have to add 10L to n'. So:
(n + 1) - (n + 1)' = (n + 1) - (n' + 10L) = (n - n') + (1 - 10L) = 0 + 10L - 1 (mod 3).
For the last expression is easy to see that it is always 0 mod 3 (in fact I think it will be divisible by 9, because it consists of only 9's).

Check the base case => done
(For the base case you might want to take 12 or something, because for all numbers < 12 it is completely trivial, although in principle checking it for n = 1 is sufficient).
 
Last edited:
It also follows immediately from the property of base 10 natural numbers, that they are congruent with their digit sum modulo 9.
 
The digit sum of a base-b number is congruent to the number mod b-1, so in base 10 the number and its reverse are congruent mod 9 (since they're mutually congruent mod 9 to their shared digit sum). Thus the number minus its reverse is divisible by 9.
 
While the answers given here, proofs of the assertion, will be most pleasing to the professional mathematician who always seeks to provide answers in the form of a proof, I think the original asker, in asking "WHY?", was likely looking for something a little less formal and a little more intuitive, so that is what I'll attempt to provide here.

Let's look at the number 1234. When we reverse it, what happens?
We go from 1234 to 4321. The "4" moves from the 1's place to the 1000's place. Before the move it represented 4 * 1, or 4 * 10^0. Now it represents 4 * 10^3. We gained the latter and lost the former; so the "movement" of the digit "4" produces a change in value of +4000-4 = +4*10^3-4*10^0 = 4*(10^3-10^0).

Examination of the movement of the other digits shows that each digit's movement brings about a change in value of the form

digit*(10^n-10^m)

where n and m are non-negative integers. If you factor out the smaller term, you end up with something of the form

+/- digit*(10^p - 1)*10^q where p is a positive integer and q a nonnegative integer. The portion (10^p - 1) can be shown by simple algebra to be a multiple of (10 - 1) or 9.

So, every movement of a digit in the number brings about a change in the value of the overall number that is a multiple of 9; therefore the sum of all digit-movements is also a multiple of 9.

Note that this doesn't apply to just reversals; any scrambling of the digits of a number produces a similar multiple-of-9 change in the number's value. For example, 1234 and 2341 differ by a multiple of 9.

It gets even more interesting if we consider "leading zeros". For example, 23010 can be considered a rearrangement of the digits in the number 123, because we might write 123 as 00123. (These leading zeros "add" 0 thousands and 0 ten thousands to the value of 123, thus not changing the value at all.) Differences between numbers paired in this way will be multiples of 9.

And as the others mentioned, the thing that makes "9" so special is that we use a base 10 number system. If we used base 16, for example, we'd find all digit-reversal pairs to differ by a multiple of (16-1), or 15.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.

Similar threads

Back
Top