Problem:
Let be nonnegative integers such that . What is the maximum possible value of ?
Problem:
Let be nonnegative integers such that . What is the maximum possible value of ?
Solution:
Answer:
The intuition is that as much should be in as possible. But divisibility obstructions like are in our way. However, the way the coefficients are set up, we can at least easily avoid having too large (specifically, ). This is formalized below.
First, we observe that is a solution. Then given a solution, replacing with , where , also yields a solution. Given a solution, it turns out all solutions can be achieved by some combination of these swaps (or inverses of these swaps).
Thus, to optimize the sum, we want , since in this situation, there would be no way to make swaps to increase the sum. So the sequence of swaps looks like , yielding a sum of .
Why is this optimal? Suppose maximizes . Then , or else we could use a replacement to strictly increase the sum. But modulo forces odd, so . Subtracting off and continuing in this manner shows that we must have , then , then , and finally .