Coding challenge

The "golden ratio" is worth reading about on Wikipedia. As a number, it is $\rho=\frac{1}{2}(1+\sqrt{5})$, where $\rho$ is the golden ratio. Write code to show that
  1. $\rho=\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+...}}}}$
  2. $\rho^n=\rho^{n-1}+\rho^{n-2}$
  3. $\rho=\rho^{-1}+\rho^{-2}+\rho^{-3}+...$
(From Cheney, p. 669.)

Type your code here:

Lua reference

See your results here:

Show a friend, family member, or teacher what you've done!

Here is a share link to your code: