Question 5
Find all periodic sequences $ a_{1}, a_{2}, \ldots $ of real numbers such that the following conditions hold for all $ n \geqslant 1 $:
$$ a_{n+2}+a_{n}^{2}=a_{n}+a_{n+1}^{2}\qquad\text{and}\qquad|a_{n+1}-a_{n}|\leqslant1. $$
$$ a_{n+2}+a_{n}^{2}=a_{n}+a_{n+1}^{2}\qquad\text{and}\qquad|a_{n+1}-a_{n}|\leqslant1. $$