In this section we use continued fractions ([2]) for expansion of rational numbers. If ,
,
, are integer nunbers with
for every
then
Conversly, we have the theorem
Theorem 1. Let and
be coprime integers with
. Then there are non negative integer
and integers
,
,
,
such that
(1) for every
.
(2) .
Proof. Let us proceed by induction on . The case
is trivial. Now suppose that the assertion is true for all positive integers up to
(
). Because
and
, we have
. Hence by the Division Algorithm ([1]), there are integers
and
such that
By the hypothesis of the induction, there are integers ,
,
,
,
such that
Because , we have
. From (1) and (2) we have
completing the induction step.
The equality in the theorem is called an expansion of into a finite continued fraction. In that expansion we will call
is the
th convergent of the continued fraction, or
th convergent of
.
Example 1. Find an expansion of into a finite continued fraction.
Solution. By the Division Algorithm, we have
and
and
. Therefore
.
The theorem says that for every rational number has an expansion into a finite continued fraction. But this expansion is not unique.
Example 2. .
Theorem 2. Let be an integer number. Then
has exactly two expansions into a finite continued fraction.
Proof. By the theorem 1, we can write
where ,
,
,
are integers such that
for every
. If
then
and
is an expansion of
. If
then
, hence
is an integer, so
. Therefore
is an expansion of
.
Now assume that . We have
is an integer number and , hence
. This claim is false because
and
for every
.
Theorem 3. Let be a rational number but not an integer. Then
has exactly two expansions into a finite continued fraction.
Proof. Assume that , where
and
are coprime integers. We prove by induction on
that
has exactly two expansions into a finite continued fraction
where . If
, because
there is an integer
such that
. By the theorem 1, we can write
where ,
,
,
are integers such that
for every
. We have
and
, hence
. By the theorem 2, we have
has exactly two expansions into a finite continued fraction, those are
and
, therefore
has exactly two expansions
hence the claim is true for
. Now suppose that the claim is true for
,
,
,
(
). By the theorem 1, we can write
where ,
,
,
are integers such that
for every
. We have
and
(integer part of
), hence
By the Division Algorithm, there is an integer
such that
and
, then
If then
and by the theorem 2, we have
has exactly two expansions are
and
. If
then by the hypothesis of the induction (note that
and
are coprime integers),
has exactly two expansions are
where . Therefore
has exactly two expansions, and the claim is true for
.
References
[1] https://nttuan.org/2020/01/14/divisibility/
[2] https://nttuan.org/2008/11/14/continued-fraction-expansion-of-rational-numbers/