I have this math problem, I have to show a simple continued fraction from equations. Here's the question.
Use these equations: $$397 = 204(1) + 193$$$$204 = 193(1) + 11$$$$193 = 11(17) + 6$$$$11 = 6(1) + 5$$$$6 = 5(1) + 1$$$$5 = 1(5)$$ to show that: $$\frac{397}{204}=1+\frac{1}{1+ \frac{1}{17+\frac{1}{1 + \frac{1}{1+\frac{1}{5}}}}}$$
I'm not completely sure where to start or how to attempt this problem. I see a pattern in the fraction of $5,1,1,17,1,1$. Which are the numbers in the parenthesis backwards... but I'm still stuck. Thanks.
Every (positive) real number has a simple continued fraction expansion, one which terminates if and only if the number is rational. Let's start with how one expands $x \gt 0$ in a simple continued fraction, and then reflect on the special case where $x = a/b$ is rational.
First off, we take the integer part and fractional part of $x$:
$$ x = \lfloor x \rfloor + \{x\} $$
Note that the curly braces here denote the fractional part, $\{x\} = x - \lfloor x \rfloor$, and that for clarity we are dealing only with nonnegative parts.
The simple continued fraction expansion proceeds (unless $\{x\}$ is zero, in which case we stop) by taking the reciprocal of $\{x\}$. Since the nonzero fractional part is strictly between $0$ and $1$, its reciprocal is strictly greater than $1$:
$$ y = \frac{1}{\{x\}} $$
$$ x = \lfloor x \rfloor + \frac{1}{y} $$
As we repeat these two steps, breaking $y$ into integer and fractional parts and reciprocating the fractional part if nonzero, we develop the nested expression that is the simple continued fraction of $x$:
$$ x = \lfloor x \rfloor + \frac{1}{ \lfloor y \rfloor + \frac{1}{\ddots} } $$
It should be evident that the process terminates precisely on rational numbers $x$. [Another interesting fact is that positive roots of integer quadratic equations have simple continued fraction expansions that are eventually periodic/repeating, and conversely. But this is a tangent, to explore another day.]
Moreover one finds that applying the above procedure to rational $x = a/b$ is just like the division and remainder steps of Euclid's algorithm for the GCD of $a$ and $b$. That is, if $a = qb + r$ with $0 \le r \lt b$ in positive integers, then:
$$ \frac{a}{b} = \left\lfloor \frac{a}{b} \right\rfloor + \left\{ \frac{a}{b} \right\} = q + \frac{r}{b} = q + \frac{1}{ (b/r) } $$
Then we proceed as before with $y = b/r$. Since $r \lt b$, it is now rigorous that the process terminates in a finite number of steps (eventually reaching a zero remainder in the division algorithm step).
The Question here shows the work for the process applied to $x = \frac{397}{204}$, with the quotients of the division algorithm steps shown in parentheses.