How do I find the value of this weird expression? How can I find the value of the expression  $\sqrt{2}^{\sqrt{2}^{\sqrt{2}^...}} $?  I wrote a computer program to calculate the value, and the result comes out to be 2 (more precisely 1.999997). Can anyone explain what's happening? Is there any general method to calculate these expressions? I am new to these problems.Thanks in advance!
EDIT
On looking at the answer by Clement C., I thought I could generalize the method to find the value of any expression of the form $\sqrt[n]{n}^{\sqrt[n]{n}^{\sqrt[n]{n}^...}} $. The value should be $n$, but this is not the case. This is the graph for $n<50$.

Any help would be appreciated.
 A: As WillO wrote, once properly defined as the limit of the recursive sequence $a_{n+1} = \sqrt{2}^{a_n}$ (which exists by monotonicity, for any initial value $a_0$), the value $x$ you are looking for satisfies the equation
$$
\sqrt{2}^x =x
$$
(can you see why?), or equivalently
$$
\frac{\ln 2}{2} = \frac{\ln x}{x}
$$
(by taking the logarithm and rearranging the terms). Clearly, $2$ is a solution (to this equation, that any solution $x$ to the original problem must in particular satisfy), as is $4$: to show that these are the only ones, observe that $x\mapsto \frac{\log x}{x}$ is increasing on $(0,1]$, and decreasing on $[1,\infty)$. Now, depending on the initial value $a_0$ of your sequence, the solution has to be one of the two. I assume you want $a_0=1$.
A: You can rewrite your expression as $$\sqrt2^{\sqrt2^{...}}=2^{(\frac{1}{2})^{2^{...}}}$$
Clearly multiplying the powers out you end up with $$2^{1^{1^{...}}}=2$$
A: We don't allow infinite expressions, so first you need to define what it means.  One way to make sense of it is as a sequence, $a_1=\sqrt 2, a_2 =\sqrt 2 ^{\sqrt 2}, a_3=\sqrt 2 ^{\sqrt 2^{\sqrt 2}},a_n=\sqrt 2^{a_{n-1}}$ and ask if the sequence has a limit as $n \to \infty$  If the limit exists, call it $L$. Then $L=\sqrt 2^L$, which is satisfied by $2$.  To prove the limit exists, show that $a_n \lt 2 \implies a_{n+1} \lt 2$ and $a_n \gt 1 \implies a_{n+1} \gt a_n$.  The sequence is now monotone and bounded above, so has a limit.
