We can show that
√13=3+11+11+11+11+16+⋯
Here the number of quotients in the period is odd; the penultimate convergent in the first period is 185; hence x=18, y=5 is a solution of x2−13y2=−1.
The penultimate convergent in the second recurring period is
12(185+518×13), that is, 649180;
Hence x=649, y=180 is a solution of x2−13y2=1.
By forming the successive penultimate convergent of the recurring periods we can obtain any number of solutions of the equations
x2−13y2=−1, and x2−13y2=+1.