## Task 1.

Determine all periodic sequences $\left(x_{n}\right)_{n \in \mathbb{N}}$ of positive real numbers with the property that for all $n \in \mathbb{N}$,

$$
x_{n+2}=\frac{1}{2}\left(\frac{1}{x_{n+1}}+x_{n}\right)
$$
## Solution.

The given condition can be written as follows

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

or equivalently as

$$
2\left(x_{n+2} x_{n+1}-1\right)=x_{n+1} x_{n}-1 .
$$

If we introduce the notation $y_{n}=x_{n+1} x_{n}-1$, we conclude that $2 y_{n+1}=y_{n}$ for all $n \in \mathbb{N}$. If $A=y_{1}=x_{1} x_{2}-1$, then

$$
y_{n}=\frac{1}{2^{n-1}} A
$$

Let $p$ be such that $x_{n+p}=x_{n}$ for all $n \in \mathbb{N}$. Then

$$
y_{n+p}=x_{n+p+1} x_{n+p}-1=x_{n+1} x_{n}-1=y_{n}
$$

so we conclude that the sequence $\left(y_{n}\right)_{n \in \mathbb{N}}$ is also periodic.

However, due to the form $y_{n}=\frac{1}{2^{n-1}} A$, this sequence can only be periodic if $A=0$.

Thus, $x_{n+1} x_{n}=1$ for all $n \in \mathbb{N}$. Any such sequence is a solution (which is evident from the way we wrote the condition and the equivalence of this writing with the condition in the problem), i.e., the solutions are all sequences of the form

$$
x_{2 k-1}=a, \quad x_{2 k}=\frac{1}{a}
$$

for all $k \in \mathbb{N}$, where $a$ is an arbitrary positive real number.