If n is divisible by 4 and 2 then why it is not divisible by 8?

Well I'm working on some mathematics aptitude problem on divisibility. There are certain divisibility rules for numbers 6, 12, 15 etc. which are

1. If n is divisible by 2 and 3, it is divisible by 6
2. If n is divisible by 3 and 4, it is divisible by 12
3. If n is divisible by 3 and 5, it is divisible by 15

So, I applied the above rule on 8 and thought

1. If n is divisible by 2 and 4, it is divisible by 8

but I found a counterexample 576484 to my intuition and it bust the bubble of my figment. It is divisible by 2 and as well by 4, but not by 8.

Why then it is not divisible by 8? If it is simultaneously divisible by 2 and 4.

Doesn't the rule applies in this case as well? Just like they are applied in the cases of 6, 12, & 15. That is, if factors 'a' and 'b' of number 'n' divides a given number 'm', then 'n' also divides 'm'.

• More simply, $4$ is a counterexample Jan 11 '21 at 1:03
• The pattern to your first three cases is that the numbers have no common factor. The statement is true so long as your numbers satisfy that, but it fails the moment there's any common factors. Jan 11 '21 at 1:05
• The logical “gotcha” here is that “divisible by 4 and by 2” is redundant! It is like saying “John is a bachelor and unmarried.” The word bachelor already implies John is unmarried, and similarly “divisible by 4” already implies “divisible by 2.” Jan 11 '21 at 1:08
• @Ubihatt FYI, if $a$ is divisible by $b$ and by $c$, then all you can always state is that $a$ is also divisible by the least common multiple of $b$ and $c$, often expressed as $\operatorname{lcm}(b,c)$. Note $\operatorname{lcm}(2,4) = 4$. Jan 11 '21 at 1:18
• Wow, you've come a long way to find that counterexample. Jan 11 '21 at 6:31

In general your rule holds if $$n$$ and $$m$$ are coprime. Otherwise the common factor may be only one time in the prime factorisation, but is two times in the product.
In your case: $$2$$ and $$4$$ are both divisible by $$2$$, that means you should take $$4$$ instead of $$8$$.
There is a great function which works in all cases, the least common multiple $$lcm(x,y)$$. It can be computed directly by many algorithms and plays an role in lots of mathematical subjects, for example there is an equivalent formulation of the Riemann Hypothesis on the growth of $$lcm$$.
If $$n$$ is divisible by $$4$$, then $$n$$ is divisible $$2$$, and the second part of your hypothesis is redundant.
If $$n$$ is divisible by $$4$$, then $$n$$ is divisible by $$8$$, which is not true since we only need two $$2$$'s in the prime expansion of $$n$$ to satisfy the hypothesis.