Today a math contest I organized was held and I think this was the most difficult exercise overall.
There are m distinct positive even integers and n distinct positive odd integers that add up to 1987. Find the maximum of 3m + 4n.
So we have this sum of integers
We can write that
Now we can exploit the Cauchy-Schwartz inequality to make our desired coefficients appear.
Hence,
Hence the maximum is 221, which can be achieved with