$6$ digit numbers formed from the first six positive integers such that they are divisible by both $4$ and $3$.

The digits $1$, $2$, $3$, $4$, $5$ and $6$ are written down in some order to form a six digit number. Then (a) how many such six digits number are even? and (b) how many such six digits number are divisible by $12$?

My attempt: "In some order" means that the six digits number we get do not have repeated digits. Then there are $6!$ possible digits, that is we can make $720$ six digits number. Then the number of even numbers must be end with one of $2$ or $4$ or $6$. Then the number of even numbers can be formed by the given digits are $3\times 5!=360$. Then it is almost done. Now for (b) we have to find the possible numbers of six digits which is divisible by $12$, that is the number must be divisible by both $3$ and $4$. I know that a number is divisible by $3$ if the sum of the numbers are divisible by $3$ and a number is divisible by $4$ if its last two digit is divisible by $4$. But how can I find that how many of such common numbers are there that are divisible by both three and four? Please help me to solve this.

• Hint: $1+2+3+4+5+6=21$ which is divisible by $3$. – Henrik Mar 14 '18 at 11:13

Since digits are not repeated, all $6$ digits must be used. Sum of all digits is $21$ $(1+2+3+4+5+6)$. So this number is divisible by $3$.

Now we only have to check its divisibility by $4$.

Number should end with any of $8$ combination $(12,16,24,32,36,52,56,64)$.

Starting $4$ digits can be in any order.

So total count $= 8*4! = 192$

You're almost there. As you say, we know it is divisible by $3$, no matter how we arrange the digits, so we just have to figure out if it is divisble by $4$, and you have a good atart there as well by pointing out that we just need to look at the last two digits.

Now, clearly the last digit needs to be even. And, if it is a $2$ or a $6$, then we need an odd digit before it, so $3$ choices there, whereas a $4$ as the last digit needs an even digit before, so $2$ choices left for that one. And since the leftover $4$ digits can be places in $4!=24$ ways, you therefore have $(2\cdot 3+2)\cdot 24= 8 \cdot 24= 192$ numbers divisible by $12$

By the way, a) can be figured out even more quickly by pointing that since there are as many even as odd digits, the number of even numbers must be exactly half of all numbers, so that is $\frac{720}{2}=360$

• $8 \times 24 = 192$ – gandalf61 Mar 14 '18 at 11:17