. The sequence $\left(x_{n}\right)$ is defined recursively by $x_{0}=1, x_{1}=1$, and:

$$
x_{n+2}=\frac{1+x_{n+1}}{x_{n}}
$$

for all $n \geqslant 0$. Calculate $x_{2007}$.
. We start by calculating the first terms of the sequence $\left(x_{n}\right)$. We find:

$$
x_{2}=2 \quad ; \quad x_{3}=3 \quad ; \quad x_{4}=2 \quad ; \quad x_{5}=1 \quad ; \quad x_{6}=1
$$

and we find two consecutive terms equal to 1. From this point on, the calculations repeat, which proves that the sequence $\left(x_{n}\right)$ is periodic, in this case with a period of 5. Thus $x_{2007}=x_{2}=2$.