Problem 2
Consider a table, and identify the cell in row and column , , with the ordered pair . Let be an integer such that . A -knight is a piece that moves one cell vertically or horizontally and cells in the other direction; that is, it moves from to such that is either or . The -knight starts at cell and performs several moves. A sequence of moves is a sequence of cells such that, for all , and the -knight can move from to . In this case each cell is said to be reachable. For each , find , the number of reachable cells.
Step 1 of 5: When does a cell have a legal move
Detailed analysis
A -knight move changes one coordinate by and the other by , and the sign of the part can always be chosen so that a coordinate already in stays in range. Hence has at least one on-board move exactly when the -part can be applied to or to , that is, when or or or . Since every move is reversible, the same condition governs whether has any on-board move at all, incoming or outgoing.