Problem 354: (2004 AIME I, 6)
An integer is called snakelike if its decimal representation $a_1a_2a_3\cdots a_k$ satisfies $a_i<a_{i+1}$ if $i$ is odd and $a_i>a_{i+1}$ if $i$ is even. How many snakelike integers between 1000 and 9999 have four distinct digits?
- Four distinct digits can be arranged as $ac<d$ in $5$ ways; in $2$ of them the smallest digit is first, in $3$ it is third.
- Without $0$ there are $\binom94\cdot5=630$. With $0$ (the smallest), it cannot be first: $\binom93\cdot3=252$.
- Total $882$. The answer is $\boxed{882}$.
An integer is called snakelike if its decimal representation $a_1a_2a_3\cdots a_k$ satisfies $a_i<a_{i+1}$ if $i$ is odd and $a_i>a_{i+1}$ if $i$ is even. How many snakelike integers between 100 and 999 have three distinct digits?