The total number of six digit numbers, formed using the digits 4, 5, 9 only and divisible by 6, is _____ .
Solution
Core idea. When the digits cover all three remainders, one free place completes a multiple of 3.
Concept refresher. A number is divisible by 3 exactly when its digit sum is. If the digits leave remainders on division by 3, this means
for a whole number .
Picture the situation. Divisibility by 6 means divisibility by 2 and by 3. Among the digits 4, 5 and 9 only 4 is even, so the last digit is fixed. On division by 3 the digits 4, 5 and 9 leave remainders 1, 2 and 0, one of each kind. So whatever the other digits are, one free place can always be filled in exactly one way to make the digit sum a multiple of 3.
Approach. Fix the last digit, leave four digits free, and let the remaining digit be forced.
Step 1: The last digit
The number must be even, and 4 is the only even digit available, so the last digit is 4.
Step 2: The digit sum
The digits 4, 5, 9 leave remainders 1, 2, 0 on division by 3. So for any choice of the first four digits, exactly one choice of the fifth digit makes the digit sum a multiple of 3.
Step 3: Count
The first four digits are free, giving ways, and the fifth is then forced, so there are 81 such numbers.
Answer. 81
Sanity check. Among the numbers ending in 4, the three possible remainders of the digit sum occur equally often, so one third of them, 81, are divisible by 3.
Common wrong answers
- 243: Requiring only divisibility by 3 gives ; the last digit must also be 4.
Key takeaway
The trap. The only even digit available must be the last digit.
How toppers think. They see that exactly one third of the strings pass the digit-sum test.
Remember. Last digit forced, one more digit forced.