Is there a simple test for divisibility by sixteen in base-twelve

divisibilitynumber-systemsrecreational-mathematics

I am investigating math in the dozenal (a.k.a. duodecimal, base-twelve) system. As part of this, I am compiling a list of tests for divisibility. (All numbers in this post are dozenal, not decimal, unless otherwise noted.)

For example, to test if a number is divisible by eight:

  • All powers of a dozen higher than two are divisible by eight, so we can ignore all places in the number except the ones place and the dozens place. If the number represented by these two places is divisible by eight, the entire number is also divisible by eight.
  • To check if a two-digit number is divisible by eight, add the ones place to four times the dozens place. Repeat until you are left with a one-digit number. If the result is eight, the original number is divisible by eight.
  • Example: $1434$
    • Ignore the leading two places, leaving $34$.
    • $34 → (4 × 3) + 4 = 10 + 4 = 14$
    • $14 → (4 × 1) + 4 = 4 + 4 = 8$
    • Thus, $1434$ is divisible by eight.
  • Example: $1296$
    • Ignore the leading two places, leaving $96$.
    • $96 → (4 × 9) + 6 = 30 + 6 = 36$
    • $36 → (4 × 3) + 6 = 10 + 6 = 16$
    • $16 → (4 × 1) + 6 = 4 + 6 = A$
    • $A$ is not eight, thus $1296$ is not divisible by eight.

The same type of process works for divisibility by nine, except that this time you add the ones place to three times the dozens place.

Is there a similar process for checking if a dozenal number is divisible by one-dozen-and-four (14 or, in decimal, sixteen or $16₁₀$)?

Again, powers of a dozen higher than two are divisible by $14$, so we can ignore any places higher than the dozens place, reducing the problem down to two-digit numbers. There are only eight two-digit dozenal numbers divisible by 14 (14, 28, 40, 54, 68, 80, 94, and A8), so it wouldn't be unreasonable to simply memorize the complete list, but I'd still like to have an algorithm that reduces any two-digit number that IS divisible by 14 down to 14 (or some other number, as long as it is consistent), while NOT doing so for all two-digit numbers that are NOT divisible by 14.

This question is related to a later question, Is there a simple test for divisibility by seventeen in base-twelve?

Best Answer

Multiply the dozens' digit by $4.$ Take the absolute difference of this number and the ones' digit. (That is, subtract the smaller number from the larger.) Repeat until the result is less than a dozen. If the result is zero, the number is divisible by $16,$ otherwise it is not.

One reason that this works is because when you take the absolute difference, you are essentially subtracting a multiple of four dozen (which is a multiple of sixteen) from the ones' digit and then flipping the sign (which doesn't affect divisibility by sixteen) if you get a negative result. Another reason is that any time you do this operation on a number larger than eleven, you get a smaller number, so the process eventually terminates.

The process comes to an end even quicker if you take the dozens' digit modulo $4$ before multiplying by $4.$ For example, starting with $\mathrm A8_{12}$ you would take $\mathrm A \equiv 2 \pmod 4,$ so instead of $4 \times \mathrm A - 8 = 28_{12}$ you take $4 \times 2 - 8 = 0$ and you're already done. The multiple of $4$ that you discarded from the dozens' digit, multiplied by $4,$ was another multiple of $16,$ so discarding it made no difference in whether the result was divisible by $16.$

Related Question