A pawn is placed on a square of a $ n \times n$ board. There are two types of legal
moves: (a) the pawn can be moved to a neighbouring square, which shares a common side with the current square; or (b) the pawn can be moved to a  neighbouring square, which shares a common vertex, but not a common side with the current square. Any two consecutive moves must be of different type. Find all integers $ n \ge 2$, for which it is possible to choose an initial square and a sequence of moves such that the pawn visits each square exactly once (it is not required that the pawn returns to the initial square).
1. **Checkerboard Coloring for Odd \( n \):**
   - Consider an \( n \times n \) board where \( n \) is odd, i.e., \( n = 2k + 1 \).
   - Color the board in a checkerboard pattern such that the top-left corner \((1,1)\) is black.
   - Label the squares as \((i,j)\) where \( 1 \le i, j \le n \).

2. **Move Types and Color Changes:**
   - Move (a): Moves the pawn to a neighboring square sharing a common side, changing the color of the square.
   - Move (b): Moves the pawn to a neighboring square sharing a common vertex but not a common side, keeping the color of the square the same.

3. **Sequence Constraints:**
   - Any two consecutive moves must be of different types.
   - From any square of a given color, either the move before or after must be to another square of the same color.

4. **Contradiction for Odd \( n \):**
   - Assume a sequence exists where the starting and ending points are not opposite corners.
   - Rotate the board such that the starting and ending points are not on the first row.
   - Without loss of generality (WLOG), let the corners be black.
   - The only black square next to corner \((1,1)\) is \((2,2)\), and similarly, the only black square next to \((1,2k+1)\) is \((2,2k)\).

5. **Sequence Analysis:**
   - In our sequence, we must have:
     \[
     \text{white} - (1,1) \leftrightarrow (2,2) - \text{white}
     \]
     \[
     \text{white} - (1,2k+1) \leftrightarrow (2,2k) - \text{white}
     \]
   - Since we have already traversed through \((2,2)\), the only available black square adjacent to \((1,3)\) is \((2,4)\).
   - Repeating this argument, the only black square adjacent to black square \((1,2m+1)\) is \((2,2m+2)\), and so the only black square adjacent to \((1,2k-1)\) is \((2,2k)\), contradicting the earlier sequence.

6. **Opposite Corners Case:**
   - If a sequence exists where the starting and ending points are opposite corners, WLOG let the starting point be \((1,1)\).
   - Use a similar contradiction based on the black squares in the first row and first column.

7. **Even \( n \):**
   - For even \( n \), we can construct a sequence that visits each square exactly once.
   - Consider the following sequence for \( n = 4 \):
     \[
     (1,1) \rightarrow (1,2) \rightarrow (2,1) \rightarrow (2,2) \rightarrow (3,1) \rightarrow (3,2) \rightarrow (4,1) \rightarrow (4,2) \rightarrow (4,3) \rightarrow (3,4) \rightarrow (4,4) \rightarrow (3,3) \rightarrow (2,4) \rightarrow (1,3) \rightarrow (2,3) \rightarrow (1,4)
     \]
   - This sequence can be generalized for any even \( n \).

The final answer is \( \boxed{\text{even } n} \)