Bunuel
How many positive integers less than 2*10^4 are there in which each digit is a prime number?
(A) 256
(B) 326
(C) 340
(D) 625
(E) 775
In other words,
"How many positive integers less than 20,000 are there in which each digit is a prime number?"The prime digits are: 2, 3, 5 and 7
Notice that, using the digits 2, 3, 5 and 7, we cannot create a 5-digit number that's less than 20,000
So, we must consider 4 possible cases: 4-digit numbers, 3-digit numbers, 2-digit numbers, and 1-digit numbers
4-digit numbersThere are 4 options for the first digit (2, 3, 5 or 7), 4 options for the second digit, 4 options for the third digit, and 4 options for the last digit
TOTAL number of 4-digit numbers = (4)(4)(4)(4) = 256
3-digit numbersThere are 4 options for the first digit (2, 3, 5 or 7), 4 options for the second digit, and 4 options for the last digit
TOTAL number of 3-digit numbers = (4)(4)(4) = 64
2-digit numbersThere are 4 options for the first digit (2, 3, 5 or 7), and 4 options for the last digit
TOTAL number of 2-digit numbers = (4)(4) = 16
1-digit numbersThere are 4 options: 2, 3, 5, 7
ANSWER = 256 + 64 + 16 + 4 = 340 = C
Cheers,
Brent