proof for the Ramanujan's formula ? I found this formula in a textbook in which the proof to the formula was not given
Ramanujam's formula
$$\sqrt{1 +n\sqrt{1 +(n+1)\sqrt{1 + (n+2)\sqrt{1 + (n+3)\sqrt{1 +....\infty}}}}} = n+1$$
Its a great equation andhow do you prove this. its a bit difficult for me and tried different methods to solve this. Iam an undergraduate and I want you to elaborate the method of solving if its complex.  

More general formulation can be gotten:
$F(x) = \sqrt{ax+(n+a)^2 +x\sqrt{a(x+n)+(n+a)^2+(x+n) \sqrt{a(x+2n)+(n+a)^2+(x+2n)\sqrt{\mathrm{\cdots}}}}}$
$$F(x)^2 = ax+(n+a)^2 +x\sqrt{a(x+n)+(n+a)^2+(x+n) \sqrt{\mathrm{\cdots}}} $$
Which can be simplified to:
$$F(x)^2 = ax+(n+a)^2 +xF(x+n) \tag1$$
Let's assume that $F(x) = mx+k $
$deg(F(x))$ cannot be more than 1 otherwise left side degree will be bigger than right side
in Equation 1
$$F(x)^2 = ax+(n+a)^2 +xF(x+n) $$
 $$( mx+k)^2=ax+(n+a)^2+x(m(x+n)+k) $$
$$ m^2x^2+2mkx+k^2=ax+(n+a)^2+mx^2+(mn+k)x$$
$m^2=m$
$m=1$ or $m=0$
$2mk=mn+k+a$
If $m=1$ then 
$2k=n+a+k$
$k=n+a$
And It is also confirming constant term of $ m^2x^2+2mkx+k^2=ax+(n+a)^2+mx^2+(mn+k)x$ :
$$k^2=(n+a)^2$$
$F(x) = mx+k $
$F(x) = x + n + a $
$$  x + n + a= \sqrt{ax+(n+a)^2 +x\sqrt{a(x+n)+(n+a)^2+(x+n) \sqrt{\mathrm{\cdots}}}} $$
So, setting $a=0$, $n=1$,    
$$ x+1=\sqrt{1 +x\sqrt{1 +(x+1)\sqrt{1 + (x+2)\sqrt{1 + (x+3)\sqrt{1 +....}}}}}  $$
Please see Infinitely nested radicals in the wiki page as reference.
