Problem 421: (2007 AIME II, 6)
An integer is called parity-monotonic if its decimal representation $a_{1}a_{2}a_{3}\cdots a_{k}$ satisfies $a_{i}<a_{i+1}$ if $a_{i}$ is odd, and $a_{i}>a_{i+1}$ if $a_{i}$ is even. How many four-digit parity-monotonic integers are there?
- A digit $d$ may follow $x$ when $x$ is odd and $x<d$, or $x$ is even and $x>d$. The number of such $x$ is (odd digits below $d$) $+$ (even digits above $d$), which is $4$ for every $d$.
- Also $0$ has no successor, so it can never come before another digit.
- Choose the last digit ($10$ ways) and then each earlier digit from its $4$ possible predecessors: $10\cdot4^3=640$. The answer is $\boxed{640}$.
An integer is called parity-monotonic if its decimal representation $a_{1}a_{2}a_{3}\cdots a_{k}$ satisfies $a_{i}<a_{i+1}$ if $a_{i}$ is odd, and $a_{i}>a_{i+1}$ if $a_{i}$ is even. How many three-digit parity-monotonic integers are there?