Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 1215. Diophantine Equations (Inspired by Project Euler, problem 66)

Created by James

Consider the quadratic Diophantine equation of the form:

x^2 – Dy^2 = 1

When D=13, the minimal solution in x is 6492 – 13×1802 = 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.

Problem Group

Solution Statistics

9 correct solutions 10 incorrect solutions
Last solution submitted on May 21, 2015

Solution Comments