How many four-digit positive integers have at least one digit that is a or a ?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
Count the opposite: four-digit numbers with no 2 and no 3. There are 7 × 8 × 8 × 8 = 3584 of them; subtract from 9000.
Solution
"At least one" is hard to count directly, because a number might have one, two, three or four such digits. It is much easier to count the numbers that have no and no , then take those away from all four-digit numbers.
1. All four-digit numbers. They run from to : that is numbers. (Or: choices for the first digit, since it cannot be , and for each of the others: .)
2. Numbers with no 2 and no 3.
- First digit: not , not , not . That leaves : choices.
- Each of the other three digits: anything except and : choices.
- Total: .
3. Take away. .
The answer is .
Why this works
"At least one" questions often break into many overlapping cases, but the opposite, "none at all," is a single multiplication. Count all, count none, subtract. The only care needed is the first digit, which can never be .
Alternative approach
Estimate. Each digit is a or a about one time in five, so a number avoids both about of the time. So roughly of , around , should work. Only choice (E) is close.
The trap
Letting the first digit be 0 when counting the numbers with no 2 or 3 (8^4 = 4096, choice (B)), or starting from 10000 numbers instead of 9000.
Concise solution
"At least one" suggests counting the opposite: four-digit numbers that contain no and no at all.
Total four-digit numbers: the leading digit is through and each other digit is through , so .
Numbers avoiding and : the leading digit comes from , options; each of the other three digits comes from the eight digits other than and . That gives .
Subtract: .
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.3)
- Introduction to Number Theory, Chapter 9: Base Number Arithmetic
Techniques
Count the complement and subtract from the total