# Continued fractions with $n$ layers

Solve the equation

$$x=2+\dfrac1{2+\dfrac1{...2+\dfrac1{2+\dfrac1x}}}$$

Where there are n layers in the fraction

• you can accept my answer if it was good, if you want more details ask :D – user58512 Mar 12 '13 at 12:01
• Nope I understood it after you explained. Thanks allow for your help :) – user61067 Mar 12 '13 at 15:53

the first thing to observe is that the number of layers doesn't matter. If $x = 2 + \frac{1}{x}$ it solves your equation, and simple continued fractions have a unique assigned value.
It's easy to solve $x = 2 + \frac{1}{x}$ though, just subtract two then multiply up to get $x^2-2x - 1 = 0$.
• Did you mean $x=2+\frac{1}{x}$? – Vincent Tjeng Mar 3 '13 at 17:28