A digital display shows the current date as an -digit integer consisting of a -digit year, followed by a -digit month, followed by a -digit date within the month. For example, Arbor Day this year is displayed as For how many dates in does each digit appear an even number of times in the -digital display for that date?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
The year 2023 already has one 0 and one 3. So the month and day together must use one 0, one 3, and two copies of some other digit.
Solution
1. See what the year gives. The display starts with . That has two s (already an even number), one and one .
2. Decide what the month and day need. The four digits of the month and day must supply an odd number of s, an odd number of s, and an even number of every other digit.
3. Narrow it down. With four digits, the options are one and one plus a pair of another digit, or three of one and one of the other. Three s and a (like ) or three s and a cannot be a real date. So the month and day use exactly one , one , and a pair of some other digit.
4. Case : the digits are . Go through the months that can be made from them:
- Month (January): days and .
- Month (October): days and .
- Month (November): days and .
- Month (March): day .
That is dates.
5. Case : the digits are .
- Month (February): day . (Day does not exist.)
- Month (March): day .
- Month is not possible, because it needs a .
That is dates.
6. Case is or more: no month can use two copies of (, , and so on are not months), so the month must be or , and only is real. Then the day is made of and : either or , and both are more than . No dates.
7. Total: .
The answer is .
Why this works
"Each digit appears an even number of times" is about which digits are present, not their order. So first work out what the fixed part (the year) already supplies, and turn that into a rule for the remaining four digits. Then split into cases by the one free choice and let the calendar throw out impossible months and days.
The trap
Counting December dates such as 1203; month 12 brings in a 1 that has no partner. Missing March 11 (0311) is another common slip.
Concise solution
The year contributes two s (already even), one and one . So the four digits must contain an odd number of s, an odd number of s, and an even number of every other digit.
Three s with a , or three s with a , cannot form a valid month-day. So consists of exactly one , one , and a pair with . The month uses two of these four digits.
- : digits . Month : days . Month : days . Month : days . Month : day . That is dates.
- : digits . Month : day (day invalid). Month : day . Month is not available since it would use a . That is dates.
- : the month would have to be or , needing a day made of and ; days and with are all above . No dates.
Total .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.2)
Techniques
Organized listing / direct enumeration · Split into exhaustive cases and handle each