Problem

Source: Ukrainian mathematical olympiad 2018 11.6

Tags: algebra, Sequence



The sequence $(x_n)$ is given by $x_1=a$, $x_{n+1}=\dfrac{1}{2}\left(x_n-\dfrac{1}{x_n}\right)$. Prove that there is $a$ such that the sequence $(x_n)$ has exactly $2018$ pairwise distinct elements. (If some element of the sequence is equal to $0$, it stops on that element) Proposed by Andriy Hoholev