# How did Ramanujan get this result?

We know Ramanujan got this result $$\sqrt{1+2\sqrt{1+3\sqrt{1+\cdots }}}=3$$ and he used the formula $$x+n+a=\sqrt{ax+{{(n+a)}^{2}}+x\sqrt{a(x+n)+{{(n+a)}^{2}}+(x+n)\sqrt{\cdots }}}$$ where $x=2,n=1,a=0$ ,we get the first result, but I don't know how to prove it, can you help me?

-

$$(x+n+a)^2 = x^2 + n^2 + a^2 + 2an + 2ax + 2nx$$ $$= ax + (n+a)^2 + x(x + a + 2n)$$
so $x + n + a = \sqrt{ax + (n+a)^2 + x*((x+n) + n + a)}$
which you can substitute for $(x+n) + n + a$ again and again to get the sequence of iterated roots.
The convergence is because the sequence is monotone increasing but bounded above by $x+n+a$ for $n > 0$, $a,x \ge 0$ (after enough ($k$) iterations, $x + k*n + a$ will be greater than 1.)