5. Infinite fractions

Decimals are one way to write irrational numbers. Continued fractions are another — and some irrational numbers become astonishingly simple.

Fractions inside fractions

A continued fraction looks like this:

1 + 1/(1 + 1/(1 + 1/(1 + …)))

At first it looks impossibly complicated. But notice that after the first “1 + 1/”, the whole expression starts again.

The golden ratio returns

Call the infinite expression x. Because the tail is another copy of x:

x = 1 + 1/x

We have seen that equation before. Its positive solution is φ. Therefore:

φ = 1 + 1/(1 + 1/(1 + 1/(1 + …)))

Main idea
Self-similarity turns infinity into an equation

When an infinite expression contains a complete copy of itself, we can name the whole expression and solve an ordinary algebraic equation.

Stop early and get fractions

Cut the golden continued fraction off after a few layers:

1 = 1/1
1 + 1/1 = 2/1
1 + 1/(1 + 1/1) = 3/2
next: 5/3
then: 8/5
then: 13/8

The Fibonacci numbers have appeared yet again.

Practice puzzle
One more layer

After 13/8, what is the next approximation?

💡
Learning tipReplace a/b by 1 + b/a.
Reveal answer

1 + 8/13 = 21/13. The next approximation is 21/13.

√2 has its own pattern

The square root of 2 has the continued fraction:

√2 = 1 + 1/(2 + 1/(2 + 1/(2 + …)))

Its approximations begin:

1, 3/2, 7/5, 17/12, 41/29, …

These fractions are exceptionally good approximations to √2.

Challenge
A repeating 2

Let y = 2 + 1/(2 + 1/(2 + …)). Find y, then use it to recover √2 = 1 + 1/y.

Reveal answer

Since y = 2 + 1/y, we get y² = 2y + 1, so y = 1 + √2 (taking the positive solution).

Then 1 + 1/y = 1 + 1/(1 + √2) = √2.

What have we learned?

  • Continued fractions are fractions nested inside fractions.
  • The golden ratio has the simplest possible infinite continued fraction.
  • Truncating it produces ratios of consecutive Fibonacci numbers.
  • √2 has the repeating pattern [1; 2, 2, 2, …].

For the final lesson, we leave the main thread and explore several other numbers with strange personalities.

MAGICAL NUMBERS COURSE
Keep exploring
← Previous lesson
Back to Magical Numbers
Next lesson →