The plane was divided by vertical and horizontal lines into unit squares. Determine whether it is possible to write integers into cells of this infinite grid so that:
(i) every cell contains exactly one integer
(ii) every integer appears exactly once
(iii) for every two cells and sharing exactly one vertex, if they contain integers and then at least one of the cells sharing a common side with both and contains an integer between and .
, 2025
Solution
Yes, this is possible. Consider the spiral depicted below and write consecutive integers along the spiral:
We claim that this works. Consider any two cells and sharing exactly one vertex. Consider the square containing and . If the square contains a "corner" of the spiral then for some and the numbers in that square are arranged in the following way (up to rotation or reflection):
and therefore the conditions are satisfied no matter which opposite cells of the square and are. Indeed, if and contain and , then the good cell is the one containing . If and contain and and then and the good cell is the one containing . If and contain and and then and the good cell is the one containing .
Otherwise, the numbers are arranged in the following way (again, up to rotation or reflection):
for some , and again, the conditions are satisfied. Indeed, without loss of generality, assume . Then . If and contain and then the good cell is the one containing . Otherwise, and contain and , and the good cell is the one containing .
Alternatively, one can notice that condition (iii) from the problem statement means that we can orient each square according to the increasing numbers as suggested in the picture below:
With this observation, it's relatively easy to check that the spiral construction satisfies this.