$(x_n)$ is sequence, such that $x_{n+2}=|x_{n+1}|-x_n$. Prove, that it is periodic.
Problem
Source: St Petersburg Olympiad 2009, Grade 10, P6
Tags: algebra
26.05.2019 18:39
If there are two non-positives $a, b$ in a row, then that allows you to dodge some of the casework in the above solution . If $a, b$ are two non-positives in a row, then the sequence goes $$a, b, -b-a, -2b-a, -b, a+b, -a, -2a-b, -a-b, a, b,$$and hence it's periodic. All we have to do is show that there indeed are two non-positives in a row. Indeed, there is clearly at least one non-positive in the sequence, say $a$. Then, it must be surrounded by two positives (otherwise we're done). Suppose that $b$ is the term after $a$, and $b > 0.$ Note that $b < -a$ since the term before $a$ is $-b-a > 0.$ Then, the sequence goes $a, b, b-a, -a, -b, b+a$. Since $-b, b+a$ are both non-positive, we're done. $\square$