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

  • Thread starter V8Maverick
  • Start date
  • Tags
    Numbers
In summary: And since 15 is 3*5, we'd find all digit-shufflings to differ by a multiple of 3 or 5; and so forth.)In summary, in base 10, the reason the difference is always a multiple of 9 is because the base (10) minus 1 (9) is a multiple of 9, and the movement of each digit in the number produces a change in value that is a multiple of 9. Therefore, the sum of all digit-movements will always be a multiple of 9, and thus the difference between a number and its reverse will always be a multiple of 9.
  • #1
V8Maverick
6
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
  • #2
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:
  • #3
It also follows immediately from the property of base 10 natural numbers, that they are congruent with their digit sum modulo 9.
 
  • #4
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.
 
  • #5
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.
 

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

Why does the answer to reversing numbers sometimes equal 0?

When reversing a number, the digits of the original number are reversed in order. If the number is a multiple of 10, the last digit will be 0. When this is reversed, it will still be 0, resulting in an answer of 0.

How can the answer to reversing numbers be divisible by 3?

When reversing a number, the sum of the digits in the original number will be the same as the sum of the digits in the reversed number. If the sum of the original digits is divisible by 3, then the sum of the reversed digits will also be divisible by 3, resulting in an answer that is divisible by 3.

Is it possible for the answer to reversing numbers to be neither 0 nor divisible by 3?

Yes, it is possible for the answer to be neither 0 nor divisible by 3. This occurs when the original number and its reversed number have different sums of digits, making the answer a different number altogether.

Can the answer to reversing numbers be negative?

No, the answer to reversing numbers will always be a positive integer. This is because the negative sign is not affected by the reversal process and will remain in the same position, resulting in a negative number.

Are there any other patterns or rules for the answer to reversing numbers?

Yes, there are other patterns and rules for the answer to reversing numbers. For example, if the original number is a palindrome (a number that reads the same forwards and backwards), the answer will be the same as the original number. Also, if the original number ends in 5, the reversed number will always end in 5 as well.

Similar threads

Replies
11
Views
5K
Replies
2
Views
1K
Replies
5
Views
2K
Replies
12
Views
2K
Replies
6
Views
1K
Replies
11
Views
9K
Replies
6
Views
2K
Back
Top