I am currently familiar with the method of checking if a number is divisible by $2, 3, 4, 5, 6, 8, 9, 10, 11$. While Checking for divisibility for $24$ (online). I found out that the number has to satisfy the divisibility criteria of $3$ and $8$. I agree this gives the answer. But why cant I check the divisibility using the divisibility criteria of $6$ and $4$ ? Is there a rule to this criteria ?
Elementary Number Theory – Divisibility Criteria of 24
divisibilityelementary-number-theory
Related Solutions
Claim 1:
The divisibility rule for a number '$a$' to be divided by '$n$' is as follows. Express the number '$a$' in base '$n+1$'. Let '$s$' denote the sum of digits of '$a$' expressed in base '$n+1$'. Now $n|a \iff n|s$. More generally, $a \equiv s \pmod{n}$.
Example:
Before setting to prove this, we will see an example of this. Say we want to check if $13|611$. Express $611$ in base $14$. $$611 = 3 \times 14^2 + 1 \times 14^1 + 9 \times 14^0 = (319)_{14}$$ where $(319)_{14}$ denotes that the decimal number $611$ expressed in base $14$. The sum of the digits $s = 3 + 1 + 9 = 13$. Clearly, $13|13$. Hence, $13|611$, which is indeed true since $611 = 13 \times 47$.
Proof:
The proof for this claim writes itself out. Let $a = (a_ma_{m-1} \ldots a_0)_{n+1}$, where $a_i$ are the digits of '$a$' in the base '$n+1$'. $$a = a_m \times (n+1)^m + a_{m-1} \times (n+1)^{m-1} + \cdots + a_0$$ Now, note that \begin{align} n+1 & \equiv 1 \pmod n\\ (n+1)^k & \equiv 1 \pmod n \\ a_k \times (n+1)^k & \equiv a_k \pmod n \end{align} \begin{align} a & = a_m \times (n+1)^m + a_{m-1} \times (n+1)^{m-1} + \cdots + a_0 \\ & \equiv (a_m + a_{m-1} \cdots + a_0) \pmod n\\ a & \equiv s \pmod n \end{align} Hence proved.
Claim 2: The divisibility rule for a number '$a$' to be divided by '$n$' is as follows. Express the number '$a$' in base '$n-1$'. Let '$s$' denote the alternating sum of digits of '$a$' expressed in base '$n-1$' i.e. if $a = (a_ma_{m-1} \ldots a_0)_{n-1}$, $s = a_0 - a_1 + a_2 - \cdots + (-1)^{m-1}a_{m-1} + (-1)^m a_m$. Now $n|a$ if and only $n|s$. More generally, $a \equiv s \pmod{n}$.
Example:
Before setting to prove this, we will see an example of this. Say we want to check if $13|611$. Express $611$ in base $12$. $$611 = 4 \times 12^2 + 2 \times 12^1 + B \times 12^0 = (42B)_{12}$$ where $(42B)_{14}$ denotes that the decimal number $611$ expressed in base $12$, $A$ stands for the tenth digit and $B$ stands for the eleventh digit. The alternating sum of the digits $s = B_{12} - 2 + 4 = 13$. Clearly, $13|13$. Hence, $13|611$, which is indeed true since $611 = 13 \times 47$.
Proof:
The proof for this claim writes itself out just like the one above. Let $a = (a_ma_{m-1} \ldots a_0)_{n+1}$, where $a_i$ are the digits of '$a$' in the base '$n-1$'. $$a = a_m \times (n-1)^m + a_{m-1} \times (n-1)^{m-1} + \cdots + a_0$$ Now, note that \begin{align} n-1 & \equiv (-1) \pmod n\\ (n-1)^k & \equiv (-1)^k \pmod n \\ a_k \times (n-1)^k & \equiv (-1)^k a_k \pmod n \end{align} \begin{align} a & = a_m \times (n-1)^m + a_{m-1} \times (n-1)^{m-1} + \cdots + a_0 \\ & \equiv ((-1)^m a_m + (-1)^{m-1} a_{m-1} \cdots + a_0) \pmod n\\ a & \equiv s \pmod n \end{align} Hence proved.
Pros and Cons:
The one obvious advantage of the above divisibility rules is that it is a generalized divisibility rule that can be applied for any '$n$'.
However, the major disadvantage in these divisibility rules is that if a number is given in decimal system we need to first express the number in a different base. Expressing it in base $n-1$ or $n+1$ may turn out to be more expensive. (We might as well try direct division by $n$ instead of this procedure!). However, if the number given is already expressed in base $n+1$ or $n-1$, then checking for divisibility becomes a trivial issue.
Here is the explanation to that link:
We know that $10 \cdot 7 = 70 \equiv 1 \mod 23$ as $3 \cdot 23 = 69$.
Thus, if we consider $10a + b \mod 23$ and we note that $7$ is coprime to $23$, then $10a + b \equiv 0 \mod 23 \iff 7(10a + b) = 70a + 7b \equiv a + 7b \equiv 0 \mod 23$
And that is how he got that $10a + b$ is divisible by $23$ iff $a + 7b$ is divisible by $23$. And this lets that blogger get rid of a digit, more or less, at each step to easily verify divisibility.
Best Answer
The problem here might be something like $12$. You see, we have that $12$ is divisible by both $6$ and $4$, but it's not divisible by $24$. The reason they suggest $3$ and $8$ is because they are relatively prime, meaning that you can't have the sort of overlap in the case of $6$ and $4$.
This all has to do with the Fundamental Theorem of Arithmetic, which says that each number can be written uniquely as a product of primes, and primes have the special characteristic (or as Marvis points out, they are defined to be exactly those numbers with the characteristic) that if $p|ab$, then $p|a$ or $p|b$. So if $3$ and $8$ divide a number, then $24$ divides that number. But $6$ and $4$ dividing a number doesn't even guarantee that $8$ divides that number.