If the probability that a randomly chosen 6-digit number formed by using digits 1 and 8 only is a multiple of 21 is , then is equal to ______.
Solution
Core idea. A change of a digit by seven does not affect the remainder on division by seven.
Concept refresher. A number is divisible by 3 exactly when the sum of its digits is divisible by 3, because
for some integer , so each digit contributes itself to the remainder.
Picture the situation. A 6-digit number with digits 1 and 8 only is fixed by the places of its eights, so there are such numbers. It is a multiple of 21 when it is a multiple of both 3 and 7. The digit sum handles 3, and a comparison with 111111 handles 7.
Approach. Test divisibility by 7 for all such numbers at once, then count those divisible by 3.
Step 1: Divisibility by 7
Changing a digit 1 into 8 adds , a multiple of 7. So every such number leaves the same remainder as , and all 64 numbers are multiples of 7.
Step 2: Divisibility by 3
With eights the digit sum is , which is a multiple of 3 exactly when is 0, 3 or 6. That gives numbers.
Step 3: The value
Dividing by the 64 numbers in all gives , so the value asked is .
Answer. 33
Sanity check. Example: , with three eights.
Common wrong answers
- 30: Taking only three eights gives 20 numbers and ; the numbers 111111 and 888888 also qualify.
Key takeaway
The trap. The cases of no eight and of six eights are easy to forget.
How toppers think. They reduce the test by 7 to a single number, the one made of ones.
Remember.
More on Sample Space & Events
- A bag contains 6 blue and 6 green balls. Pairs of balls are drawn without replacement until the bag is…
- From a month of 31 days, 3 different dates are selected at random. If the probability that these dates are…
- A coin is tossed 8 times. If the probability that exactly 4 heads appear in the first six tosses and exactly…
- All 59 on Sample Space & Events ›