Continued fraction expansion of irrational numbers


In this section we use continued fractions for expansion of irrational numbers.

Theorem 1. Let \displaystyle (x_n)_{n\geq 0} be a sequence of intergers with \displaystyle x_i>0 for every \displaystyle i>0. Then the sequence \displaystyle (p_n/q_n)_{n\geq 0} is a convergent sequence, and the its limit is an irrational number. We denote this limit by \displaystyle [x_0;x_1,x_2,\ldots].

Proof. From [1] we have \displaystyle q_1\geq q_0=1>0 and for all \displaystyle n>1, \displaystyle q_n=x_nq_{n-1}+q_{n-2}, hence by induction on \displaystyle n, \displaystyle q_{n+1}>q_n for every \displaystyle n\geq 1. Therefore \displaystyle\lim_{n\to \infty}q_n=\infty.

By the Proposition 4 in [1], for all \displaystyle n\geq 0,

\displaystyle \frac{p_n}{q_n}-\frac{p_{n+1}}{q_{n+1}}=\frac{(-1)^{n-1}}{q_nq_{n+1}},\quad\quad (1)

hence \displaystyle \frac{p_n}{q_n}-\frac{p_{n+2}}{q_{n+2}}=\frac{(-1)^{n-1}(q_{n+2}-q_n)}{q_nq_{n+1}q_{n+2}},\quad \forall n\geq 0. Therefore

\displaystyle \frac{p_1}{q_1}>\frac{p_3}{q_3}>\frac{p_5}{q_5}>\ldots>\frac{p_0}{q_0}

and

\displaystyle \frac{p_0}{q_0}<\frac{p_2}{q_2}<\frac{p_4}{q_4}<\ldots<\frac{p_1}{q_1},

hence \displaystyle (p_{2n}/q_{2n})_{n\geq 0} and \displaystyle (p_{2n+1}/q_{2n+1})_{n\geq 0} are convergent sequences. By (1) and \displaystyle q_n\to\infty we have

\displaystyle\lim_{n\to\infty}\frac{p_{2n}}{q_{2n}}=\lim_{n\to\infty}\frac{p_{2n+1}}{q_{2n+1}}, so \displaystyle (p_n/q_n)_{n\geq 0} is a convergent sequence.

Now we prove \displaystyle \displaystyle \alpha:=\lim_{n\to\infty}\frac{p_n}{q_n} is an irrational number. We have

\displaystyle \frac{p_{2m}}{q_{2m}}<\alpha<\frac{p_{2n+1}}{q_{2n+1}},\quad\forall m,n\geq 0.

Thus, by (1),

\displaystyle\left|\alpha-\frac{p_{2n}}{q_{2n}}\right|\leq \frac{1}{q_{2n}q_{2n+1}}<\frac{1}{q_{2n}^2},\quad\forall n\geq 1.

By the Proposition 2 in [1], \displaystyle p_{2n} and \displaystyle q_{2n} are coprime integers for every \displaystyle n\geq 1, hence there are infinite rational numbers \displaystyle r/s, with \displaystyle s>0 and \displaystyle (r,s)=1, such that

\displaystyle \left|\alpha-\frac{r}{s}\right| <\frac{1}{s^2}.\quad\quad (2)

Assume that \displaystyle \alpha is rational and write \displaystyle \alpha=p/q, where \displaystyle p and \displaystyle q>0 are coprime integers. For all positive integers \displaystyle s, at most two integers \displaystyle r satisfy the equation (2), hence there are coprime integers \displaystyle r_0 and \displaystyle s_0>q such that

\displaystyle\left|\frac{p}{q}-\frac{r_0}{s_0}\right| <\frac{1}{s_0^2}.

From the inequality we have \displaystyle \mid ps_0-qr_0\mid <1, hence \displaystyle ps_0=qr_0, a contradiction. Therefore \displaystyle \alpha is an irrational number. \Box

Theorem 2. Let \displaystyle \alpha be an irrational number. Then there is a unique sequence of integers \displaystyle (a_n)_{n\geq 0} such that

(1) \displaystyle a_i>0 for every \displaystyle i>0.

(2) \displaystyle \alpha =[a_0;a_1,a_2,\ldots].

