<s>[INST] Find the number of 5-digit number divisible by 6 which can be formed using $0,1,2,3,4,5$ if repetition of digits is not allowed. 
Find the number of $5$-digit number divisible by $6$ which can be formed using $0,1,2,3,4,5$ if repetition of digits is not allowed.

I started by considering the following cases:

*

*Unit digit = $0$
I can fill four places with digits ${1,2,4,5}$ , so number of 5-digit numbers $= P(4,4) = 24$

*Unit digit = $2$
I can fill four places with digits ${0,1,3,4,5}$ such that (a) $0$ does not come in the first place (b) either of $1,4$  is used (c) $0,3,5$ are always used. I have to fill 4 places with $0,(1,4),3,5$. So, total number of arrangements $=P(4,4)$. Number of arrangements when $0$ comes as first digit $=P(3,3)$. Number of arrangements of $(1,4) = 2$. Therefore , number of 5-digit numbers $=2(P(4,4)-P(3,3)) = 36$

*Unit digit = $4$
Similarly, number of 5-digit numbers $= 36$
Therefore, the total number of 5-digit numbers $= 24+36+36 = 96$.
But the correct answer is $108$. Where did I make a mistake?
 [/INST] Case $1$:
$1,2,3,4,5$ are chosen.
For the number to be divisible by $2$, last digit is $2$ or $4$, i.e. last digit can be selected in 2 ways and the other digits can arrange in $4!$. Thus, the number of ways =$4! \cdot 2=48$.
Case $2$:
$0,1,2,4,5$ are chosen.
a) if last digit is $0$: number of ways =$4!=24$
b) if last digit is $2$: the other digits may be filled in (from left to right): $3×3×2×1=18$ ways.
c) if last digit is $4$: the other digits may be filled in (from left to right): $3×3×2×1=18$ ways.
So, the answer $=48+24+18+18=108$ ways.
So answer is $108$.
</s>