Continued fractions for the square root of 13
Yesterday we looked the equation x2-13y2=1 and used the continued fraction of √13 to find solutions. We did not specify how to construct such a representation of √13. For certain numbers you can make them, with a bit of perseverance.
Let us consider √13. The first thing we do is note that 3<√13<4 and work with √13-3 rather than √13. Next we note that (√13-3)(√13+3)=4. We can (re)write this equality as
But then you can replace the √13-3 in the denominator by the whole right-hand side, and again, and again, …, this leads to this continued fraction
That is not yesterday's continued fraction but you can use it too to find approximations of √13. If you add 3 to the convergents of this fraction then you get 11/3, 18/5, 119/33, 393/109, 649/180, …. This is a subsequence of yesterday's approximations. The solutions of x2-13y2=1 and 13y2-x2=1 can also be found in this sequence.
Can we use this to make yesterday's continued fraction? Yes, all you need is pencil and paper and the first fraction, 4/(6+(√13-3)) that is. Divide numerator and denominator by 4; the numerator becomes 1 and the denominator will be 6/4+(√13-3)/4; this you can rewrite to 1+(√13-1)/4. Next: divide the numerator and denominator of (√13-1)/4 by √13-1; we get 1 and 4/(√13-1), respectively. But, as above, we observe that (√13-1)(√13+1)=12 and so 12/(√13-1)=(√13+1), or 4/(√13-1)=(√13+1)/3 which we can turn into 1+(√13-2)/3. The results of these two steps are displayed below:
If you keep doing this you will after two steps more arrive at the fraction on the left below. Now we read our initial equality as (√13-3)/4=1/(6+(√13-3)) and this gives of the fraction below on the right
But now we can replace (√13-3) by that fraction on the right, and again, and again, … and this leads to yesterday's continued fraction.
Exercise Do the same for √2-1 and √3-1 and construct approximations of √2 and √3 in this way, and thus also find solutions to the Pell equations x2-2y2=±1 and x2-3y2=±1.









