Problem 1215. Diophantine Equations (Inspired by Project Euler, problem 66)
Consider the quadratic Diophantine equation of the form:
x^2 – Dy^2 = 1
When D=13, the minimal solution in x is 649^2 – 13×180^2 = 1. It can be assumed that there are no solutions in positive integers when D is square.
Given a value of D, find the minimum value of X that gives a solution to the equation.
Solution Stats
Problem Comments
-
4 Comments
How exactly does, "6492 – 13×1802 = 1", as given in the example?
The 2s at the end of 649 and 180 used to be superscripts. I'm not quite sure when that changed, but it is fixed now. Thanks for the heads up on that.
No problem. Thanks for the fix!
Some tips. Continued fractions are the main way for finding the fundamental solutions to Pell's equations. And square roots have patterns in continued fractions.
Solution Comments
Show commentsProblem Recent Solvers63
Suggested Problems
-
Project Euler: Problem 1, Multiples of 3 and 5
3169 Solvers
-
Are all the three given point in the same line?
415 Solvers
-
249 Solvers
-
1173 Solvers
-
8799 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!