<s>[INST] Sums with nested radicals related to $1/\pi^2$ Context:
I evaluated some sums related to $1/\pi^{2}$ that for a reason I don't know I can't find in the literature.
$$(1)\hspace{.5cm}{1\over 2\sqrt{2}}+{1\over 2^{3}\sqrt{2+\sqrt{2}}}+{1\over 2^{5}\sqrt{2+\sqrt{2+\sqrt{2}}}}+\cdots=1-{8\over \pi^{2}},$$
$$(2)\hspace{.5cm}{1/4\over 2+\sqrt{3}}+{1/16\over 2+\sqrt{2+\sqrt{3}}}+{1/64\over 2+\sqrt{2+\sqrt{2+\sqrt{3}}}}+\cdots=1-{9\over \pi^{2}},$$
$$(3)\hspace{.5cm}{1/4\over 2+\sqrt{2+\varphi}}+{1/16\over 2+\sqrt{2+\sqrt{2+\varphi}}}+{1/64\over 2+\sqrt{2+\sqrt{2+\sqrt{2+\varphi}}}}+\cdots={1+\varphi}-{25\over \pi^{2}},$$
where $\varphi=\frac{1+\sqrt{5}}{2}.$
Note that this series are related to Viète's formulas.

Question:
Do you know any reference where these formulas are shown? Can you prove them with a general result?
 [/INST] I will consider here only the third series with $\varphi$ the golden ratio.
I will establish it as an application of the following identity, justifying the presence of a $\frac{1}{\pi^2}$ term :
$$\sum_{n=1}^{\infty}\frac{1}{4^n\cos^2\frac{x}{2^n}}=\frac1{\sin^2x}-\frac1{x^2}$$
Its proof by different means is given in the answers to this question. Among them, one finds a proof using Viète's formulas...
Indeed, taking $x=\frac{\pi}{5}$ in (1), one gets, in the RHS :
$$\frac{1}{\sin^2 \frac{\pi}{5}}-\frac{25}{\pi^2}=\frac{4}{3-\pi}-\frac{25}{\pi^2}$$
On the LHS, detailing the first terms :
$$\color{red}{\underbrace{\frac{1}{4\cos^2\frac{\pi}{5 \times 2}}}_{= \ \frac{1}{2+\varphi}}}+\frac{1}{4^2\cos^2\frac{\pi}{5 \times 2^2}}+\frac{1}{4^3\cos^2\frac{\pi}{5 \times 2^3}}+\cdots$$
Why is the first term highlighted ? Because it is the single term which is not present in the series you have given. All the other terms are exactly the right ones :
Indeed, one can verify that :
$$4 \cos^2 \left(\frac{\pi}{5.2^k}\right)=\begin{cases}2+\varphi&(k=1)\\ 2+\sqrt{2+\varphi}&(k=2)\\2 + \sqrt{2+\sqrt{2+\varphi}}&(k=3)\\ \cdots \end{cases}$$
due to relationship :
$$\cos\left(\frac{\pi}{5.2^{k+1}}\right)=\frac12\left(1+\cos\left(\frac{\pi}{5.2^{k}}\right)\right) \iff $$
$$4\left(\cos\left(\frac{\pi}{5.2^{k+1}}\right)\right)^2=2+2 \cos\left(\frac{\pi}{5.2^{k}}\right) $$
It remains for completing the proof to subtract to the RHS the "added term" :
$$\frac{4}{3-\pi}-\frac{25}{\pi^2}-\color{red}{\frac{1}{2+\varphi}}=1+\varphi-\frac{25}{\pi^2}$$
as desired (using relationshup $\varphi^2=\varphi+1$, etc.).
Remark : the different special values such as $\sin \frac{\pi}{5}$, etc. can be found for example here.
</s>