Let $a_{0} = \cos \theta$. Then it is easy to check that $a_{n} = \cos (2^{n}\theta)$. So if $a_{i} = a_{j}$ for some $i \neq j$, then we must have
\begin{align*}
\cos(2^{i}\theta) = \cos(2^{j}\theta)
&\quad \Longleftrightarrow \quad 2^{i}\theta = 2n\pi \pm 2^{j}\theta, \quad n \in \Bbb{Z} \\
&\quad \Longleftrightarrow \quad \theta = \frac{2n\pi}{2^{i} \pm 2^{j}}, \quad n \in \Bbb{Z}
\end{align*}
Thus the problem reduces to find the condition of $(i, j, n, \pm)$ such that
$$ \cos \left( \frac{2n\pi}{2^{i} \pm 2^{j}} \right) \in \Bbb{Q}. $$
Referring to this posting, this is possible if and only if
\begin{align*}
\theta \equiv 0, \pm \frac{\pi}{3}, \pm \frac{\pi}{2}, \pm \frac{2\pi}{3} \pmod{2\pi}
\end{align*}
This corresponds to $a_{0} \in \{0, \pm \frac{1}{2}, \pm 1 \}$.