Proof. In this proof, \displaystyle [x] is the integer part of \displaystyle x. Because \displaystyle \alpha is an irrational number, we have \displaystyle [\alpha]<\alpha<[\alpha]+1, hence there is a real number \displaystyle u_1>1 such that

\displaystyle \alpha=[\alpha]+\frac{1}{u_1}.

Because \displaystyle \alpha is an irrational and \displaystyle [\alpha] is an integer, \displaystyle u_1 is an irrational number. Hence there is an irrational number \displaystyle u_2>1 such that

\displaystyle u_1=[u_1]+\frac{1}{u_2},

and so on. Therefore we have real numbers \displaystyle u_0:=\alpha, u_1>1, \displaystyle u_2>1, \displaystyle \ldots such that \displaystyle u_i is irrationals for every \displaystyle i>0 and

\displaystyle u_k=[u_k]+\frac{1}{u_{k+1}},\quad\forall k\geq 0.

We claim that \displaystyle \alpha=[[u_0];[u_1],[u_2],\ldots]. Fix a \displaystyle k>2. We have

\displaystyle \alpha=[[u_0];[u_1],\ldots, [u_k],u_{k+1}].

Hence, by Proposition 4 in [1],

\displaystyle \left|\alpha-\frac{p_k}{q_k}\right|=\frac{1}{q_k(u_{k+1}q_{k}+q_{k-1})}<\frac{1}{q_k^2},

so \displaystyle \lim_{n\to\infty}\frac{p_n}{q_n}=\alpha. Now assume that

\displaystyle \alpha =[a_0;a_1,a_2,\ldots]=[b_0;b_1,b_2,\ldots],

where \displaystyle (a_n)_{n\geq 0} and \displaystyle (b_n)_{n\geq 0} are two sequences of integers such that \displaystyle a_i>0 and \displaystyle b_i>0 for every \displaystyle i>0.

Because

\displaystyle [a_0;a_1,a_2,\ldots,a_{n}]=a_0+\frac{1}{[a_1;a_2,\ldots,a_n]},\quad\forall n\geq 0,

we have

\displaystyle [a_0;a_1,a_2,\ldots]=a_0+\frac{1}{[a_1;a_2,\ldots]}.

Hence \displaystyle a_0=b_0=[\alpha] and \displaystyle [a_1;a_2,a_3,\ldots] = [b_1;b_2,b_3,\ldots]. Similarly, \displaystyle a_1=b_1 and

\displaystyle [a_2;a_3,a_4,\ldots] = [b_2;b_3,b_4,\ldots],

and so on. Therefore \displaystyle a_i=b_i for every i. \Box

The equality in the theorem is called an expansion of \displaystyle \alpha into a infinite continued fraction. In that expansion we will call \displaystyle [a_0;a_1,a_2,\ldots,a_i] is the \displaystyle i-th convergent of the continued fraction, or \displaystyle i-th convergent of \displaystyle \alpha. The theorem says that for every irrational number has an expansion into a infinite continued fraction, and this expansion is unique.

Example 1. \displaystyle \sqrt{2}=[1;2,2,\ldots].

Example 2. The golden ratio \displaystyle\varphi:=\frac{1+\sqrt{5}}{2}=[1;1,1,\ldots].

Example 3. \displaystyle e=[2;1,2,1,1,4,1,1,6,1,1,8,\ldots].

A sequence \displaystyle (a_n)_{n\geq 0} is called eventually periodic if \displaystyle a_{n+T}=a_n for some positive integer \displaystyle T and sufficiently large \displaystyle n. A real number is called quadratic irrational number, if there is a polynomial \displaystyle P(x) is of degree two with rational coefficients such that \displaystyle P(x) is an irreducible polynomial (see [3]) over the rational numbers and \displaystyle \alpha is a root of \displaystyle P(x).

Theorem 3. Let \displaystyle \alpha be an irrational number and \displaystyle \alpha =[a_0;a_1,a_2,\ldots] is the expansion of \displaystyle\alpha into a infinite continued fraction. Then \displaystyle (a_n)_{n\geq 1} is eventually periodic if and only if \displaystyle \alpha is a quadratic irrational.

References

[1] https://nttuan.org/2008/10/12/continued-fractions-the-basics/

[2] https://nttuan.org/2008/11/14/continued-fraction-expansion-of-rational-numbers/

[3] https://nttuan.org/2009/01/11/poly02/

Leave a comment