Why test of divisible by $12$ works with $3$ and $4$ but not with $2$ and $6 ?$

777 Views Asked by At

Test of divisible by $4 ,$ last two digit must be divisible by $4 ,$ since $100$ is always divisible by $4$ remaining two digit $,$ we need to check $.$

Test of divisible by $3 ,$ sum digits must be divisible by $3 .$ But I don't know why $?$

Test of divisible by $2 ,$ last digit must be divisible by $2 ,$ since $10$ is always divisible by $2 .$

Test of divisible by $ 6 ,$ the number should be divisible by $2$ and $3 .$

Test of divisible by $12 ,$ the number should be divisible by $4$ and $3 ,$ somewhere is given as we can say if number is divisible by $2$ and $6$ then it also must be divisible by $12 ,$ for counter example $,$ if number is $18 .$


I have two questions $:$

  1. Why test of divisible by $3$ works $?$ Any proof $.$
  2. Why test of divisible by $12$ works with divisible by $3$ and $4 ,$ but not with divisible by $2$ and $6 ?$ Any proof $.$
3

There are 3 best solutions below

1
On BEST ANSWER

The reason the divisibility by $3$ test works is that $10$ and $1$ have the same remainder when divided by $3$. Say your number is (as digits) $x = a_n a_{n-1} \ldots a_1 a_0$. Then you could write it as $x = a_n \cdot 10^n + a_{n-1} 10^{n-1} + \cdots + a_1 10 + a_0$. If you mod out by $3$: $$ \begin{align*} x \bmod 3 &= (a_n \cdot 10^n + a_{n-1} 10^{n-1} + \cdots + a_1 10 + a_0) \bmod 3 \\ &= (a_n \cdot 10^n) \bmod 3 + (a_{n-1} 10^{n-1}) \bmod 3 + \cdots + (a_1 10) \bmod 3 + a_0 \bmod 3) \\ &= (a_n \bmod 3) \cdot (10^n \bmod 3) + (a_{n-1} \bmod 3) (10^{n-1} \bmod 3) + \cdots + (a_1 \bmod 3) \cdot (10 \bmod 3) + (a_0 \bmod 3) \\ &= (a_n \bmod 3) \cdot 1 + (a_{n-1} \bmod 3) \cdot 1 + \cdots + (a_1 \bmod 3) \cdot 1 + (a_0 \bmod 3) \\ &= (a_n \bmod 3) + (a_{n-1} \bmod 3) + \cdots + (a_1 \bmod 3) + (a_0 \bmod 3) \\ &= (a_n + a_{n-1} + \cdots + a_1 + a_0) \bmod 3 \end{align*} $$

So $x$ and the sum of its digits have the same remainder when divided by $3$.

As for your second question: if you know $x$ is divisible by $6$, you already know it's divisible by $2$. Doing the test for $2$ doesn't give you any new information. This is because $6$ and $2$ aren't relatively prime (but $3$ and $4$ are). In general, if you know $x$ is divisible by $a$ and $b$, it's divisible by the LCM of $a$ and $b$.

0
On

Since we are working in a numerical system of basis $10$, an integer number $N>0$ can be written as $$N=a_n\times 10^n+a_{n-1}\times 10^{n-1}+\ldots +a_1\times 10 +a_0$$ The number $10=9+1$ leaves remainder $1$ under division by $3$, and so does the another powers of $10$, so $N$ has the form $$N=9m+a_{n}+a_{n-1}+\ldots+a_1+a_0$$ for some integer $m$, which means that $3$ divides $N$ iff $3$ divides $a_{n}+a_{n-1}+\ldots+a_1+a_0$, the sum of the digits of $N$. Also the same test works for $9$.

2
On

Take, for example, a number in the form $N=a_1a_2a_3 \ldots a_n$, where the $a_j$'s are its digits in base ten. We can write it in the form $$\sum_{j=1}^{n} 10^{j}a_{j}$$.

Note that, as $10\equiv 1 \mod 3$, then $10^j \equiv 1 \mod 3$ for all $j$, so $3$ divides $10^j -1$ for all $j$.

Now, write $N$ as

$$\sum_{j=1}^{n} (10^{j}-1)a_{j} + \sum_{j=1}^{n}a_{j}$$

From our discussion above, we see that $3$ divides the first sum, so we conclude that $3$ divides $N$ if and only if $3$ divides the sum of the digits of $N$.

For your second question, it works for $3$ and $4$ because they are coprime. Generally, if a number is divisible by $a$ and $b$, then it is divisible by their lowest common multiple, but when the numbers are coprime $lcm(a,b)=ab$. This also explains why it doesn't work for $2$ and $6$: they're not coprime. For example, $6$ is divisible by $2$ and $6$, but it's not divisible by $12$.