I have this recurrence relation:
$$a_n=a_{n-1}^2-1$$
I can see that this sequence stays constant if $a_0=\phi$ or $1-\phi$ and it can also stably continue like $0,-1,0,-1,\cdots$. ($\phi=\frac{1+\sqrt{5}}2)$
The sequence will diverge to $+\infty$ if $|a_0|>\phi$.
I observed that whenever $a_0$ isn't $\pm\phi$ or $\pm(1-\phi)$ and $|a_0| \le \phi$, the sequence will converge to $0,-1,0,-1,\cdots$, no matter how close $a_0$ is to $\pm\phi,\pm(1-\phi)$. This makes sense to me intuitively, although I can't find a mathematical explanation.
How do I prove this, and which theory deals with this kind of problems?

