Every integer is colored with one of two colors, red or blue. We know that, for every finite set of consecutive integers, the absolute value of the difference between the number of red integers and the number of blue integers in the set is at most 1000. Prove that there exists a set of 2000 consecutive integers among which there are exactly 1000 red numbers and 1000 blue numbers.
Solution
Given an integer , let us call the set of 2000 consecutive numbers of length 2000, and let us call the number of red integers and the number of blue integers in : observe that, since is even, is also even. Observe also that, in passing from to , the number of red or blue naturals can change by at most one unit, and therefore .
Suppose for contradiction that for no do we have , and suppose, without loss of generality, that . We want to show, by induction, that for every : the base step holds by hypothesis. is even and negative, and is even, and is not zero by hypothesis, and therefore is also negative.
Let us now consider the intervals as ranges over the interval . The are pairwise disjoint, and in each of them there are at least 1001 blue numbers and at most 999 red numbers, hence in the interval there are at least blue numbers and at most red numbers, contradicting the hypothesis.