Problem:
Find all pairs of positive integers and such that the centres of the unit squares in a by grid of unit squares can be paired up so that the distance between the centres of each pair is exactly .
(A unit square has side length .)
Problem:
Find all pairs of positive integers and such that the centres of the unit squares in a by grid of unit squares can be paired up so that the distance between the centres of each pair is exactly .
(A unit square has side length .)
Solution:
We will show that the answer is all pairs where either or (or both) is a multiple of . First, partition the grid into four subgrids , , , and
| A | B | A | B | A | B |
|---|---|---|---|---|---|
| C | D | C | D | C | D |
| A | B | A | B | A | B |
| C | D | C | D | C | D |
Hence, it suffices to find all values of and which create four subgrids which all have an even number of squares. Consider modulo : if (mod ), then all subgrids will have an even dimension along the axis of . Otherwise, at least one of the subgrids will have an odd dimension along the axis of . The same reasoning holds for . Hence, if neither nor are multiples of , then one of the partitions will have an odd number of squares. However, if either or is a multiple of , then all partitions will have an even number of squares. Hence, we have shown that the answer is all pairs where either or (or both) is a multiple of .