Count of 6-digit numbers divisible by 6 but not by 9

divisibilitynumber theory

Suppose that 6-digit numbers are formed using each of the digits 1,2,3,7,8,9 exactly once. I want the count of such 6-digit numbers that are divisible by 6 but not divisible by 9. I understand that the formed number should contain atleast one 2 and atmost one 3 in its prime factorization but don't know how to find count of such numbers. Any hint in this direction or other solution method will be very helpful.

Best Answer

Firstly, we know that any number of the combination of digits 1,2,3,7,8,9 with each number used exactly once is not divisible by 9, since $ 1 + 2 + 3 + 7 + 8 + 9 = 30 $ which is not divisible by 9.

Secondly, to let the number be divisible by 6, the last digit must be even. Therefore the last digit can only be 2 or 8.

Since there is no repeating digit, no repetition will need to be considered and the answer is $ 2 \times 5! = 240 $ .