Pell Equation Calculator
Find solutions to Pell's equation x² - Dy² = 1 using continued fractions.
Pell Equation Parameters
About Pell Equation
Pell's equation has infinitely many solutions when D is not a perfect square.
x² - Dy² = 1
All solutions can be generated from the fundamental solution (x₁, y₁).
Recurrence Relation
xₙ₊₁ = x₁xₙ + Dy₁yₙ
yₙ₊₁ = x₁yₙ + y₁xₙ
Equation
x² - 2y² = 1
Fundamental Solution
x₁
3
y₁
2
Solutions
n = 1Valid
x = 3
y = 2
n = 2Valid
x = 17
y = 12
n = 3Valid
x = 99
y = 70
n = 4Valid
x = 577
y = 408
n = 5Valid
x = 3363
y = 2378
n = 6Valid
x = 19601
y = 13860
n = 7Valid
x = 114243
y = 80782
n = 8Valid
x = 665857
y = 470832
n = 9Valid
x = 3880899
y = 2744210
n = 10Valid
x = 22619537
y = 15994428