How many 5-digit whole numbers with no 0's are divisible by 6?

355 Views Asked by At

How many 5-digit whole numbers with no 0s are divisible by 6?

I've tried different methods to approach this question but still cannot get to the answer.

1

There are 1 best solutions below

1
On BEST ANSWER

Pick the first three digits arbitrarily (from 1-9). That is $9^3$ possible choices.

Suppose the digit sum of those three digits is a multiple of 3. If we pick the fourth digit as $1,4,7$, then the last digit must be 2 or 8. If we pick the fourth digit as $2,5,8$ then the last digit must be 4. If we pick the fourth digit as $3,6,9$ then the last digit must be 6. So 12 choices for the last pair.

Suppose the digit sum of the first three is a multiple of 3 plus 1. If the fourth digit is $1,4,7$, then the last digit must be 4. If the fourth digit is $2,4,8$ then the last digit must be 6. If the fourth digit is $3,6,9$, then the last digit must be $2,8$. Again 12 choices.

Similarly if the digit sum of the first three is a multiple of 3 plus one, we again get 12 choices: fourth digit $1,4,7$ must be followed by 4; $2,5,8$ must be followed by 6; $3,6,9$ must be followed by $2,8$.

So total $12\cdot9^3$.