1. Coloring the Chessboard:
We color the chessboard in a repeating pattern of 1, 2, 3, and 4 as follows:
1414⋮2323⋮1414⋮2323⋮…………⋱
2. Analyzing Moves:
- (b) Move: Moves the stone to a square sharing only one common vertex with the current square. This means the stone moves to a square of the same parity but different color.
- (a) Move: Moves the stone to a square sharing a common side with the current square. This means the stone moves to a square of different parity.
3. Path Analysis:
Consider a sequence of moves in groups of 4 squares: A, B, C, D.
- A to B is a (b) move: A and B have the same parity but different colors.
- B to C is an (a) move: B and C have different parities.
- C to D is a (b) move: C and D have the same parity but different colors.
This implies:
- A and B have the same parity.
- C and D have the same parity.
- B and C have different parities.
- A=B and C=D.
Therefore, {A,B,C,D}={1,2,3,4}. Every 4 consecutive squares must include one of each color.
4. **Odd n Analysis:**
Let n=2k+1. The total number of squares is n2=(2k+1)2=4k2+4k+1.
- We can decompose this path into (k2+k) blocks of 4 squares and one final square.
- Each block of 4 squares must contain one of each color (1, 2, 3, 4).
However, there are only k2 squares of color 4 on the board. Since we need at least k2+k squares of each color, it is impossible to visit every square exactly once for odd n≥3.
5. **Even n Analysis:**
For even n, let n=2k. The total number of squares is n2=(2k)2=4k2.
- We can decompose this path into k2 blocks of 4 squares.
- Each block of 4 squares must contain one of each color (1, 2, 3, 4).
Since there are exactly k2 squares of each color, it is possible to visit every square exactly once for even n.
Conclusion:
For the stone to visit every square exactly once, n must be even.
The final answer is n must be even.