# Continued Fractions, Euclid's Algorithm

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]?

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$$
$$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}$$