Problem

Source: 1998 France MO P2

Tags: Sequence, algebra



Let $(u_n)$ be a sequence of real numbers which satisfies $$u_{n+2}=|u_{n+1}|-u_n\qquad\text{for all }n\in\mathbb N.$$Prove that there exists a positive integer $p$ such that $u_n=u_{n+p}$ holds for all $n\in\mathbb N$.