MathLabs

Problem 5

Find the minimum positive integer kk for which there exists a function f:Z→{1,2,…,k}f:\mathbb Z\to\{1,2,\dots,k\} such that f(x)≠f(y)f(x)\ne f(y) whenever ∣x−y∣∈{5,7,12}|x-y|\in\{5,7,12\}.
Step 2 of 5: Bound the number of forbidden colors
#{y:∣x−y∣∈{5,7,12}, ∣y∣<∣x∣}≤3\#\{y:|x-y|\in\{5,7,12\},\ |y|<|x|\}\le 3
Detailed analysis

For a positive xx, the previously colored neighbors can only be x−5,x−7,x−12x-5,x-7,x-12 when they lie in the earlier part of the order; for a negative xx the symmetric statement holds. Thus at most three previously colored neighbors exist, and at most three colors are forbidden.