For each integer n⩾−1, define the convergents pn/qn of the continued fraction expansion of θ. Show that for all n⩾0,pnqn−1−pn−1qn=(−1)n−1. Deduce that if q∈N and p∈Z satisfy
∣∣∣∣∣θ−qp∣∣∣∣∣<∣∣∣∣∣θ−qnpn∣∣∣∣∣
then q>qn.
Compute the continued fraction expansion of 12. Hence or otherwise find a solution in positive integers x and y to the equation x2−12y2=1.