# What is $\lim_{n\to\infty}2^n\sqrt{2-\sqrt{2+\sqrt{2+\dots+\sqrt{p}}}}$ for $negative$ and other $p$?

This was inspired by similar posts like this one. Define the function,

$$F(p) = \lim_{n\to\infty}2^n\sqrt{2-\underbrace{\sqrt{2+\sqrt{2+\dots+\sqrt{p}}}}_{n \textrm{ square roots}}}$$

We know that,

$$F(2) = \frac{\pi}{2},\quad F(3) = \frac{\pi}{3}$$

I was wondering what it evaluates to if we use other integers. Some numerical computation and the Inverse Symbolic Calculator suggests that,

\begin{aligned} F(5) &= 2\ln\big(\tfrac{1+\sqrt{5}}{2}\big)\,i\\ F(6) &= \ln\big(2+\sqrt{3}\big)\,i\\ F(7) &= \ln\big(\tfrac{5+\sqrt{3\times7}}{2}\big)\,i\\ \vdots\\ F(11) &= \ln\big(\tfrac{9+\sqrt{7\times11}}{2}\big)\,i\\ \vdots\\ F(17) &= \ln\big(\tfrac{15+\sqrt{13\times17}}{2}\big)\,i \end{aligned}

Note that the radical arguments are fundamental units. If we use negative $p$,

\begin{aligned} F(-1) &= \pi-2\ln\big(\tfrac{1+\sqrt{5}}{2}\big)\,i\\ F(-2) &= \pi-\ln\big(2+\sqrt{3}\big)\,i\\ F(-3) &= \pi-\ln\big(\tfrac{5+\sqrt{3\times7}}{2}\big)\,i\\ \vdots\\ F(-7) &= \pi-\ln\big(\tfrac{9+\sqrt{7\times11}}{2}\big)\,i\\ \vdots\\ F(-13) &= \pi-\ln\big(\tfrac{15+\sqrt{13\times17}}{2}\big)\,i \end{aligned}

and so on. It seems $F(2+m)+F(2-m) = \pi$. I also observed that if $m\pm2$ are primes, then,

$$F(2+m) = \pi-F(2-m) = \ln\Big(\tfrac{m+\sqrt{(m-2)(m+2)}}{2}\Big)\,i\tag1$$

though the form of $(1)$ is only conjectural.

Question: What is then the formula for $F(p)$ using general $p$?

• May be $F(5)=2\ln(\eta(5))i$ and $F(4+k)=\ln(\eta(5k+k(k-1)))i$? I checked this for the $k=2,3,4,7$. Here $\eta(D)$ is fundamental unit. – grizzly Sep 2 '15 at 17:48

The (hyperbolic) cosine bisection formula gives: $$2\cos\frac{x}{2}=\sqrt{2+2\cos x},\qquad 2\cosh\frac{x}{2}=\sqrt{2+2\cos x}$$ hence assuming $a_0=2\cosh(u_0)=\sqrt{p}$ and $a_{n+1}=\sqrt{2+a_n}$ we have: $$a_n = 2 \cosh\left(\frac{u_0}{2^n}\right),\quad \sqrt{2-a_n}= 2\sinh\left(\frac{u_0}{2^{n+1}}\right)$$ so: $$\lim_{n\to +\infty} 2^n\sqrt{2-a_n} = u_0 = \text{arccosh}\left(\frac{\sqrt{p}}{2}\right).$$ If $p$ is a positive real number less than $4$ it is enough to replace $\cosh$ with $\cos$ and $\text{arccosh}$ with $\arccos$. If $p$ is negative, we have to be careful in defining what the square root of a complex number is, but the trick is just the same.
• Thanks. Can you give an example, say, how to arrive at the value of $F(17)$ given above? – Tito Piezas III Sep 2 '15 at 16:43
• @TitoPiezasIII: to compute $\text{arccosh}\left(\frac{\sqrt{17}}{2}\right)$ is equivalent to solving $\cosh(x)=\frac{\sqrt{17}}{2}$ or $e^{x}+e^{-x}=\sqrt{17}$ that is a quadratic equation in $e^x$. Logarithms arise from there. – Jack D'Aurizio Sep 2 '15 at 16:46
• Obviously you have to adjust something in the above lines if $a_n>2$, since in such a case $\sqrt{2-a_n}$ is not a real number. Anyway, the point is that the structure of the nested radical is related with the cosine bisection formula, hence the limit depends on the inverse function of $\cos$/$\cosh$. – Jack D'Aurizio Sep 2 '15 at 16:50
• Hm. By the way, can you confirm if the form of $(1)$ (the factorization of the discriminant) holds true when $m\pm2$ are primes? – Tito Piezas III Sep 2 '15 at 16:50
• @TitoPiezasIII: it looks reasonable as a consequence of the (hyperbolic) cosine addition formulas, but I see no reason for that identity to depend on the primality of $m$. Maybe just on the parity. – Jack D'Aurizio Sep 2 '15 at 16:52