Maths Olympiad Prep

Library / /630 of 860

Number theory Difficulty 5.3 AIME, harder Find the answer

Let a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} be a sequence of distinct positive integers such that a1+a2++an=2021a_{1}+a_{2}+\cdots+a_{n}=2021 and a1a2ana_{1} a_{2} \cdots a_{n} is maximized. If M=a1a2anM=a_{1} a_{2} \cdots a_{n}, compute the largest positive integer kk such that 2kM2^{k} \mid M.

A number or a short expression. Spacing and $ signs are ignored.

Solution

We claim that the optimal set is {2,3,,64}\{58}\{2,3, \cdots, 64\} \backslash\{58\}. We first show that any optimal set is either of the form {b,b+1,b+2,,d}\{b, b+1, b+2, \ldots, d\} or {b,b+1,,d}\{c}\{b, b+1, \ldots, d\} \backslash\{c\}, for some b<c<db<c<d. Without loss of generality, assume that the sequence a1<a2<<ana_{1}<a_{2}<\cdots<a_{n} has the maximum product. Suppose aj+1>aj+2a_{j+1}>a_{j}+2. Then, increasing aja_{j} by 1 and decreasing aj+1a_{j+1} by 1 will increase the product MM, contradicting the assumption that the sequence has the optimal product. Thus, any "gaps" in the aia_{i} can only have size 1. Now, we show that there can only be one such gap. Suppose aj+1=aj+2a_{j+1}=a_{j}+2, and ak+1=ak+2a_{k+1}=a_{k}+2, for j<kj<k. Then, we can increase aja_{j} by 1 and decrease ai+1a_{i+1} by 1 to increase the total product. Thus, there is at most one gap, and the sequence aia_{i} is of one of the forms described before. We now show that either b=2b=2 or b=3b=3. Consider any set of the form {b,b+1,b+2,,d}\{b, b+1, b+2, \ldots, d\} or {b,b+1,,d}\{c}\{b, b+1, \ldots, d\} \backslash\{c\}. If b=1b=1, then we can remove bb and increase dd by 1 to increase the product. If b>4b>4, then we can remove bb and replace it with 2 and b2b-2 to increase the product. Thus, we have b=2,3b=2,3, or 4. Suppose b=4b=4. If the next element is 5, we can replace it with a 2 and a 3 to increase the product, and if the next element is 6, we can replace it with a 1,2, and 3 without making the product any smaller. Thus, we can assume that either b=2b=2 or b=3b=3. The nearest triangular number to 2021 is 2016=1+2++642016=1+2+\cdots+64. Using this, we can compute that if b=2b=2, our set must be {2,3,,64}\{58}\{2,3, \cdots, 64\} \backslash\{58\}, leading to a product of 64!58\frac{64!}{58}. If b=3b=3, our set is {3,,64}\{56}\{3, \cdots, 64\} \backslash\{56\}, leading to a product of 64!256\frac{64!}{2 \cdot 56}. Thus, the maximum product is 64!58\frac{64!}{58}. We now compute the highest power of 2 that divides this expression. 64! includes 32 elements that contribute at least one power of 2,16 that contribute at least two powers of 2, and so on until the one element that contributes at least six powers of 2. This means the highest power of 2 that divides 64! is 32+16++2+1=6332+16+\cdots+2+1=63. Finally, dividing by 58 removes one of these powers of 2, making the answer 62.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.