Problem:
How many ways are there to write all numbers from to in the cells of a grid so that for all integers , the cell labeled shares an edge with the cell labeled ?
Problem:
How many ways are there to write all numbers from to in the cells of a grid so that for all integers , the cell labeled shares an edge with the cell labeled ?
Solution:
Apply a checkerboard coloring to the grid so that the corners and the center are black. Then by parity, the odd numbers must be in the black cells and the even numbers in the white cells.
If the center cell is , there are ways to pick and ways to pick , at which point the rest of the numbers are determined, for a total of possibilities. By symmetry there are possibilities for the center cell to be . Likewise, if the center cell is , picking and gives more, and another more for the center cell being . Finally, if the center cell is , the path is still determined by picking and . In total, there are therefore possibilities.