Properties of Convergents of Continued Fractions

Theorem
Let $$\left[{a_1, a_2, a_3, \ldots}\right]$$ be a simple continued fraction.

Let $$p_1, p_2, p_3, \ldots$$ and $$q_1, q_2, q_3, \ldots$$ be its numerators and denominators.

Then the following results apply:

Difference between Adjacent Convergents
$$p_k q_{k-1} - p_{k-1} q_k = \left({-1}\right)^k$$, that is:
 * $$\frac {p_k} {q_k} - \frac {p_{k-1}} {q_{k-1}} = \frac {\left({-1}\right)^k} {q_k q_{k-1}}$$

for $$k \ge 2$$;

Difference between Adjacent Convergents But One
$$p_k q_{k-2} - p_{k-2} q_k = \left({-1}\right)^{k-1} a_k$$, that is:
 * $$\frac {p_k} {q_k} - \frac {p_{k-2}} {q_{k-2}} = \frac {\left({-1}\right)^{k-1} a_k} {q_k q_{k-2}}$$

for $$k \ge 3$$;

Convergents are Rationals in Canonical Form
$$p_k$$ and $$q_k$$ are coprime for $$k \ge 1$$.

Proof of Difference between Adjacent Convergents
Proof by induction:

For all $$n \in \N^*: n \ge 2$$, let $$P \left({n}\right)$$ be the proposition $$p_n q_{n-1} - p_{n-1} q_n = \left({-1}\right)^n$$.

Basis for the Induction

 * $$P(2)$$ is the case where $$p_1 = a_1, p_2 = a_1 a_2 + 1, q_1 = 1, q_2 = a_2$$.

So $$p_2 q_1 - p_1 q_2 = \left({a_1 a_2 + 1}\right) \times 1 - a_1 a_2 = 1 = \left({-1}\right)^2$$.

So $$P(2)$$ holds. This is our basis for the induction.

Induction Hypothesis

 * Now we need to show that, if $$P \left({k}\right)$$ is true, where $$k \ge 2$$, then it logically follows that $$P \left({k+1}\right)$$ is true.

So this is our induction hypothesis:

$$p_k q_{k-1} - p_{k-1} q_k = \left({-1}\right)^k$$.

Then we need to show:

$$p_{k+1} q_k - p_k q_{k+1} = \left({-1}\right)^{k+1}$$.

Induction Step
This is our induction step:

Consider $$\left[{a_1, a_2, a_3, \ldots, a_k, a_{k+1}}\right]$$.

Its final numerator and denominator are by definition:
 * $$p_{k+1} = a_{k+1} p_k + p_{k-1}, q_{k+1} = a_{k+1} q_k + q_{k-1}$$.

Therefore:

$$ $$ $$ $$ $$

So $$P \left({k}\right) \Longrightarrow P \left({k+1}\right)$$ and the result follows by the Principle of Mathematical Induction.

Therefore $$\forall n \ge 2: p_n q_{n-1} - p_{n-1} q_n = \left({-1}\right)^n$$.

Proof of Difference between Adjacent Convergents But One
This is a simple consequence of Difference between Adjacent Convergents above.

$$ $$ $$

Proof that Convergents are Rationals in Canonical Form
This also follows directly from Difference between Adjacent Convergents above.

Let $$d = \gcd \left\{{p_k, q_k}\right\}$$.

Then $$p_k q_{k-1} - p_{k-1} q_k$$ is a multiple of $$d$$ from Common Divisor Divides Integer Combination.

So $$d \backslash \left({-1}\right)^k$$ and so $$d = 1$$.

Hence the result.