2

We all know that we can test for divisibility by 3 because if the sum of a the digits of number is divisible by 3, the number must be divisible by 3. For example 123. 1+2+3 = 6 which is divisible by 3, so we know 123 is divisible by 3. 3*41 = 123.

I noticed that tricks involving the digits of a number rely on how we write numbers, our decimal positional notation, then wondered if this worked in other bases, such as hexadecimal (base 16). 0x123 = 291, the sum of whose digits, in both bases (10 and 16), are divisible by 3.

I have yet to find a counterexample for the test of adding the digits of a number to find if the number is divisible by 3 works for hexadecimal.

What I noticed about both bases (10 and 16) is that they are one more than multiples of 3. I also noticed that other of such bases such as base 4 apparently hold to the divisibility by 3 test. 111 (base 4) = 21.

I also wondered if this works for divisibility by any number for bases that are a one more than multiple of said number. In hexadecimal I would be able add the digits to see if a number is divisible by 5. 0x37 (55 in base 10) is divisible by five, and the sum of its digits are 0xa (10) which, of course is divisible by 5.

I did only try a few examples of this, so does it always hold true that one can test for the divisibility by any number in any base that is one more than a multiple of that number? If so, why does this work?

Bill Dubuque
  • 272,048
CPlus
  • 183

0 Answers0