# How many five digit numbers formed from digits $1,2,3,4,5$ (used exactly once) are divisible by $12$?

How many five digit numbers formed from digits $$1,2,3,4,5$$ (used exactly once) are divisible by $$12$$?

My answer is $$24$$ but I doubt if it's right or not.

Sum of all the digits is $$15$$, so all the numbers are divisible by $$3$$. Also there are $$24$$ numbers divisible by $$4$$. I have found this by

• Fixing $$4$$ at units place , so I must place $$2$$ at tens place and number divisible by $$4$$ is $$3!=6$$
• Fixing $$2$$ at units place, so I have $$1,3$$ or $$5$$ at tens place and number divisible by $$4$$ is $$3!×3=18$$

Since $$12=3×4$$ and all numbers are divisible by $$3$$ so numbers divisible by $$12$$ is $$24$$.

Is the reason valid?

• Yes. ${}{}{}{}$ – Parcly Taxel Mar 13 at 13:03
• All the numbers formed from the five digits $1, 2, 3, 4, 5$ are divisible by $3$ since their digit sum is $15$, so you just have to check if the numbers are also divisible by $4$. – N. F. Taussig Mar 13 at 13:06
• @BJKShah If a number is divisible by $3$ and $4$ , and you divide it by $3$, it's still divisible by $4$ ... – Matti P. Mar 13 at 13:06
• I understand it now cause the numbers will have both the factors 3 and 4 and so 12 would also divide it. – BJKShah Mar 13 at 13:07

## 1 Answer

Your decomposition of the problem is valid, and only works because those two divisors are co-prime (there is no number bigger than $$1$$ dividing both divisors). This means that if a number is divisible by $$3$$ and $$4$$ it is automatically divisible by $$12$$, and you can check each condition independently – which you did.

• Like if the factors were 6 and 3 then it is not necessary that 18 would divide the numbers, but 12 would? – BJKShah Mar 13 at 13:10
• @BJKShah Indeed. – Parcly Taxel Mar 13 at 13:11