Continued Fractions
Math · Intermediate · Lesson 5 of 7

Square Roots & Pell

Patterns that repeat forever

An interactive lesson with 6 steps, about 5 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.

What you’ll learn

  • Square roots have repeating continued fractions, like 2=[1;2,2,2,… ]\sqrt2 = [1; 2, 2, 2, \dots].
  • Lagrange: eventually periodic ⇔ a root of a quadratic with whole-number coefficients.
  • Convergents of √n solve Pell’s equation x² − ny² = ±1.
  • All solutions of x² − ny² = 1 are powers of the smallest one.

Steps

  1. Peeling √2
  2. Periodic patterns
  3. Spot the pattern
  4. Pell’s equation
  5. Hunting for solutions
  6. The next solution