I know how to express $45/17$ as a continued fraction using Euclid's algorithm. But how do i go about expressing $17/45$ as a continued fraction?
I think I worked it out, is it [0,2,1,1,1,5]?
I know how to express $45/17$ as a continued fraction using Euclid's algorithm. But how do i go about expressing $17/45$ as a continued fraction?
I think I worked it out, is it [0,2,1,1,1,5]?
On
There's a trick when taking the inverse of any continued fraction.
If it starts with a zero, the inverse is the same sequence without the zero. If it starts with an integer other than zero, the inverse is zero, followed by the sequence.
$$ x = [a_0; a_1,a_2,...] \begin{cases} { a_0 = 0 => 1/x = [a_1; a_2,...] } \\ { a_0 \neq 0 => 1/x = [0;a_0,a_1,a_2,...] } \end{cases} $$
It's the same procedure: $$ \frac{17}{45}=0+\frac{17}{45}= 0+\cfrac{1}{\cfrac{45}{17}}= 0+\cfrac{1}{2+\cfrac{11}{17}}= 0+\cfrac{1}{2+\cfrac{1}{\cfrac{17}{11}}}= 0+\cfrac{1}{2+\cfrac{1}{1+\cfrac{6}{11}}}=\dots $$