$a_n=\sqrt{2-a_{n-1}},a_1=\sqrt{2}$ Given
$$a_n=\sqrt{2-a_{n-1}},a_1=\sqrt{2}$$
I calculated $a_1$ to $a_5$
$$\sqrt{2},
\sqrt{2-\sqrt{2}},
\sqrt{2-\sqrt{2-\sqrt{2}}}, \\
\sqrt{2-\sqrt{2-\sqrt{2-\sqrt{2}}}}, \\
\sqrt{2-\sqrt{2-\sqrt{2-\sqrt{2-\sqrt{2}}}}}$$
which made me think of $\sin/\cos$. So I divided each by $2$, calculated $\arcsin(x)$ and got $$\left\{\frac{\pi }{4},\frac{\pi }{8},\frac{3 \pi }{16},\frac{5 \pi }{32},\frac{11 \pi }{64}\right\}$$
I found that this could be a formula
$$\frac{\pi}{3} \cdot  (-1)^n \cdot\frac{(-2)^n-1}{2^{n+1}}$$
So $$\sin \left(\frac{\pi}{3} \cdot  (-1)^n \cdot\frac{(-2)^n-1}{2^{n+1}}\right)$$  is $a_n/2$, but this way seems not natural. Is there a more natural way?

Let $x_n$ for $n\in\Bbb N$ be the sequence defined by
\begin{align}
x_0&=\frac\pi 2&
x_n&=\frac{\pi-x_{n-1}}2
\end{align}
and $a_n=2\cos(x_n)$.
Then $0\leq x_n\leq\frac\pi 2$, hence $0\leq a_n\leq 2$.
Moreover:
\begin{align}
a_n^2
&=4\cos^2(x_n)\\
&=2\cos(2x_n)+2\\
&=2\cos(\pi-x_{n-1})+2\\
&=-2\cos(x_{n-1})+2\\
&=-a_{n-1}+2
\end{align}
so that $a_n=\sqrt{2-a_{n-1}}$.
On the other hand $x_n=\frac\pi 3+(-2)^{-n}(x_0-\frac\pi 3)$, hence
$$a_n=2\cos\Bigl(\frac\pi 3+(-2)^{-n}\frac\pi 6\Bigr)$$
gives an explicit formula for $a_n$.
