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

310 Solutions

71 Solvers

Last Solution submitted on Jul 14, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers71

Suggested Problems

More from this Author80

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!