I want to compute the rationals that the continued fractions $[4;2,1,3,1,2,4]$ and $[0;1,2,3,4,3,2,1]$ represent.
Also, I want to find the continued fractions of the rationals $-\frac{19}{51}, \frac{187}{57}, \frac{71}{55}, \frac{118}{303}$.
Do we compute the rational that the continued fraction $[4;2,1,3,1,2,4]$ represent as follows?
$$x=4+\frac{1}{2+\frac{1}{1+\frac{1}{3+\frac{1}{1+\frac{1}{1+\frac{1}{2+\frac{1}{4+\frac{1}{x}}}}}}}}$$
If so, how can we easily simplify in order to find $x$ ?
Also, how can we find the continued fraxtion of some given rational?
here is one of them. Given a fraction, you are just doing the Euclidean algorithm
$$ \frac{ 187 }{ 57 } = 3 + \frac{ 16 }{ 57 } $$ $$ \frac{ 57 }{ 16 } = 3 + \frac{ 9 }{ 16 } $$ $$ \frac{ 16 }{ 9 } = 1 + \frac{ 7 }{ 9 } $$ $$ \frac{ 9 }{ 7 } = 1 + \frac{ 2 }{ 7 } $$ $$ \frac{ 7 }{ 2 } = 3 + \frac{ 1 }{ 2 } $$ $$ \frac{ 2 }{ 1 } = 2 + \frac{ 0 }{ 1 } $$ Simple continued fraction tableau:
$$ \begin{array}{cccccccccccccc} & & 3 & & 3 & & 1 & & 1 & & 3 & & 2 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 3 }{ 1 } & & \frac{ 10 }{ 3 } & & \frac{ 13 }{ 4 } & & \frac{ 23 }{ 7 } & & \frac{ 82 }{ 25 } & & \frac{ 187 }{ 57 } \end{array} $$ $$ $$ Note how it begins with two pretend convergents, $0/1$ and $1/0,$ after which each "digit" of $ 3; 3, 1, 1, 3, 2 $ tells you how to produce the next convergent. As a rule using 2 by 2 matrices, given "digit" $d$ and consecutive convergents $(p/q)$ and $(r/s),$ we get a revised consecutive pair $(r/s)$ then $((p+rd)/(q+sd))$ $$ \left( \begin{array}{rr} p & r \\ q & s \end{array} \right) \left( \begin{array}{rr} 0 & 1 \\ 1 & d \end{array} \right) = \left( \begin{array}{rr} r & p+rd \\ s & q+sd \end{array} \right) $$
An example I made up: $$ \frac{ 81201 }{ 56660 } = 1 + \frac{ 24541 }{ 56660 } $$ $$ \frac{ 56660 }{ 24541 } = 2 + \frac{ 7578 }{ 24541 } $$ $$ \frac{ 24541 }{ 7578 } = 3 + \frac{ 1807 }{ 7578 } $$ $$ \frac{ 7578 }{ 1807 } = 4 + \frac{ 350 }{ 1807 } $$ $$ \frac{ 1807 }{ 350 } = 5 + \frac{ 57 }{ 350 } $$ $$ \frac{ 350 }{ 57 } = 6 + \frac{ 8 }{ 57 } $$ $$ \frac{ 57 }{ 8 } = 7 + \frac{ 1 }{ 8 } $$ $$ \frac{ 8 }{ 1 } = 8 + \frac{ 0 }{ 1 } $$ Simple continued fraction tableau:
$$ \begin{array}{cccccccccccccccccc} & & 1 & & 2 & & 3 & & 4 & & 5 & & 6 & & 7 & & 8 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 1 }{ 1 } & & \frac{ 3 }{ 2 } & & \frac{ 10 }{ 7 } & & \frac{ 43 }{ 30 } & & \frac{ 225 }{ 157 } & & \frac{ 1393 }{ 972 } & & \frac{ 9976 }{ 6961 } & & \frac{ 81201 }{ 56660 } \end{array} $$ $$ $$
WORKSHEET: See if you can fill in the convergents for your $[4;2,1,3,1,2,4]$ question $$ \begin{array}{cccccccccccccccc} & & 4 & & 2 & & 1 & & 3 & & 1 & & 2 & & 4 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 4 }{ 1 } & & \frac{ ? }{ ? } & & \frac{ ? }{ ? } & & \frac{ ? }{ ? } & & \frac{ ? }{ ? } & & \frac{ ? }{ ? } & & \frac{ ? }{ ? } \end{array} $$