Browse · MathNet
Print67th Czech and Slovak Mathematical Olympiad
Czech Republic counting and probability
Problem
Find the smallest positive integer such that for any coloring of numbers by three colors there exist two numbers with the same color whose difference is a square of an integer. (Vojtech Bálint, Michal Rolínek, Josef Tkadlec)

Solution
The answer is .
First, for the sake of contradiction, assume that numbers can be colored by colors such that no two numbers with the same color differ by a square. Let be the color of number for .
Since , and are squares, numbers are all assigned distinct colors. The same is true for numbers , hence and are assigned the same color. Likewise we get , and (for the last equality we look at numbers ).
Without loss of generality, assume . As , we have . Without loss of generality, let . Now , hence . Similarly, implies . We have derived , a contradiction.
On the other hand, if , we may color the numbers as below. It's easy to check that no two numbers with the same color differ by a square of an integer.
Fig. 4
First, for the sake of contradiction, assume that numbers can be colored by colors such that no two numbers with the same color differ by a square. Let be the color of number for .
Since , and are squares, numbers are all assigned distinct colors. The same is true for numbers , hence and are assigned the same color. Likewise we get , and (for the last equality we look at numbers ).
Without loss of generality, assume . As , we have . Without loss of generality, let . Now , hence . Similarly, implies . We have derived , a contradiction.
On the other hand, if , we may color the numbers as below. It's easy to check that no two numbers with the same color differ by a square of an integer.
Fig. 4
Final answer
29
Techniques
Coloring schemes, extremal arguments