Among the positive integers less than , each of whose digits is a prime number, one is selected at random. What is the probability that the selected number is prime?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Only the digits 2, 3, 5, 7 are allowed, so there are just 4 + 16 = 20 numbers to check. Eight of them are prime.
Solution
- Which digits are allowed? The prime digits are . (The digit is not prime.)
- Count all the numbers. One-digit numbers: , which is numbers. Two-digit numbers: choices for the first digit and for the second, which is numbers. In total there are numbers.
- One-digit primes. All four of are prime.
- Two-digit primes. A two-digit number ending in is even, and one ending in is a multiple of , so neither can be prime. That leaves the eight numbers ending in or :
| Number | ||||||||
|---|---|---|---|---|---|---|---|---|
| Prime? | yes | no, | yes | yes | no, | yes | no, | no, |
Four of them are prime: .
5. Probability. There are primes out of numbers, so the probability is .
The answer is .
Why this works
Once you see that only four digits are allowed, the list of candidates is small enough to check by hand. The last digit throws out half the list at once. For the rest, the digit-sum test for catches , and , and is a multiple of .
The trap
Treating 1 as a prime digit (it is not), or calling 57 prime when 57 = 3 times 19.
Concise solution
The prime digits are . The one-digit candidates are these four numbers, and the two-digit candidates have choices for each digit, giving numbers. The pool has numbers.
All four one-digit candidates are prime.
Among the two-digit candidates, any number ending in or is composite, so only those ending in or can be prime: . Checking each: prime, , prime, prime, , prime, , . Exactly four are prime.
So of the numbers are prime, and the probability is .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 2: Primes and Composites
- Introduction to Counting & Probability, Chapter 7: Introduction to Probability
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.2)
- Introduction to Number Theory, Chapter 4: Prime Factorization (§4.2, §4.4)
Techniques
Organized listing / direct enumeration