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

197 Views Asked by At

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!

1

There are 1 best solutions below

0
On BEST ANSWER

Like continued fractions, if it's not periodic (or some sort of nice pattern), you have to do the innermost first.

See my trial using Mathematica below:

enter image description here