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
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 Solvers65
Suggested Problems
-
1966 Solvers
-
First non-zero element in each column
871 Solvers
-
Back to basics 23 - Triangular matrix
1037 Solvers
-
Multiples of a Number in a Given Range
775 Solvers
-
6732 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!