Elementary Number Theory
Pell Equation Solver
Find the least positive solution of x² − Dy² = 1 by two independent methods.
Try D
Fundamental positive solution
- x₁
- y₁
L-value and class number formula
Continued fractions
Period parity and convergents
Generate other solutions
All solutions come from ±(x₁ + y₁√D)ⁿ with n an integer.