data/problems/66.yml
---
:id: 66
:name: Diophantine equation
:url: https://projecteuler.net/problem=66
:content: "Consider quadratic Diophantine equations of the form:\n\n_x_<sup>2</sup>
– D_y_<sup>2</sup> = 1\n\nFor example, when D=13, the minimal solution in _x_ is
649<sup>2</sup> – 13×180<sup>2</sup> = 1.\n\nIt can be assumed that there are no
solutions in positive integers when D is square.\n\nBy finding minimal solutions
in _x_ for D = {2, 3, 5, 6, 7}, we obtain the following:\n\n3<sup>2</sup> – 2×2<sup>2</sup>
= 1 \n2<sup>2</sup> – 3×1<sup>2</sup> = 1 \n9<sup>2</sup> – 5×4<sup>2</sup> =
1 \n5<sup>2</sup> – 6×2<sup>2</sup> = 1 \n8<sup>2</sup> – 7×3<sup>2</sup> = 1\n\nHence,
by considering minimal solutions in _x_ for D ≤ 7, the largest _x_ is obtained when
D=5.\n\nFind the value of D ≤ 1000 in minimal solutions of _x_ for which the largest
value of _x_ is obtained.\n\n"