7 digit number combinations

combinatoricsdivisibility

$\mathit Exact \ question :$

How many 7-digit numbers (without repetition) can be formed from digits

$$1,2,3,4,5,6,7,8,9 $$ such that each of them are divisible by $ 18 $ ?

$\mathit My \ approach :$

First I checked for the divisibility of $9$, the numbers would be…

$$ 1236789, 1245789 ,1345689, 2345679 $$

In this, at last position either of $2,4,6,8 $ can come, that leaves us to the total possibility of only 3 digits appearing at last position.

And the total 7-digit numbers would be

$$\displaystyle 3 \times (6! \times 4) = 8640. $$ Is it correct ? Actually, I came up with this question myself.

Best Answer

As saulspatz says, there are only three even digits in each set, so it should be $4$ (sets of numbers) $\cdot 3$ (choices for the ones digit in each set) $\cdot 6!$ (ways to arrange the rest of the digits.)

You can write it up more clearly. When you list the four numbers that are divisible by $9$ you should say that those are the sets of digits that can make up the number. When you talk of the last position you should not say "neither", it should be the last position can be one of $2,4,6,8$, but only three of these are available in each set. Finally, explaining the logic of your final expression is helpful. For combinatorics problems I often do it like I did in the first paragraph. You can also list the terms you will multiply and say where each comes from.