# Hard Sequence problem

by aznluster
Tags: sequence
 P: 5 Find $$\sqrt{1+\sqrt{1+2\sqrt{1+3\sqrt{1+...}}}}$$
 P: 32 Ok so this is basically one of Ramanajan's identities: $$x + n + a = \sqrt{ax + (n+a)^{2} + x \sqrt{a(x +n) + (n+a)^{2} + (x + n) \sqrt{...}}}}$$
 P: 3,014 Let $$x_{n} = \sqrt{1 + n \sqrt{1 + (n +1) \sqrt{1 + \ldots}}}$$ Then, we have the backwards recursive formula: $$x_{n} = \sqrt{1 + n x_{n + 1}}$$ We want to find $x_{1}$. Let us see what is the limit $x \equiv \lim_{n \rightarrow \infty}{x_{n}}$? If we want a finite limit, we must have: $$x_{n} \sim -\frac{1}{n}, \; n \rightarrow \infty$$ but, this is impossible since all $x_{n} > 0$. Therefore, the limit is infinite. Let us assume that is asymptotically a power law: $$x_{n} \sim A \, n^{\alpha}, \; n \rightarrow \infty, \; \alpha > 0$$ Then, we have: $$A n^{\alpha} \sim \sqrt{1 + n A (n + 1)^{\alpha}} \sim \sqrt{A} \, n^{\frac{1 + \alpha}{2}}$$ which means: $$\alpha = \frac{1 + \alpha}{2} \Rightarrow \alpha = 1$$ and $$A = \sqrt{A} \Rightarrow A = 0 \vee A = 1$$ So, we may conclude: $$x_{n} = n (1 + y_{n}), \; y_{n} \rightarrow 0, \; n \rightarrow \infty$$ The backwards recursive relation for $y_{n}$ is: $$n (1 + y_{n}) = \sqrt{1 + n \cdot n (1 + y_{n + 1})}$$ $$y_{n} = \sqrt{1 + y_{n + 1} + \frac{1}{n}} - 1$$ $$y_{n + 1} = y_{n} (2 + y_{n}) - \frac{1}{n}$$ Define a discrete z-transform: $$Y(z) \equiv \sum_{n = 1}^{\infty}{y_{n} z^{-n}}$$ As we can see, $y_{1}$ is the coefficient in the Laurent series of $Y(z)$ around $z = 0$. According to the residue theorem: $$y_{1} = \mathrm{Res}(Y(z), z = 0) = \frac{1}{2 \pi i} \, \oint_{C_{z = 0}}{Y(z) \, dz}$$ We need to find a functional equation for $Y(z)$ from the above (non-linear) recursive relation.