2025 AMC 12A Problems/Problem 23
Problem
Call a positive integer fair if no digit is used more than once, it has no
s, and no digit is adjacent to two greater digits. For example,
and
are fair, but
and
are not. How many fair positive integers are there?
Solution 1
To satisfy the conditions, a
integer must have no digit be a local minimum. Let's say we have
distinct digits, with each digit being a number from
to
. To create a
integer, we begin by placing the largest digit. For the second-largest digit, we can either place this digit to the right or to the left of the string already created. We have these
options for the third-largest digit, and so on. Therefore, there are
valid permutations to create a
integer.
We must also choose which digits will be in the permutation. If you are creating an
-digit long
integer, there are
ways to pick which digits will be in the number.
Therefore, for each
, the number of fair integers of length
is:
Summing over all
:
Note that the Binomial Theorem was used to equate
~lprado
Solution 2 (similar to solution 1)
Note every "fair" number will have an increasing string of digit, a maximum digit, then a decreasing string of digits. This is because if it decreases then increases, then the digit in the middle will be less than its adjacent digits.
Let
be the maximum digit. For each number
, we may either place
before
, after
, or choose not to include it. Note this process will result in a unique number for every case, as the numbers before
must be in increasing order, and the numbers after
must be in decreasing order. Therefore, for each number
, we have
cases.
Since
, we have:
~SilverRush