Consider a stripe of $n$ fieds, numbered from left to right with the integers $1$ to $n$ in ascending order. Each of the fields is colored with one of the colors $1$, $2$ or $3$. Even-numbered fields can be colored with any color. Odd-numbered fields are only allowed to be colored with the odd colors $1$ and $3$.
How many such colorings are there such that any two neighboring fields have different colors?
1. **Define the problem and initial conditions:**
   - We have a stripe of \( n \) fields, numbered from 1 to \( n \).
   - Each field is colored with one of the colors 1, 2, or 3.
   - Even-numbered fields can be colored with any color.
   - Odd-numbered fields can only be colored with the odd colors 1 and 3.
   - Neighboring fields must have different colors.

2. **Base case:**
   - For \( n = 1 \), there are 2 possibilities (color 1 or color 3).

3. **Recursive step:**
   - Consider the number of colorings for \( n \) fields.
   - Let \( a_n \) be the number of valid colorings for \( n \) fields.

4. **Odd \( n \):**
   - If \( n \) is odd, the \( n \)-th field can be colored either 1 or 3.
   - For each choice of color for the \( n \)-th field, the \( n+1 \)-th field can be colored with one of the remaining two colors.
   - If the \( n+1 \)-th field is colored with an odd color (1 or 3), the \( n+2 \)-th field has only one valid choice.
   - If the \( n+1 \)-th field is colored with 2, the \( n+2 \)-th field has 2 valid choices (1 or 3).

5. **Even \( n \):**
   - If \( n \) is even, the \( n \)-th field can be colored with any of the three colors.
   - For each choice of color for the \( n \)-th field, the \( n+1 \)-th field can be colored with one of the remaining two colors.
   - This gives us a recursive relation for the number of valid colorings.

6. **Recursive relations:**
   - For odd \( n \), the number of valid colorings is given by:
     \[
     a_{2k+1} = 2 \cdot 3^k
     \]
   - For even \( n \), the number of valid colorings is given by:
     \[
     a_{2k} = 4 \cdot 3^{k-1}
     \]

7. **Induction argument:**
   - Base case: For \( n = 1 \), there are 2 possibilities, which matches \( 2 \cdot 3^0 = 2 \).
   - Inductive step: Assume the formula holds for \( n = 2k-1 \) and \( n = 2k \).
   - Show that it holds for \( n = 2k+1 \) and \( n = 2k+2 \).

8. **Conclusion:**
   - For \( 2k+1 \) fields, there are \( 2 \cdot 3^k \) possibilities.
   - For \( 2k \) fields, there are \( 4 \cdot 3^{k-1} \) possibilities.

The final answer is \( \boxed{ 2 \cdot 3^k } \) for \( 2k+1 \) fields and \( 4 \cdot 3^{k-1} \) for \( 2k \) fields.