$a_1 = 2, a_{n+1} = 2a^2_n+1, a_n = ?$ I got this problem from my friend. I have been doing it for hours.
$a_1 = 2$
$a_{n+1} = 2a^2_n+1$
$a_n = ?$
Could you please tell me how to solve this? Thanks!
BTW: I failed to solve it by using Mathematica RSolve[{a[1] == 2, a[n + 1] == 2 a[n]^2 + 1}, a[n], n]
 A: Take $b_n = 2 a_n,$ this becomes
$$  b_{n+1} = b_n^2 + 2, \; \; b_1 = 4.  $$
This is a well-known problem, the general heading is Lucas-Lehmer sequences. The best that can be done is that there is a real number $\theta > 1$ such that
$$ b_n \approx \theta^{\left( 2^n \right)},$$ where the really bad news is that you can only get estimates of $\theta$ by using more and more terms.
If your problem had a minus sign instead, then there would be a closed form solution!  Given
$$  x_{n+1} = x_n^2 - 2, \; \; \; x_0 > 2,  $$
find the constants $A > B > 0$ such that $$ AB = 1, \; \;  A+B = x_0.  $$
Then
$$  x_n = A^{\left( 2^n \right)} + B^{\left( 2^n \right)}  $$
So, my suspicion is that there was a lapse in communication, and the problem was originally $$\color{blue}{ a_1 = 2, \; \; a_{n+1} = 2 a_n^2 - 1.}   $$
A: Assuming, as Will Jagy suspected, that the problem is $${ a_1 = 2, \; \; a_{n+1} = 2 a_n^2 - 1}$$ using a CAS I obtained, after some manipulations and simplifications, the surprizing form $$a_n=\cosh\Big(2^{n-1}\log(2+\sqrt 3)\Big)$$ or $$a_n=\frac{1}{2} \left(2+\sqrt{3}\right)^{-2^{n-1}}
   \left(1+\left(2+\sqrt{3}\right)^{2^n}\right)$$
