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

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 $.$
• The simple answer is 4 and 3 are relatively prime, 2 and 6 are not. When you check for 6, you have already checked for 2, but not the 'additional' 2 – Shailesh Oct 19 '15 at 6:25
• yes , 3 and 4 is coprime number but not 2 and 6 , so , how , it is matter ? – 1 0 Oct 19 '15 at 6:32
• That's what I wrote, when you do the divisbility test for 6, the 2 gets included there. We do not check for the separate 2 (6 x 2 = 12) anywhere. – Shailesh Oct 19 '15 at 6:37
• Re 2, note that to be divisible by 2 and 6 is strictly equivalent to being divisible by 6. To be divisible by 3 and 4 is strictly equivalent to being divisible by PPCM(3,4)=12. – Did Oct 19 '15 at 6:40
• The LCM of 3 and 4 is 12. The LCM of 2 and 6 is 6. – steven gregory Apr 22 '17 at 4:10

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

• very very nice proof , I satisfied with this proof , thank you @Henry sir . – 1 0 Oct 19 '15 at 6:46

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

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

• very well explained my second query , thank you @joao Miranda sir . – 1 0 Oct 19 '15 at 6:51
• you are welcome! – Gondim Oct 19 '15 at 19:16