Problem:
An integer is called parity-monotonic if its decimal representation satisfies if is odd, and if is even. How many four-digit parity-monotonic integers are there?
Solution:
Let be the decimal representation of a parity-monotonic integer. It is not difficult to check that for each fixed , there are four choices for ; for example, if or , then ; if or , then , and so on. There are choices for the digit , and choices for each of the remaining digits. Hence there are -digit parity-monotonic integers, and the number of four-digit parity-monotonic integers is .
The problems on this page are the property of the MAA's American Mathematics Competitions