φ Generator

This program generates φ, also called the golden ratio. It creates the fibonacci sequence \big\{1, 1, 2, 3, 5, 8, 13, \dots\big\} and divides the newly generated number by the last one. In theory this program would generate exactly φ.Terminal Output

Fibonacci sequence

\text{Start: } x_1 = 1 \text{ and } x_2 = 1
\text{Generation: } x_n = x_{n-1} + x_{n-2}

1 + 1 = 2
1 + 2 = 3
2 + 3 = 5
3 + 5 = 8
5 + 8 = 13
8 + 13 = \dots

The golden ratio (φ)

\phi \text{ is the ratio between } x_n \text{ and } x_{n-1}\text{.}
\phi = \frac{x_n}{x_{n-1}}


# Python 2.7.7 Code
# Jonathan Frech 6th of April, 2015

Continue reading