Problem:
Carlos uses a 4-digit passcode to unlock his computer. In his passcode, exactly one digit is even, exactly one (possibly different) digit is prime, and no digit is 0. How many 4-digit passcodes satisfy these conditions?
Answer Choices:
A. 176
B. 192
C. 432
D. 464
E. 608
Solution:
Note that 2 is both even and prime. As we are required exactly one of each, we take cases:
Case 1: The digit 2 is used (exactly once).
Then no other even digits (4,6,8) and no other primes (3,5,7) may appear. The remaining three positions must be filled with 1 or 9 only. The possible multisets and their permutation counts are:
Multiset{2,1,1,1}{2,1,1,9}{2,1,9,9}{2,9,9,9}β# codes3!4!β=42!4!β=122!4!β=123!4!β=4β
This gives us a total of 4+12+12+4=32.
Case 2: Use one odd prime pβ{3,5,7} and one even eβ{4,6,8}, each exactly once.
There are (13β)β
(13β)=9 choices of (p,e). The other two positions must be from {1,9}. For a fixed (p,e), the possible multisets and their counts are:
Multiset{p,e,1,1}{p,e,1,9}{p,e,9,9}β# codes2!4!β=124!=242!4!β=12β
This gives us a total of 12+24+12=48 per each (p,e), or an overall total for the case of 9Γ48=432.
Therefore, our total number of passcodes is
32+432=(D) 464β.
The problems on this page are the property of the MAA's American Mathematics Competitions