2026 AIME I Problem 2
Problem 2 of 15EasierNumber TheoryCombinatorics
Find the number of positive integer palindromes written in base with no zero digits, and whose digits add up to For example, has these properties. Recall that a palindrome is a number whose representation reads the same from left to right as from right to left.
Your answer
Integer from 0 to 999
Show solution
Solution
A palindrome with an even number of digits has each digit appearing in a mirrored pair, so its digit sum is even. Since is odd, the palindrome has an odd number of digits, and if is the middle digit, the rest of the digit sum is split evenly between the two halves, so is odd. A one-digit palindrome would need which is impossible.
The palindrome is determined by its middle digit and the block of digits to the left of center: a nonempty string of nonzero digits with sum For we get Since every digit of such a string is automatically at most so the number of strings is the number of compositions of which is (each of the gaps between units is either a break or not).
The total is
Tagged: palindrome · digits · partitions and compositions · parity