# 7 digit number combinations

$$\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.

• It looks like you are asking for the number to be divisible by $18$, as opposed to not be divisible which seems to be what the question says. Which do you want? When you say none of $2,4,6,8$ can be in the last position, that leaves $5$ choices. Feb 27, 2020 at 16:44
• Yup, sorry, I have corrected the problem. Feb 27, 2020 at 16:47
• Once you have discarded two digits, there are only $3$ even digits left, so the answer should be $4\cdot3\cdot6!$ Feb 27, 2020 at 16:50
• I corrected, it.... sorry. This is the exact question... Feb 27, 2020 at 16:52
• Thank you for helping. Feb 27, 2020 at 19:16

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.
• If you look in each of your sets of seven digits there are only three even number in each. If you use the first, you cannot have $4$ in the ones digit, for example, so there are only $3 \cdot 6!$ numbers that come from this one. Feb 27, 2020 at 17:05