×
Pell Equation
Pell's Equation
For non-square D, x² - Dy² = 1 always has infinite solutions.
The fundamental solution (x, y) generates all others via (x + y√D)ⁿ.
Example: D=2 → 3² − 2×2² = 9 − 8 = 1 ✓
Algorithm
Continued fraction convergents of √D.
Precomputed D ≤ 10,000 + Cattle; others on-the-fly.