2004 AIME I Problem 6
Problem 6 of 15IntermediateNumber TheoryCombinatoricsProblem-Solving Techniques
An integer is called snakelike if its decimal representation satisfies if is odd and if is even. How many snakelike integers between and have four distinct digits?
Your answer
Integer from 0 to 999
Show solution
Solution
A four-digit snakelike number satisfies First count the arrangements of any four distinct digits into this pattern. The largest digit must sit in position or If is in position the other three form so the largest of them takes position and the remaining two can go in either order: ways. If is in position any of the other three digits can be and then fixes the rest: ways. So each set of four digits admits exactly snakelike orders.
If is not among the digits, all orders give valid numbers: If is among them, note must occupy position or (positions and must exceed a neighbor), and position is forbidden. With in position any of the other three digits can be and fixes the rest, so of the orders survive:
The total is
Tagged: arrangements with restrictions · digits · casework