-1

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.)

Is there an algorithm for checking if a dozenal number is divisible by one-dozen-and-five ($15$ or, in decimal, seventeen or $17₁₀$)?

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

  • Subtract double the ones place from the number represented by the remaining places.
  • Repeat until you have a one-digit number.
  • If the result is zero, five, or ten ($A$), the original number is divisible by five.
  • Example: $122$
    • $122 → 12 − (2 × 2) = 12 − 4 = A$
    • Thus, $122$ is divisible by five.
  • Example: $214$
    • $214 → 21 − (2 × 4) = 21 − 8 = 15$
    • $15 → 1 − (2 × 5) = 1 − A = −9$
    • Thus, $214$ is not divisible by five.

And to test if a number is divisible by seven:

  • Add triple the ones place to the number represented by the remaining places.
  • Repeat until you have a one-digit number.
  • If the result is seven, the original number is divisible by seven.
  • Example: $17A$
    • $17A → 17 + (3 × A) = 17 + 26 = 41$
    • $41 → 4 + (3 × 1) = 4 + 3 = 7$
    • Thus, $17A$ is divisible by seven.
  • Example: $214$
    • $214 → 21 + (3 × 4) = 21 + 10 = 31$
    • $31 → 3 + (3 × 1) = 3 + 3 = 6$
    • Thus, $214$ is not divisible by seven.

This question is a follow-on to a previous question, Is there a simple test for divisibility by sixteen in base-twelve?

Lawton
  • 1,759
  • 7
  • 18
  • By the common test here $,17\mid 12a+b\iff 17\mid a−7b\iff 17\mid a+10.,$ Furthermore, applying divisibility reciprocity $,,17\mid n_{12} \iff 17\mid r(n){10},$ where $,r(n),$ reverses the digits of $n,$ e.g. $,,17\mid A76{12} \iff 17\mid 67A_{10} \iff 17\mid 67-5A=17,,$ so all the divisibilities are true. See the linked dupes (and their links) for much more - including many worked examples. – Bill Dubuque Apr 19 '22 at 14:47
  • 1
    Please do not repost your prior (dupe) closed question. Ditto for dupe answers. – Bill Dubuque Apr 19 '22 at 14:48
  • @BillDubuque I did not find the posts to which you provided links to be helpful, and the notification for a closed question specifically says "If these questions don’t resolve your question, ask a new one." The posts you linked did not resolve my question, so I created a new question with the answer I discovered. – Lawton Apr 19 '22 at 14:54
  • If something is not clear in the linked dupes then please ask questions in comments there (this helps to improve prior answers). – Bill Dubuque Apr 19 '22 at 14:55
  • In more detail, by the general divisibility test here we have that $$\quad \bbox[6px,border:1px solid #c00]{17\mid 12,b+a\iff 17\mid b+\color{#c00}{12'}a,\ \ {\rm for}\ \ \color{#c00}{12'}\equiv 12^{-1}\equiv \color{#c00}{-7}!!!\pmod{!17}}\qquad\qquad\ $$

    since $\bmod 17!:,\ \color{#c00}{\dfrac{1}{12}}\equiv \dfrac{1}{-5}\equiv\dfrac{3}{-15}\equiv \dfrac{20}2\equiv 10\equiv \color{#c00}{-7},$ by Gauss's algorithm

    – Bill Dubuque Apr 19 '22 at 15:22

1 Answers1

-1

(All numbers in this post are dozenal, not decimal, unless otherwise noted.)

The trick for a prime divisor $p$ (that is not a factor of the base) is to find the smallest multiple of the base (in this case, a dozen), positive or negative, that is equal to one modulo $p$. Then you multiply the ones place by this positive or negative factor and add the positive or negative result to the number represented by the remaining digits of the original number. If the result is a number known to be a multiple of the divisor $p$ (including zero), the original number is also a multiple of $p$; if the result has an absolute value in the open interval $(0, p)$ or is a number known to not be a multiple of $p$, the original number is not a multiple of $p$; if neither of those conditions are met, repeat the process on the result.

For division by five, the smallest positive multiple that satisfies this condition is three dozen, while the smallest negative multiple that satisfies this condition is negative two dozen; since two is smaller than three, we use negative two as our multiplier, giving the test for five mentioned in the question. For division by seven, the smallest positive multiple that satisfies this condition is three dozen, while the smallest negative multiple that satisfies this condition is negative four dozen; since three is smaller than four, we use positive three as our multiplier, giving the test for seven mentioned in the question.

For division by one-dozen-and-five (15), the smallest positive multiple that satisfies this condition is ten dozen, while the smallest negative multiple that satisfies this condition is negative seven dozen; since seven is smaller than ten, we use negative seven as our multiple, giving the following algorithm:

  • Subtract seven times the ones place from the number represented by the remaining places.
  • Repeat until you reach an absolute value of 15 or below.
  • If the result is 0 or 15, the original number is divisible by 15.
  • Example: $22B$
    • $22B → 22 − (7 × B) = 22 − 65 = −43$
    • $43 → 4 − (7 × 3) = 4 − 19 = −15$
    • Thus, $2B$ is divisible by 15.
  • Example: $794$
    • $794 → 79 − (7 × 4) = 79 − 24 = 55$
    • $55 → 5 − (7 × 5) = 5 − 2B = −26$
    • $26 → 2 − (7 × 6) = 2 − 36 = −34$
    • $34 → 3 − (7 × 4) = 3 − 24 = −21$
    • $21 → 2 − (7 × 1) = 2 − 7 = −5$
    • Thus, $794$ is not divisible by 15.

This same trick works for other prime divisors, though there are special cases for numbers one below and one above the base that may be simpler. In dozenal, an alternate test for division by eleven ($B$) is to add up all the digits of a number; if the result is divisible by eleven, so is the original number. An alternate test for one-dozen-and-one (decimal thirteen) is to alternately add and subtract each digit (e.g. add the ones place, subtract the dozens place, add the grosses place, subtract the great-grosses place, et cetera); if the result is divisible by one-dozen-and-one, so is the original number.

Lawton
  • 1,759
  • 7
  • 18