# Graphing $\sqrt{a_1 + \sqrt{a_2 + \sqrt{a_3 + \sqrt{a_4+\cdots}}}}$: help please!

I am investigating the sequence that tends to the limit $\sqrt{a_1 + \sqrt{a_2 + \sqrt{a_3 + \sqrt{a_4+\cdots}}}}$, and although I am making headway on related theory, I would like to graph the sequence, by means of a computer program. (I will define $a_n$, for instance $a_n=e^n$)

The trouble is that the monstrosity is defined 'outside in', as I like to see it.

The issue is that $\sqrt {2+\sqrt {2+\sqrt {2+\ldots}}}$, the limit of $a_n = \sqrt{2 + a_{n - 1}}$, is very easy to compute numerically: one need only instruct the computer to apply the same recursive formula an indefinite number of times -

whereas I have no idea how to translate the move from the nth term to the (n+1)th term of MY sequence into programmable operations.

If there is an easy way to do that, I shall be much obliged. Thank you!

• The nested radical is not always convergent, see Herschfeld's criterion: mathworld.wolfram.com/NestedRadical.html. It would be easier to answer if some information about the sequence $\{a_n\}_n$ were given. – Jack D'Aurizio Jun 24 '16 at 13:12
• Yes, I'm onto the convergence criteria myself: my question is, how do you make a computer program graph the nested radical from n=1 (one radical) to n= a very large number of nested radicals, without much hassle – Yon Teh Jun 24 '16 at 13:29 