My teacher told our class that the $\displaystyle \varphi$ can be calculated by:

$\displaystyle

1 + \frac{1}{1 + \frac{1}{1+ \frac{1}{...}}}

$

I don't understandhoworwhythis works. I understand that as the denominators' continue on forever, the 1 + (fraction) changes ever so slightly. How do I go about solving this?

But I'm curious... What if I wanted to include a different set of numbers in a similar fashion?

$\displaystyle

2*\frac{3x+1}{2*\frac{3x+1}{2*3x+1 ...}}

$

Thank you for your help.

My gut feeling is, eventually, this number will reach infinity, if x > -1.

*note* I'm not used to the math programming language, so I know what is appearing is slightly off. If need be, I'll transcribe my intentions without the math programming language.