2026 AIME II Problem 14
Problem 14 of 15HarderAlgebraNumber TheoryCombinatoricsProblem-Solving Techniques
For integers and let if is odd and is even, and otherwise. Find the number of sequences of positive integers such that and where the operations are performed from left to right; that is, means
Your answer
Integer from 0 to 999
Show solution
Solution
Since the running value after steps has the same parity as So term is subtracted exactly when is even and the prefix sum is odd, and the final value is minus twice the total of the subtracted terms. We must count compositions of in which the even terms sitting where the prefix sum is odd total exactly The prefix parity flips exactly at odd terms, so the odd terms come in (the total is even), and the subtracted terms are precisely the even terms lying between the st and th odd terms; these “odd stretches” must hold even terms totaling while the other stretches hold even terms totaling where is the sum of the odd terms.
Let be the number of ways to fill ordered stretches with sequences of even terms totaling One stretch is a composition of into even parts, i.e. of for and convolving gives the values needed below: and Compositions of into odd parts number
Casework on and for give and For give and For gives The total is
Tagged: custom operation · partitions and compositions · parity · casework