Consider the part of a lattice given by the corners $(0, 0), (n, 0), (n, 2)$ and $(0, 2)$. 
From a lattice point $(a, b)$ one can move to $(a + 1, b)$ or to $(a + 1, b + 1)$ or to $(a, b - 1$), provided that the second point is also contained in the part of the lattice.
How many ways are there to move from $(0, 0)$ to $(n, 2)$ considering these rules?
To solve the problem of finding the number of ways to move from \((0,0)\) to \((n,2)\) on the given lattice with the specified movement rules, we can use a recursive approach. Let's define the following:

- \(a_n\): the number of ways to move from \((0,0)\) to \((n,2)\)
- \(b_n\): the number of ways to move from \((0,0)\) to \((n,1)\)
- \(c_n\): the number of ways to move from \((0,0)\) to \((n,0)\)

Given the movement rules, we can derive the following recurrence relations:

1. \(a_n = 2a_{n-1} + b_{n-1}\)
2. \(b_n = 2a_{n-1} + 2b_{n-1} + c_{n-1}\)
3. \(c_n = 5a_{n-1} + 4b_{n-1} + c_{n-1}\)

These recurrences can be derived by considering the possible moves to each point \((n,2)\), \((n,1)\), and \((n,0)\) from the previous column \((n-1)\).

To solve these recurrences, we can use matrix exponentiation. Define the vector \(x_n = \begin{bmatrix} a_n \\ b_n \\ c_n \end{bmatrix}\). Then, we can write the recurrence relations in matrix form:

\[ x_n = A x_{n-1} \]

where \(A\) is the matrix:

\[ A = \begin{bmatrix} 2 & 1 & 0 \\ 2 & 2 & 1 \\ 5 & 4 & 1 \end{bmatrix} \]

Thus, we have:

\[ x_n = A^{n-1} x_1 \]

where \(x_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}\) since there is only one way to move from \((0,0)\) to \((1,2)\), and no ways to move to \((1,1)\) or \((1,0)\).

To find \(A^{n-1}\), we can diagonalize \(A\). This involves finding the eigenvalues and eigenvectors of \(A\).

1. **Find the eigenvalues of \(A\)**:
   The characteristic polynomial of \(A\) is given by:

   \[ \det(A - \lambda I) = \begin{vmatrix} 2-\lambda & 1 & 0 \\ 2 & 2-\lambda & 1 \\ 5 & 4 & 1-\lambda \end{vmatrix} \]

   Expanding the determinant, we get:

   \[ (2-\lambda) \begin{vmatrix} 2-\lambda & 1 \\ 4 & 1-\lambda \end{vmatrix} - 1 \begin{vmatrix} 2 & 1 \\ 5 & 1-\lambda \end{vmatrix} \]

   \[ = (2-\lambda) [(2-\lambda)(1-\lambda) - 4] - [2(1-\lambda) - 5] \]

   \[ = (2-\lambda) [2 - 3\lambda + \lambda^2 - 4] - [2 - 2\lambda - 5] \]

   \[ = (2-\lambda) [\lambda^2 - 3\lambda - 2] - [-3 - 2\lambda] \]

   \[ = (2-\lambda) (\lambda^2 - 3\lambda - 2) + 3 + 2\lambda \]

   \[ = 2\lambda^2 - 6\lambda - 4 - \lambda^3 + 3\lambda^2 + 2\lambda + 3 + 2\lambda \]

   \[ = -\lambda^3 + 5\lambda^2 - 5\lambda + 1 \]

   The characteristic polynomial is:

   \[ -\lambda^3 + 5\lambda^2 - 5\lambda + 1 = 0 \]

   Solving this cubic equation, we find the eigenvalues \(\lambda_1, \lambda_2, \lambda_3\).

2. **Find the eigenvectors of \(A\)**:
   For each eigenvalue \(\lambda_i\), solve \((A - \lambda_i I)v_i = 0\) to find the corresponding eigenvector \(v_i\).

3. **Form the matrices \(V\) and \(D\)**:
   - \(V\) is the matrix whose columns are the eigenvectors \(v_1, v_2, v_3\).
   - \(D\) is the diagonal matrix with eigenvalues \(\lambda_1, \lambda_2, \lambda_3\) on the diagonal.

4. **Compute \(A^{n-1}\)**:
   Using the diagonalization \(A = VDV^{-1}\), we have:

   \[ A^{n-1} = VD^{n-1}V^{-1} \]

5. **Compute \(x_n\)**:
   Finally, compute \(x_n = A^{n-1} x_1\).

Given the complexity of solving the cubic equation and finding the eigenvectors, this approach is theoretically sound but computationally intensive. However, it provides a systematic way to solve the problem.

The final answer is \( \boxed{ a_n } \), the first component of \(x_n\).