Originally posted by Palynkaneat, thanks.
It comes from the decimal notation. The two digit number "xy" = 10x + y = 9x+(x+y). You know that the first element (9x) is divisible by 3 (=3x) and the second one is exactly the sum of its digits!
So it will only be divisible by 3 if the sum of its digits is divisible by 3. You can easily extend this to numbers with more digits (100z = 99z+z, etc.)
so, it works for '3' in decimal notation specifically because 3^2 = 10 - 1?
would it work for '4' in base 17 notation, on the basis that:
a two-digit number "xy" = 17x + y = 16x + (x+y). the first element is divisible by 4 (=4x) and the second one is exactly the sum of its digits. etc.
and generally for a numeral n in base B where B = n^2 + 1?
Originally posted by BlackampYep! Well spotted. 🙂
neat, thanks.
so, it works for '3' in decimal notation specifically because 3^2 = 10 - 1?
would it work for '4' in base 17 notation, on the basis that:
a two-digit number "xy" = 17x + y = 16x + (x+y). the first element is divisible by 4 (=4x) and the second one is exactly the sum of its digits. etc.
and generally for a numeral n in base B where B = n^2 + 1?