Skip to main content

2025 AMC 12A Problem 23

Problem 23 of 25HarderAlgebraCounting & Probability

Call a positive integer fair if no digit is used more than once, it has no 00s, and no digit is adjacent to two greater digits. For example, 196,196, 23,23, and 1246312463 are fair, but 1546,1546, 320,320, and 3432134321 are not fair. How many fair positive integers are there?

Answer choices

Show solution

Solution

The digits are distinct and drawn from {1,,9},\{1, \ldots, 9\}, and “no digit adjacent to two greater digits” means no interior digit is smaller than both neighbors. For a fixed set of nn digits, build the arrangement by inserting digits from largest to smallest; each new (smaller) digit must go to one of the two ends, giving 2n12^{n-1} valid arrangements. Summing over all nonempty digit subsets, n=19(9n)2n1=12n=19(9n)2n=3912=196822=9841. \begin{gathered} \sum_{n=1}^{9}\binom{9}{n}2^{n-1} \\ = \frac{1}{2}\sum_{n=1}^{9}\binom{9}{n}2^{n} \\ = \frac{3^9 - 1}{2} = \frac{19682}{2} = 9841. \end{gathered} Thus, the correct answer is C.

More practice

Concepts: arrangements with restrictions · binomial theorem

Problem text and solution from the LIVE past-contest archive. See also the AoPS wiki page for community solutions.