You may assign a color to each of the numbers from 1 to 2014, with exactly half being red and the other half blue. Then you examine the number of positive integers that can be written as the sum of a red and a blue number. Determine the maximum value of that you can achieve.
Solution
Let . We will prove that the maximum is equal to . The smallest number that can be written as the sum of a red and a blue number is and the largest number is . Therefore, there are at most numbers that can be written as the sum of a red and a blue number.
Assume that the numbers can be colored in such a way that there are or numbers that can be written as the sum of a red and a blue number. There is now at most one number from 3 to that cannot be written as such. We will first show that we can assume without loss of generality that this number is at least . We can create a second coloring where a number is blue if and only if was blue in the first coloring. Then a number can be written as the sum of red and blue in the second coloring if and only if could be written as the sum of red and blue in the first coloring. Therefore, if a number less than could not be written as the sum of red and blue in the first coloring, then in the second coloring, precisely a number greater than cannot be written as the sum of red and blue.
Thus, we can assume that the numbers from 3 to can all be written as the sum of red and blue. Since red and blue are interchangeable, we can also assume without loss of generality that 1 is colored blue. Since 3 can be written as the sum of red and blue and this can only be , 2 must be red. Now suppose we know that 2 to are red, for some with . Then in all possible sums with , both numbers are colored red, but we know that we can write as the sum of red and blue (since ), so it must be . Therefore, is also red. By induction, we see that the numbers from 2 to are all red. That is numbers. But there are only red numbers, contradiction.
We conclude that there are at least two numbers from 3 to that cannot be written as the sum of a red and a blue number. We will now show that we can color the numbers in such a way that all numbers from 4 to can be written as the sum of a red and a blue number, so that the maximum is equal to .
For this, color all even numbers except blue and also the number 1. All odd numbers except 1 are colored red, and also the number . By adding 1 to an odd number (not equal to 1), we can write all even numbers from 4 to as the sum of a red and a blue number. By adding 2 to an odd number (not equal to 1), we can write all odd numbers from 5 to as the sum of a red and a blue number. By adding to an even number (not equal to ), we can write all odd numbers from to as the sum of a red and a blue number. By adding to an even number (not equal to ), we can write all even numbers from to as the sum of a red and a blue number. In total, we can thus write all numbers from 4 to as the sum of a red and a blue number.
We conclude that the maximum is equal to .