Math Circles • Spring 2026
Home
Week 4Saturday • March 14, 2026

\(\pi\)-Day, Continued Fractions, and Best Approximations

Fractions ↔ SB paths ↔ continued fractions
Algorithms for converting between them
Beginning of the continued fraction for \(\pi\)
Header info
Mathematics Department • Xavier University of Louisiana
Math Circles — Spring 2026
Week 4 — Saturday March 14

Typed version (MathJax)

This section follows the Week 4 notes in order. The full original notes appear below.

\(\pi\)-day: three ways to think about a fraction

Week 4 begins by celebrating \(\pi\)-day and reviewing the three equivalent ways to describe a rational number.

  1. A ratio of two whole numbers. Examples in the notes include \(\tfrac{2}{3}\), \(3=\tfrac31\), and \(\tfrac{11}{15}\).
  2. A path on the Stern–Brocot tree. Examples: \(\tfrac23 \leftrightarrow LR\), \(3 \leftrightarrow R^2\), and \(\tfrac{11}{15} \leftrightarrow LR^2LR^2\).
  3. A continued fraction. Examples: \[ \frac23=[0;1,2],\qquad 3=[3],\qquad \frac{11}{15}=[0;1,2,1,3]. \]

From a Stern–Brocot path to a continued fraction

To go from a path on the Stern–Brocot tree to a continued fraction:

Increase the last exponent by \(1\). Start with \(0\) if the first letter is \(L\). Then read the exponents.

So the examples become

\[ LR \to [0;1,2],\qquad R^2 \to [3],\qquad LR^2LR^2 \to [0;1,2,1,3]. \]

From a continued fraction to a Stern–Brocot path

We can describe the inverse process:

  • If the last entry of the continued fraction is \(1\), ignore it and use the remaining entries as exponents.
  • If the last entry is greater than \(1\), decrease it by \(1\), then use the entries as exponents.
  • If the first entry is \(0\), the path starts with \(L\).
Example: \[ [0;1,1,1]\to LR,\qquad [0;1,2]\to LR,\qquad [3]\to R^2. \]

Note that \[ [0;1,2]\quad\text{and}\quad [0;1,1,1] \] represent the same rational number.

From a rational number to a continued fraction

To go from a ratio of whole numbers to a continued fraction, we use the quotient-and-remainder procedure recursively.

A worked example is \[ \frac{11}{15}. \] Step by step, this becomes \[ \frac{11}{15}=[0;1,2,1,3]. \]

From a continued fraction back to a rational number

To reverse the process, start with the last digit and repeatedly add its reciprocal to the previous digit.

For \[ [0;1,2,1,3], \] the notes compute \[ 1+\frac13=\frac43,\qquad 2+\frac34=\frac{11}{4},\qquad 1+\frac4{11}=\frac{15}{11},\qquad 0+\frac{11}{15}=\frac{11}{15}. \]

Moving from fractions to irrational numbers

What changes for irrational numbers? We can still use the Stern–Brocot tree and continued fractions, but now:

  • the Stern–Brocot path is infinite and does not end in \(L^\infty\) or \(R^\infty\),
  • the continued fraction has infinitely many entries.

Because there is no last digit, the previous “continued fraction \(\to\) number” shortcut for finite expansions no longer applies directly. But the “number \(\to\) continued fraction” algorithm still works, replacing quotient-and-remainder by “whole part + decimal part.”

Finding the continued fraction of \(\pi\)

We use \[ \pi = 3 + 0.1415\ldots \] and then repeat the same reciprocal process as before.

  1. Subtract \(3\): \(\pi-3=0.1415\ldots\)
  2. Take the reciprocal: \[ \frac{1}{\pi-3}=7.0625\ldots \] so the next digit is \(7\).
  3. Subtract \(7\), then reciprocate again: \[ \frac{1}{0.0625\ldots}=15.99659\ldots \] so the next digit is \(15\).
  4. Subtract \(15\), then reciprocate: \[ 1.00341\ldots \] so the next digit is \(1\).
  5. Subtract \(1\), then reciprocate: \[ 292.6345\ldots \] so the next digit is \(292\).
So we derive the famous beginning \[ \pi=[3;7,15,1,292,\ldots]. \]

Best rational approximations

Recall that cutting off the tail of an infinite Stern–Brocot path at each turn gives fractions that best approximate the irrational number. From the continued-fraction point of view, this means simply truncating the continued fraction after some entry.

Exercises. Compute the rational numbers corresponding to \[ [3;7],\qquad [3;7,15],\qquad [3;7,15,1],\qquad [3;7,15,1,292]. \] Then do the same for \(e=2.71828\ldots\)

Full notes (all pages)

These are the complete Week 4 notes, included in full at the end.

Week 4 notes, page 1
Notes (Week 4) — page 1
Week 4 notes, page 2
Notes (Week 4) — page 2
Week 4 notes, page 3
Notes (Week 4) — page 3
Week 4 notes, page 4
Notes (Week 4) — page 4
Week 4 notes, page 5
Notes (Week 4) — page 5