Find a pair of integers m and n satisfying:

1). $\displaystyle m^2-17n^2=-1$

and another pair of integers satisfying:

2). $\displaystyle m^2-17n^2=1$

__________________________________________________ _____

This is the last part of the question. The first part says:

"Work out the continued fraction expansion for $\displaystyle \sqrt{17}$".

This comes out to be $\displaystyle 4, \overline{8}$.

The mark scheme then uses the first two convergents to solve these equations:

"The first two convergents are $\displaystyle \frac{q_0}{1}, \ \frac{q_0 q_1+1}{q_1}$ with $\displaystyle q_0=4$ and $\displaystyle q_1=8$.

They then use these to solve the equations.

However, how do you know that using this irrational number will solve these equations?

In particular, what have the first two convergents of this number got to do with finding the integers m and n?