1

I have tried this out with many numbers and it seems to be true. Is it true no matter how many digits and if so, why?

I am using base 10 naturally but I wonder if there is a generalization, again, if it is true.

EDIT: Base 2 does not seem to have any obvious pattern. Hex (base 16) seems to also be divisible by 3 (same as base 10).

Bill Dubuque
  • 272,048
releseabe
  • 213
  • In base $b$ the difference is always divisible by $b-1$. So indeed, for $b=2$ this is not very remarkable. – WimC Jul 18 '21 at 16:10

1 Answers1

0

That's a nice observation. What you've observed is true always because the remainder when you divide a number by $3$ (or by $9$) is the same as the remainder when you divide the sum of its digits by $3$ (or by $9$). If you reverse a number you don't change the sum of its digits.

For more information you can read about divisibility tests at many websites.

As @WimC notes in a comment, this will work for any divisor of $b-1$ when you write numbers in base $b$. $3$ works for hex since $3$ divides $16-1 = 15$.

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
  • 1
    Please strive not to add more dupe answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Jul 18 '21 at 17:17
  • I knew about the divisibility test for 3 but did not "put 2 and 2 together" to see how it was related. i guess the key is not just divisibility but that the sum of the digits and the number itself both have the same remainder when divided by 3, zero remainder being a special case. I am surprised that other bases have this same characteristic; i will try to figure out why. The permutation thing is interesting to me because that two numbers are related only by permuting the digits does not seem like a very significant relationship at first glance. – releseabe Jul 19 '21 at 01:16
  • @BillDubuque This question may be a duplicate, but not of either linked questions, which only ask about the divisibility test. – WimC Jul 19 '21 at 11:50
  • @WimC I added a link for that (it was not clear where the OP was stuck before the above comment). – Bill Dubuque Jul 19 '21 at 14:14