- Thread starter
- Admin
- #1

- Feb 14, 2012

- 3,835

How many five digit numbers are divisible by 3 and contain the digit 6?

- Thread starter anemone
- Start date

- Thread starter
- Admin
- #1

- Feb 14, 2012

- 3,835

How many five digit numbers are divisible by 3 and contain the digit 6?

- Moderator
- #2

- Feb 7, 2012

- 2,751

My answer is $\boxed{12504}$.How many five digit numbers are divisible by 3 and contain the digit 6?

To count how many five-digit multiples of 3 contain no 6s, look at how many ways there are to choose each of the five digits in the number. There are eight choices for the leading digit (which could be 1,2,3,4,5,7,8 or 9). For each of the second, third and fourth digits, there are nine choices (because we could also have a 0 in those positions). For the final digit, there are three choices. To see why, notice that the sum of the five digits must be a multiple of 3. If the sum of the first four digits is $=1\pmod3$ then the last digit must be 2,5 or 8. If the sum of the first four digits is $=2\pmod3$ then the last digit must be 1,4 or 7. And if the sum of the first four digits is $=0\pmod3$ then the last digit must be 0,3 or 9 (since it can't be 6!). So in every case there are exactly three choices.

Thus altogether there are $8*9^3*3 = 17496$ five-digit multiples of 3 containing no 6s, and subtracting that number from $30000$ we get $12504$ as the answer.

- Thread starter
- Admin
- #3

- Feb 14, 2012

- 3,835

I like your explanation so much and whenever it has come time to read your explanatory posts, you have never failed to enlighten us with your clever step-by-step working and so I thank you for participating and for this brilliant solution! My hat is truly off to you, Mr. Opalg!