Skip to main content

2025 AIME I Problem 5

Problem 5 of 15EasierNumber TheoryCombinatoricsProblem-Solving Techniques

There are 8!=403208! = 40320 eight-digit positive integers that use each of the digits 1,1, 2,2, 3,3, 4,4, 5,5, 6,6, 7,7, 88 exactly once. Let NN be the number of these integers that are divisible by 22.22. Find the difference between NN and 2025.2025.

Your answer

Integer from 0 to 999
Show solution

Solution

The digits sum to 36.36. Divisibility by 1111 requires the alternating sum of digits to be a multiple of 11,11, so if the four digits in odd positions sum to a,a, then a−(36−a)=2a−36a - (36 - a) = 2a - 36 must be a multiple of 11.11. Since 10≤a≤26,10 \le a \le 26, the only possibility is a=18:a = 18: each block of four positions carries digit sum 18.18. The four-element subsets of {1,…,8}\{1, \ldots, 8\} with sum 1818 are {1,2,7,8}, {1,3,6,8}, {1,4,5,8}, {1,4,6,7}, {2,3,5,8}, {2,3,6,7}, {2,4,5,7}, {3,4,5,6}, \begin{gathered} \{1,2,7,8\},\ \{1,3,6,8\},\ \\ \{1,4,5,8\},\ \{1,4,6,7\},\ \\ \{2,3,5,8\},\ \{2,3,6,7\},\ \\ \{2,4,5,7\},\ \{3,4,5,6\}, \end{gathered} eight in all, and they come in complementary pairs. Choose which of the 88 subsets occupies the even positions (which include the units place); the complement fills the odd positions. If that subset contains kk of the even digits, then the units digit can be chosen in kk ways, the rest of the even positions in 3!3! ways, and the odd positions in 4!4! ways, for 144k144k numbers. Complementary subsets have kk-values summing to 4,4, so over all 88 choices ∑k=16.\sum k = 16. Hence N=144⋅16=2304,N = 144 \cdot 16 = 2304, and N−2025=279.N - 2025 = 279.
AoPS wiki

Tagged: divisibility · permutations · casework

More practice