Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

The main goal of this chapter is to lay out basic concepts needed in our study in Diophantine Analysis. The first section contains fundamental results pertaining to continued fractions, some without proofs. The Theory of Continued Fractions is not new but it plays a growing role in contemporary mathematics.

Continued fractions have fascinated mankind for centuries if not millennia. The timeless construction of a rectangle obeying the “divine proportion” (the term is in fact from the Renaissance) and the “self-similarity” properties that go along with it are nothing but geometric counterparts of the continued fraction expansion of the golden ratio,

$$\displaystyle{\phi \equiv \frac{1 + \sqrt{5}} {2} = \frac{1} {1 + \frac{1} {1 + \frac{1} {1+\ldots }}}.}$$

Geometry was developed in India from the rules for the construction of altars. The Sulva Sutra (a part of the Kalpa Sutra hypothesized to have been written around 800 bc) provides a rule for doubling an area that corresponds to the near-equality:

$$\displaystyle{\sqrt{2} = 1 + \frac{1} {3} + \frac{1} {3 \times 4} - \frac{1} {3 \times 4 \times 34}\quad (\text{correct to }2 \cdot 10^{-6}).}$$

The third and fourth partial sums namely \(\frac{17} {12}\) and \(\frac{577} {408}\) are respectively the fourth and eight convergents to \(\sqrt{ 2}\).

Accordingly, in the classical Greek world, there is evidence of knowledge of the continued fraction for \(\sqrt{2}\) which appears in the works of Theon of Smyrna (discussed in Fowler’s reconstruction [74] and in [215]) and possibly of Plato in Theatetus, see [49]. As every student knows, Euclid’s algorithm is a continued fraction expansion algorithm in disguise, and Archimedes’ Cattle Problem (circa 250 BC) most probably presupposes on the part of its author some amount of understanding of quadratic irrationals, Pell’s equation, and continued fractions; see [215] for a discussion.

The continued fraction convergent \(\pi \approx \frac{355} {113}\) was known to Twu Ch’ung Chi, born in Fan-yang, China in 430 ad. More recently, the Swiss mathematician Lambert proved the 2,000 year conjecture (it already appears in Aristotle) that π is irrational, this thanks to the continued fraction expansion of the tangent function,

$$\displaystyle{\tan z = \frac{z} {1 - \frac{z^{2}} {3 - \frac{z^{2}} {5-\ldots }}},}$$

and Apéry in 1979 gave in “a proof that Euler missed” [176] nonstandard expansions like

$$\displaystyle{\zeta (3) =\sum _{ n=1}^{\infty } \frac{1} {n^{3}} = 1 + \frac{1} {2 \cdot 2 + \frac{1^{3}} {1 + \frac{1^{3}} {2 \cdot 6 + \frac{2^{3}} {1 + \frac{2^{3}} {2 \cdot 10 + \frac{3^{3}} {1+\ldots }}}}}}}$$

from which the irrationality of ζ(3) eventually derives.

The standard method to prove the irrationality of e x for nonzero rational x is by obtaining a rational approximation using the differential and integral properties of e x and the differential properties of \(x^{n}(1 - x)^{n}/n!\), see [88]. Recently, a simple proof by using the theory of continued fractions was given in [154].

The principal references used in this section are [1, 46, 66, 141, 159, 164, 183, 184, 208].

The Section 2.2 presents key results regarding quadratic rings, their units and norms defined in a natural way. Important references for this section are [95, 171, 198].

2.1 Simple Continued Fractions

2.1.1 The Euclidean Algorithm

Given any rational fraction u 0u 1, in lowest terms so that \(\gcd (u_{0},u_{1}) = 1\) and u 1 > 0, we apply the Euclidean algorithm (see [21]) to get successively

$$\displaystyle{ \begin{array}{ll} u_{0} = u_{1}a_{0} + u_{2}, &0 <u_{2} <u_{1} \\ u_{1} = u_{2}a_{1} + u_{3}, &0 <u_{3} <u_{2} \\ u_{2} = u_{3}a_{2} + u_{4}, &0 <u_{4} <u_{3}\\ \ldots & \\ u_{j-1} = u_{j}a_{j-1} + u_{j+1},&0 <u_{j+1} <u_{j} \\ u_{j} = u_{j+1}a_{j}. \end{array} }$$
(2.1.1)

If we write ξ i in place of \(u_{i}/u_{i+1}\) for all values of i with 0 ≤ i ≤ j, then equations (2.1.1) become

$$\displaystyle{ \xi _{i} = a_{i} + \frac{1} {\xi _{i+1}},\quad 0 \leq i \leq j - 1;\quad \xi _{j} = a_{j}. }$$
(2.1.2)

If we take the first two of these equations, those for which i = 0 and i = 1, and eliminate ξ 1, we get

$$\displaystyle{\xi _{0} = a_{0} + \frac{1} {a_{1} + \frac{1} {\xi _{2}} }.}$$

In this result we replace ξ 2 by its value from (2.1.2), and then we continue with replacement of \(\xi _{3},\xi _{4},\ldots\), to get

$$\displaystyle{ \begin{array}{lll} \frac{u_{0}} {u_{1}} =\xi _{0} = a_{0}+& \frac{1} {a_{1}+}\\ &\ddots \\ & & + \frac{1} {a_{j-1} + \frac{1} {a_{j}}}. \end{array} }$$
(2.1.3)

This is a continued fraction expansion of ξ 0, or of u 0u 1. The integers a i are called the partial quotients since they are the quotients in the repeated application of the division algorithm in equations (2.1.1). We presumed that the rational fraction u 0u 1 had positive denominator u 1, but we cannot make a similar assumption about u 0. Hence a 0 may be positive, negative, or zero. However, since 0 < u 2 < u 1, we note that the quotient a 1 is positive, and similarly the subsequent quotients \(a_{2},a_{3},\ldots,a_{j}\) are positive integers. In case j ≥ 1, that is if the set (2.1.1) contains more than one equation, then \(a_{j} = u_{j}/u_{j+1}\) and 0 < u j+1 < u j imply that a j  > 1.

We will use the notation \(\langle a_{0},a_{1},\ldots,a_{j}\rangle\) to designate the continued fraction in (2.1.3). In general, if \(x_{0},x_{1},\ldots,x_{j}\) are any real numbers, all positive except perhaps x 0, then we will write

$$\displaystyle{\begin{array}{lll} \langle x_{0},x_{1},\ldots,x_{j}\rangle = x_{0}\ +& \frac{1} {x_{1}+}\\ &\ddots \\ & & + \frac{1} {x_{j-1} + \frac{1} {x_{j}}}. \end{array} }$$

Such a finite continued fraction is said to be simple if all the x i are integers. The following notations are often used to simplify the writing:

$$\displaystyle\begin{array}{rcl} \langle x_{0},x_{1},\ldots,x_{j}\rangle & =& x_{0} + \frac{1} {\langle x_{1},\ldots,x_{j}\rangle } {}\\ & =& \left \langle x_{0},x_{1},\ldots,x_{j-2},x_{j-1} + \frac{1} {x_{j}}\right \rangle. {}\\ \end{array}$$

The symbol \([x_{0},x_{1},\ldots,x_{j}]\) is sometimes used to represent a continued fraction. We use the notation \(\langle x_{0},x_{1},\ldots,x_{j}\rangle\) to avoid confusion with the least common multiple and the greatest integer.

2.1.2 Uniqueness

In the last section we saw that such a fraction as 51∕22 can be expanded into a simple continued fraction, \(51/22 =\langle 2,3,7\rangle\). It can be verified that 51∕22 can also be expressed as \(\langle 2,3,6,1\rangle\), but it turns out that these are the only two representations of 51∕22. In general, we note that the simple continued fraction expansion (2.1.3) has an alternate form,

$$\displaystyle{ \frac{u_{0}} {u_{1}} =\langle a_{0},a_{1},\ldots,a_{j-1},a_{j}\rangle =\langle a_{0},a_{1},\ldots,a_{j-2},a_{j-1},a_{j} - 1,1\rangle. }$$
(2.1.4)

The following result [159] establishes that these are the only two simple continued fraction expansions of a fixed rational number.

Theorem 2.1.1.

If \(\langle a_{0},a_{1},\ldots,a_{j}\rangle =\langle b_{0},b_{1},\ldots,b_{n}\rangle\) , where these finite continued fractions are simple, and if a j > 1 and b n > 1, then j = n and a i = b i for \(i = 0,1,\ldots,n\) .

Proof.

We write y i for the continued fraction \(\langle b_{i},b_{i+1},\ldots,b_{n}\rangle\) and observe that

$$\displaystyle{ y_{i} =\langle b_{i},b_{i+1},\ldots,b_{n}\rangle = b_{i} + \frac{1} {\langle b_{i+1},b_{i+2},\ldots,b_{n}\rangle } = b_{i} + \frac{1} {y_{i+1}}. }$$
(2.1.5)

Thus we have y i  > b i and y i  > 1 for \(i = 1,2,\ldots,n - 1\), and y n  = b n  > 1. Consequently, b i  = [y i ] for all values of i in the range 0 ≤ i ≤ n. The hypothesis that the continued fractions are equal can be written in the form y 0 = ξ 0, where we are using the notation of equation (2.1.3). Now the definition of ξ i as \(u_{i}/u_{i+1}\) implies that ξ i+1 > 1 for all values of i ≥ 0, and so a i  = [ξ i ] for 0 ≤ i ≤ j by equation (2.1.2). It follows from y 0 = ξ 0 that, taking integral parts, \(b_{0} = [y_{0}] = [\xi _{0}] = a_{0}\). By equations (2.1.2) and (2.1.5) we get

$$\displaystyle{\frac{1} {\xi _{1}} =\xi _{0} - a_{0} = y_{0} - b_{0} = \frac{1} {y_{1}},\quad \xi _{1} = y_{1},\quad a_{1} = [\xi _{1}] = [y_{1}] = b_{1}.}$$

This gives us the start of a proof by induction. We now establish that ξ i  = y i and a i  = b i imply that \(\xi _{i+1} = y_{i+1}\) and \(a_{i+1} = b_{i+1}\). To see this, we again use equations (2.1.2) and (2.1.5) to write

$$\displaystyle\begin{array}{rcl} & \frac{1} {\xi _{i+1}} =\xi _{i} - a_{i} = y_{i} - b_{i} = \frac{1} {y_{i+1}}, & {}\\ & \xi _{i+1} = y_{i+1},\quad a_{i+1} = [\xi _{i+1}] = [y_{i+1}] = b_{i+1}.& {}\\ \end{array}$$

It must also follow that the continued fractions have the same length, that is, that j = n. For suppose that, say, j < n. From the preceding argument we have ξ j  = y j , a j  = b j . But ξ j  = a j by (2.1.2) and y j  > b j by (2.1.5), and so we have a contradiction. If we had assumed j > n, a symmetrical contradiction would have arisen, and thus j must equal n, and the theorem is proved. □ 

Theorem 2.1.2.

Any finite simple continued fraction represents a rational number. Conversely, any rational number can be expressed as a finite simple continued fraction, and in exactly two ways.

2.1.3 Infinite Continued Fractions

Let \(a_{0},a_{1},a_{2},\ldots\) be an infinite sequence of integers, all positive except perhaps a 0. We define two sequences of integers {h n } and {k n } inductively as follows:

$$\displaystyle{ \begin{array}{lll} h_{-2} = 0,\ h_{-1} = 1,\ h_{i} = a_{i}h_{i-1} + h_{i-2} & \text{for}&i \geq 0 \\ k_{-2} = 1,\ k_{-1} = 0,\ k_{i} = a_{i}k_{i-1} + k_{i-2} & \text{for}&i \geq 0. \end{array} }$$
(2.1.6)

We note that k 0 = 1, k 1 = a 1 k 0 ≥ k 0, k 2 > k 1, k 3 > k 2, etc., so that \(1 = k_{0} \leq k_{1} <k_{2} <k_{3} <\ldots <k_{n} <\ldots\).

Theorem 2.1.3.

For any positive real number x,

$$\displaystyle{\langle a_{0},a_{1},\ldots,a_{n-1},x\rangle = \frac{xh_{n-1} + h_{n-2}} {xk_{n-1} + k_{n-2}}.}$$

Theorem 2.1.4.

If we define \(r_{n} =\langle a_{0},a_{1},\ldots,a_{n}\rangle\) for all integers n ≥ 0, then \(r_{n} = h_{n}/k_{n}\) .

Theorem 2.1.5.

The equations

$$\displaystyle{h_{i}k_{i-1} - h_{i-1}k_{i} = (-1)^{i-1}\quad \text{and}\quad r_{ i} - r_{i-1} = \frac{(-1)^{i-1}} {k_{i}k_{i-1}} }$$

hold for i ≥ 1. The identities

$$\displaystyle{h_{i}k_{i-2} - h_{i-2}k_{i} = (-1)^{i}a_{ i}\quad \text{and}\quad r_{i} - r_{i-2} = \frac{(-1)^{i}a_{i}} {k_{i}k_{i-2}} }$$

hold for i ≥ 1. The fraction h i ∕k i is reduced, that is (h i ,k i ) = 1.

Theorem 2.1.6.

The values r n defined in Theorem 2.1.4 satisfy the infinite chain of inequalities \(r_{0} <r_{2} <r_{4} <r_{6} <\ldots <r_{7} <r_{5} <r_{3} <r_{1}\) . Furthermore, limn→∞ r n exists, and for every j ≥ 0, \(r_{2j} <\lim _{n\rightarrow \infty }r_{n} <r_{2j+1}\) .

Proof.

The identities of Theorem 2.1.5 for \(r_{i} - r_{i-1}\) and \(r_{i} - r_{i-2}\) imply that r 2j  < r 2j+2, \(r_{2j-1}> r_{2j+1}\), and r 2j  < r 2j−1, because the k i are positive for i ≥ 0 and the a i are positive for i ≥ 1. Thus we have \(r_{0} <r_{2} <r_{4} <\ldots\) and \(r_{1}> r_{3}> r_{5}>\ldots\). To prove that r 2n  < r 2j−1, we put the previous results together in the form

$$\displaystyle{r_{2n} <r_{2n+2j} <r_{2n+2j-1} \leq r_{2j-1}.}$$

The sequence \(r_{0},r_{2},r_{4},\ldots\) is monotonically increasing and is bounded above by r 1, and so has a limit. Analogously, the sequence \(r_{1},r_{3},r_{5},\ldots\) is monotonically decreasing and is bounded below by r 0, and so has a limit. These two limits are equal because, by Theorem 2.1.5, the difference \(r_{i} - r_{i-1}\) tends to zero as i tends to infinity, since the integers k i are increasing with i. Another way of looking at this to observe that \((r_{0},r_{1}),\ (r_{2},r_{3}),\ (r_{4},r_{5}),\ldots\) is a chain of nested intervals defining a real number, namely lim n →  r n . □ 

These theorems suggest the following definition.

Definition 2.1.1.

An infinite sequence \(a_{0},a_{1},a_{2},\ldots\) of integers, all positive except perhaps for a 0, determines an infinite simple continued fraction \(\langle a_{0},a_{1},a_{2},\ldots \rangle\). The value of \(\langle a_{0},a_{1},a_{2},\ldots \rangle\) is defined to be \(\lim _{n\rightarrow \infty }\langle a_{0},a_{1},a_{2},\ldots,a_{n}\rangle\).

This limit, being the same as lim n →  r n , exists by Theorem 2.1.6. Another way of writing this limit is \(\lim _{n\rightarrow \infty }h_{n}/k_{n}\). The rational number \(\langle a_{0},a_{1},\ldots,a_{n}\rangle = h_{n}/k_{n} = r_{n}\) is called the nth convergent to the infinite continued fraction. We say that the infinite continued fraction converges to the value \(\lim _{n\rightarrow \infty }r_{n}\). In the case of a finite simple continued fraction \(\langle a_{0},a_{1},\ldots,a_{n}\rangle\) we similarly call the number \(\langle a_{0},a_{1},\ldots,a_{m}\rangle\) the mth convergent to \(\langle a_{0},a_{1},\ldots,a_{n}\rangle\).

Theorem 2.1.7.

The value of any infinite simple continued fraction \(\langle a_{0},a_{1},a_{2},\ldots \rangle\) is irrational.

Proof.

Writing θ for \(\langle a_{0},a_{1},a_{2},\ldots \rangle\), we observe by Theorem 2.1.6 that θ lies between r n and r n+1, so that \(0 <\vert \theta - r_{n}\vert <\vert r_{n+1} - r_{n}\vert\). Multiplying by k n , and making use of the result from Theorem 2.1.5 that \(\vert r_{n+1} - r_{n}\vert = (k_{n}k_{n+1})^{-1}\), we have

$$\displaystyle{0 <\vert k_{n}\theta - h_{n}\vert <\frac{1} {k_{n+1}}.}$$

Now suppose that θ were rational, say \(\theta = a/b\) with integers a and b, b > 0. Then the above inequality would become, upon multiplication by b,

$$\displaystyle{0 <\vert k_{n}a - h_{n}b\vert <\frac{b} {k_{n+1}}.}$$

The integers k n increase with n, so we could choose n sufficiently large so that b < k n+1. Then the integer | k n ah n b | would lie between 0 and 1, which is impossible. □ 

Lemma 2.1.8.

Let \(\theta =\langle a_{0},a_{1},a_{2},\ldots \rangle\) be a simple continued fraction. Then a 0 = [θ]. Furthermore, if θ 1 denotes \(\langle a_{1},a_{2},a_{3},\ldots \rangle\) , then \(\theta = a_{0} + 1/\theta _{1}\) .

Proof.

By Theorem 2.1.6 we see that r 0 < θ < r 1, that is \(a_{0} <\theta <a_{0} + 1/a_{1}\). Now a 1 ≥ 1, so we have a 0 < θ < a 0 + 1, and hence a 0 = [θ]. Also

$$\displaystyle\begin{array}{rcl} & \theta =\lim _{n\rightarrow \infty }\langle a_{0},a_{1},\ldots,a_{n}\rangle =\lim _{n\rightarrow \infty }\left (a_{0} + \frac{1} {\langle a_{1},\ldots,a_{n}\rangle }\right )& {}\\ & = a_{0} + \frac{1} {\lim \limits _{n\rightarrow \infty }\langle a_{1},\ldots,a_{n}\rangle } = a_{0} + \frac{1} {\theta _{1}}. & {}\\ \end{array}$$

 □ 

Theorem 2.1.9.

Two distinct infinite simple continued fractions converge to different values.

Proof.

Let us suppose that \(\langle a_{0},a_{1},a_{2},\ldots \rangle =\langle b_{0},b_{1},b_{2},\ldots \rangle =\theta\). Then by Lemma 2.1.8, \([\theta ] = a_{0} = b_{0}\) and

$$\displaystyle{\theta = a_{0} + \frac{1} {\langle a_{1},a_{2},\ldots \rangle } = b_{0} + \frac{1} {\langle b_{1},b_{2},\ldots \rangle }.}$$

Hence \(\langle a_{1},a_{2},\ldots \rangle =\langle b_{1},b_{2},\ldots \rangle\). Repetition of the argument gives a 1 = b 1, and so by induction a n  = b n for all n. □ 

2.1.4 Irrational Numbers

We have shown that any infinite simple continued fraction represents an irrational number. Conversely, if we begin with an irrational number ξ, or ξ 0, we can expand it into an infinite simple continued fraction. To do this we define a 0 = [ξ 0], \(\xi _{1} = 1/(\xi _{0} - a_{0})\), and next a 1 = [ξ 1], \(\xi _{2} = 1/(\xi _{1} - a_{1})\), and so by an inductive definition

$$\displaystyle{ a_{i} = [\xi _{i}],\quad \xi _{i+1} = \frac{1} {\xi _{i} - a_{i}}. }$$
(2.1.7)

The a i are integers by definition, and the ξ i are all irrational, since the irrationality of ξ 1 is implied by that of ξ 0, that of ξ 2 by that of ξ 1, and so on. Furthermore, a i  ≥ 1 for i ≥ 1 because \(a_{i-1} = [\xi _{i-1}]\) and the fact that ξ i−1 is irrational implies that

$$\displaystyle\begin{array}{rcl} & a_{i-1} <\xi _{i-1} <1 + a_{i-1},\quad 0 <\xi _{i-1} - a_{i-1} <1,& {}\\ & \xi _{i} = \frac{1} {\xi _{i-1}-a_{i-1}}> 1,\quad a_{i} = [\xi _{i}] \geq 1. & {}\\ \end{array}$$

Next we use repeated application of (2.1.7) in the form \(\xi _{i} = a_{i} + 1/\xi _{i+1}\) to get the chain

$$\displaystyle\begin{array}{rcl} \xi & =& \xi _{0} = a_{0} + \frac{1} {\xi _{1}} =\langle a_{0},\xi _{1}\rangle {}\\ & =& \left \langle a_{0},a_{1} + \frac{1} {\xi _{2}} \right \rangle =\langle a_{0},a_{2},\xi _{2}\rangle {}\\ & =& \left \langle a_{0},a_{1},\ldots,a_{m-2},a_{m-1} + \frac{1} {\xi _{m}}\right \rangle {}\\ & =& \langle a_{0},a_{1},\ldots,a_{m-1},\xi _{m}\rangle. {}\\ \end{array}$$

This suggests, but does not establish, that ξ is the value of the infinite continued fraction \(\langle a_{0},a_{1},a_{2},\ldots \rangle\) determined by the integers a i .

To prove this we use Theorem 2.1.3 to write

$$\displaystyle{ \xi =\langle a_{0},a_{1},\ldots,a_{n-1},\xi _{n}\rangle = \frac{\xi _{n}h_{n-1} + h_{n-2}} {\xi _{n}k_{n-1} + k_{n-2}} }$$
(2.1.8)

with the h i and k i defined as in (2.1.6). By Theorem 2.1.5 we get

$$\displaystyle\begin{array}{rcl} \xi - r_{n-1}& =& \xi -\frac{h_{n-1}} {k_{n-1}} = \frac{\xi _{n}h_{n-1} + h_{n-2}} {\xi _{n}k_{n-1} + k_{n-2}} -\frac{h_{n-1}} {k_{n-1}} \\ & =& \frac{-(h_{n-1}k_{n-2} - h_{n-2}k_{n-1})} {k_{n-1}(\xi _{n}k_{n-1} + k_{n-2})} = \frac{(-1)^{n-1}} {k_{n-1}(\xi _{n}k_{n-1} + k_{n-2})}.{}\end{array}$$
(2.1.9)

This fraction tends to zero as n tends to infinity because the integers k n are increasing with n, and ξ n is positive. Hence \(\xi -r_{n-1}\) tends to zero as n tends to infinity and then, by Definition 2.1.1,

$$\displaystyle{\xi =\lim _{n\rightarrow \infty }r_{n} =\lim _{n\rightarrow \infty }\langle a_{0},a_{1},\ldots,a_{n}\rangle =\langle a_{0},a_{1},a_{2},\ldots \rangle.}$$

We summarize the results of the last two sections in the following theorem.

Theorem 2.1.10.

Any irrational number ξ is uniquely expressible, by the procedure that gave equations (2.1.7) , as an infinite simple continued fraction \(\langle a_{0},a_{1},a_{2},\ldots \rangle\) . Conversely, any such continued fraction determined by integers a i that are positive for all i > 0 represents an irrational number, ξ. The finite simple continued fraction \(\langle a_{0},a_{1},\ldots,a_{n}\rangle\) has the rational value \(h_{n}/k_{n} = r_{n}\) , and is called the nth convergent to ξ. Equations (2.1.6) relate the h i and k i to the a i . For \(n = 0,2,4,\ldots\) these convergents form a monotonically sequence with ξ as a limit. Similarly, for \(n = 1,3,5,\ldots\) the convergents form a monotonically decreasing sequence tending to ξ. The denominators k n of the convergents are an increasing sequence of positive integers for n > 0. Finally, with ξ i defined by (2.1.7) , we have \(\langle a_{0},a_{1},\ldots \rangle =\langle a_{0},a_{1},\ldots,a_{n-1},\xi _{n}\rangle\) and \(\xi _{n} =\langle a_{n},a_{n+1},a_{n+2},\ldots \rangle\) .

Proof.

Only the last equation is new, and it becomes obvious if we apply to ξ n the process described at the opening of this section. □ 

Example 1.

Let us expand \(\sqrt{ 5}\) as an infinite simple continued fraction.

We see that

$$\displaystyle{\sqrt{5} = 2 + (\sqrt{5} - 2) = 2 + 1/(\sqrt{5} + 2)}$$

and

$$\displaystyle{\sqrt{5} + 2 = 4 + (\sqrt{5} - 2) = 4 + 1/(\sqrt{5} + 2).}$$

In view of the repetition of \(1/(\sqrt{5} + 2)\), we obtain \(\sqrt{5} =\langle 2,4,4,4,\ldots \rangle\).

2.1.5 Approximations to Irrational Numbers

Continuing to use the notation on the preceding sections, we now show that the convergents h n k n form a sequence of “best” rational approximations to the irrational number ξ.

Theorem 2.1.11.

We have for any n ≥ 0,

$$\displaystyle{\left \vert \xi -\frac{h_{n}} {k_{n}}\right \vert <\frac{1} {k_{n}k_{n+1}}\quad \text{and}\quad \vert \xi k_{n} - h_{n}\vert <\frac{1} {k_{n+1}}.}$$

Proof.

The second inequality follows from the first by multiplication by k n . By (2.1.9) and (2.1.7) we have

$$\displaystyle{\left \vert \xi -\frac{h_{n}} {k_{n}}\right \vert = \frac{1} {k_{n}(\xi _{n+1}k_{n} + k_{n-1})} <\frac{1} {k_{n}(a_{n+1}k_{n} + k_{n-1})}.}$$

Using (2.1.6), we replace \(a_{n+1}k_{n} + k_{n-1}\) by k n+1 to obtain the first inequality. □ 

Theorem 2.1.12.

The convergents h n ∕k n are successively closer to ξ, that is

$$\displaystyle{\left \vert \xi -\frac{h_{n}} {k_{n}}\right \vert <\left \vert \xi -\frac{h_{n-1}} {k_{n-1}}\right \vert.}$$

In fact the stronger inequality \(\vert \xi k_{n} - h_{n}\vert <\vert \xi k_{n-1} - h_{n-1}\vert\) holds.

Proof.

We use k n−1 ≤ k n to write

$$\displaystyle\begin{array}{rcl} \left \vert \xi -\frac{h_{n}} {k_{n}}\right \vert & =& \frac{1} {k_{n}}\vert \xi k_{n} - h_{n}\vert <\frac{1} {k_{n}}\vert \xi k_{n-1} - h_{n-1}\vert {}\\ &\leq & \frac{1} {k_{n-1}}\vert \xi k_{n-1} - h_{n-1}\vert = \left \vert \xi -\frac{h_{n-1}} {k_{n-1}}\right \vert. {}\\ \end{array}$$

Now to prove the stronger inequality we observe that a n + 1 > ξ n by (2.1.7), and so by (2.1.6), we have

$$\displaystyle\begin{array}{rcl} \xi _{n}k_{n-1} + k_{n-2}& <& (a_{n} + 1)k_{n-1} + k_{n-2} {}\\ & =& k_{n} + k_{n-1} \leq a_{n+1}k_{n} + k_{n-1} = k_{n+1}. {}\\ \end{array}$$

This inequality and (2.1.9) imply that

$$\displaystyle{\left \vert \xi -\frac{h_{n-1}} {k_{n-1}}\right \vert = \frac{1} {k_{n-1}(\xi _{n}k_{n-1} + k_{n-2})}> \frac{1} {k_{n-1}k_{n+1}}.}$$

We multiply by k n−1 and use Theorem 2.1.11 to get

$$\displaystyle{\vert \xi k_{n-1} - h_{n-1}\vert> \frac{1} {k_{n+1}}> \vert \xi k_{n} - h_{n}\vert.}$$

 □ 

The convergent h n k n is the best approximation to ξ of all the rational fractions with denominator k n or less. The following theorem states this in a different way. For the proof we refer to [159].

Theorem 2.1.13.

If a∕b is a rational number with positive denominator such that \(\vert \xi - a/b\vert <\vert \xi - h_{n}/k_{n}\vert\) for some n ≥ 1, then b > k n . In fact if \(\vert \xi b - a\vert <\vert \xi k_{n} - h_{n}\vert\) for some n ≥ 0, then b ≥ k n+1 .

Theorem 2.1.14.

Let ξ denote any irrational number. If there is a rational number a∕b with b ≥ 1 such that

$$\displaystyle{\left \vert \xi -\frac{a} {b}\right \vert <\frac{1} {2b^{2}},}$$

then a∕b equals one of the convergents of the simple continued fraction expansion of ξ.

Theorem 2.1.15.

The nth convergent of 1∕x is the reciprocal of the (n − 1)st convergent of x if x is any real number greater than 1.

2.1.6 Best Possible Approximations

Theorem 2.1.11 provides another method of proving the following well-known result (see [159, p. 302]). If ξ is real and irrational, there are infinitely many distinct rational numbers ab such that

$$\displaystyle{\left \vert \xi -\frac{a} {b}\right \vert <\frac{1} {b^{2}}.}$$

Indeed, from Theorem 2.1.11 we can replace k n+1 by the smaller integer k n to get the weaker, but still correct, inequality

$$\displaystyle{\left \vert \xi -\frac{h_{n}} {k_{n}}\right \vert <\frac{1} {k_{n}^{2}}.}$$

We can also use continued fractions to get different proofs of the following result of Hurwitz [159, pp. 304–305]:

Given an irrational number ξ, there exist infinitely many different rational numbers hk such that

$$\displaystyle{\left \vert \xi -\frac{h} {k}\right \vert <\frac{1} {\sqrt{5}k^{2}}}$$

and the constant \(\sqrt{5}\) is the best possible. The following auxiliary result is a simple consequence of the sign of the quadratic function.

Lemma 2.1.16.

If x is real, x > 1, and \(x + x^{-1} <\sqrt{5}\) , then \(x <\frac{1} {2}(\sqrt{5} + 1)\) and \(x^{-1}> \frac{1} {2}(\sqrt{5} - 1)\) .

Theorem 2.1.17 (Hurwitz).

Given any irrational number ξ, there exist infinitely many rational numbers h∕k such that

$$\displaystyle{ \left \vert \xi -\frac{h} {k}\right \vert <\frac{1} {\sqrt{5}k^{2}}. }$$
(2.1.10)

Proof.

The idea is to establish that, of every three consecutive convergents of the simple continued fraction expansion of ξ, at least one satisfies the inequality (2.1.10).

Let q n denote \(k_{n}/k_{n-1}\). We first prove that

$$\displaystyle{ q_{j} + q_{j}^{-1} <\sqrt{5} }$$
(2.1.11)

if (2.1.10) is false for both \(h/k = h_{j-1}/k_{j-1}\) and \(h/k = h_{j}/k_{j}\). Suppose (2.1.10) is false for these two values of hk. We have

$$\displaystyle{\left \vert \xi -\frac{h_{j-1}} {k_{j-1}}\right \vert + \left \vert \xi -\frac{h_{j}} {k_{j}}\right \vert \geq \frac{1} {\sqrt{5}k_{j-1}^{2}} + \frac{1} {\sqrt{5}k_{j}^{2}}.}$$

But ξ lies between \(h_{j-1}/k_{j-1}\) and h j k j and hence we find, using Theorem 2.1.5, that

$$\displaystyle{\left \vert \xi -\frac{h_{j-1}} {k_{j-1}}\right \vert + \left \vert \xi -\frac{h_{j}} {k_{j}}\right \vert = \left \vert \frac{h_{j-1}} {k_{j-1}} -\frac{h_{j}} {k_{j}}\right \vert = \frac{1} {k_{j-1}k_{j}}.}$$

Combining these results we get

$$\displaystyle{ \frac{k_{j}} {k_{j-1}} + \frac{k_{j-1}} {k_{j}} \leq \sqrt{5}.}$$

Since the left side is rational we actually have a strict inequality, and (2.1.11) follows.

Now suppose (2.1.10) is false for \(h/k = h_{i}/k_{i}\), \(i = n - 1,n,n + 1\). We then have (2.1.11) for both j = n and \(j = n + 1\). By Lemma 2.1.16 we see that \(q_{n}^{-1}> \frac{1} {2}(\sqrt{5} - 1)\) and \(q_{n+1} <\frac{1} {2}(\sqrt{5} + 1)\), and, by (2.1.6) we find \(q_{n+1} = a_{n+1} + q_{n}^{-1}\). This gives us

$$\displaystyle\begin{array}{rcl} \frac{1} {2}(\sqrt{5} + 1)&>& q_{n+1} = a_{n+1} + q_{n}^{-1}> a_{ n+1} + \frac{1} {2}(\sqrt{5} - 1) {}\\ & \geq & 1 + \frac{1} {2}(\sqrt{5} - 1) = \frac{1} {2}(\sqrt{5} + 1) {}\\ \end{array}$$

and this is a contradiction. □ 

Theorem 2.1.18.

The constant \(\sqrt{ 5}\) in Theorem 2.1.17 is best possible, i.e., Theorem 2.1.17 does not hold if \(\sqrt{ 5}\) is replaced by any larger value.

Proof.

It suffices to exhibit an irrational number ξ for which \(\sqrt{5}\) is the largest possible constant. Consider the irrational ξ whose continued fraction expansion is \(\langle 1,1,1,\ldots \rangle\). We see that

$$\displaystyle{\xi = 1 + \frac{1} {\langle 1,1,\ldots \rangle } = 1 + \frac{1} {\xi },\quad \xi ^{2} =\xi +1,\quad \xi = \frac{1} {2}(\sqrt{5} + 1).}$$

Using (2.1.7) we can prove by induction that \(\xi _{i} = (\sqrt{5} + 1)/2\) for all i ≥ 0, for if \(\xi _{i} = (\sqrt{5} + 1)/2\) then

$$\displaystyle{\xi _{i+1} = (\xi _{i} - a_{i})^{-1} = \left (\frac{1} {2}(\sqrt{5} + 1) - 1\right )^{-1} = \frac{1} {2}(\sqrt{5} + 1).}$$

A simple calculation yields \(h_{0} = k_{0} = k_{1} = 1\), \(h_{1} = k_{2} = 2\). Equation (2.1.6) becomes \(h_{i} = h_{i-1} + h_{i-2}\), \(k_{i} = k_{i-1} + k_{i-2}\), and so by induction \(k_{n} = h_{n-1}\) for n ≥ 1. Hence we have

$$\displaystyle\begin{array}{rcl} & \lim _{n\rightarrow \infty }\frac{k_{n-1}} {k_{n}} =\lim _{n\rightarrow \infty }\frac{k_{n-1}} {h_{n-1}} = \frac{1} {\xi } = \frac{\sqrt{5}-1} {2} & {}\\ & \lim _{n\rightarrow \infty }\left (\xi _{n+1} + \frac{k_{n-1}} {k_{n}} \right ) = \frac{\sqrt{5}+1} {2} + \frac{\sqrt{5}-1} {2} = \sqrt{5}.& {}\\ \end{array}$$

If c is any constant exceeding \(\sqrt{5}\), then

$$\displaystyle{\xi _{n+1} + \frac{k_{n-1}} {k_{n}}> c}$$

holds for only a finite number of values of n. Thus, by (2.1.9),

$$\displaystyle{\left \vert \xi -\frac{h_{n}} {k_{n}}\right \vert = \frac{1} {k_{n}^{2}(\xi _{n+1} + k_{n-1}/k_{n})} <\frac{1} {ck_{n}^{2}}}$$

holds for only a finite number of values of n. Thus there are only a finite number of rational numbers hk satisfying \(\vert \xi - h/k\vert <1/(ck^{2})\), because any such hk is one of the convergents to ξ by Theorem 2.1.14. □ 

2.1.7 Periodic Continued Fractions

An infinite simple continued fraction \(\langle a_{0},a_{1},a_{2},\ldots \rangle\) is said to be periodic if there is an integer n such that \(a_{r} = a_{n+r}\) for all sufficiently large integers r. Thus a periodic continued fraction can be written in the form

$$\displaystyle\begin{array}{rcl} & \langle b_{0},b_{1},b_{2},\ldots,b_{j},a_{0},a_{1},\ldots,a_{n-1},a_{0},a_{1},\ldots,a_{n-1},\ldots \rangle & \\ & =\langle b_{0},b_{1},b_{2},\ldots,b_{j},\overline{a_{0},a_{1},\ldots,a_{n-1}}\rangle &{}\end{array}$$
(2.1.12)

where the bar over the \(a_{0},a_{1},\ldots,a_{n-1}\) indicates that this block of integers is repeated indefinitely. For example \(\langle \overline{2,3}\rangle\) denotes \(\langle 2,3,2,3,2,3,\ldots \rangle\) and its value is easily computed. Writing θ for \(\langle \overline{2,3}\rangle\) we have

$$\displaystyle{\theta = 2 + \frac{1} {3 + \frac{1} {\theta } }.}$$

This is a quadratic equation in θ, and we discard the negative root to obtain the value \(\theta = (3 + \sqrt{15})/3\). As a second example consider \(\langle 4,1,\overline{2,3}\rangle\). Calling this ξ, we have \(\xi =\langle 4,1,\theta \rangle\), with θ as above, and so

$$\displaystyle{\xi = 4 + (1 +\theta ^{-1})^{-1} = 4 + \frac{\theta } {\theta +1} = \frac{29 + \sqrt{15}} {7}.}$$

These two examples illustrate the following result (see [159]).

Theorem 2.1.19.

Any periodic simple continued fraction is a quadratic irrational number, and conversely.

Proof.

Let us write ξ for the periodic continued fraction of (2.1.12) and θ for its purely periodic part,

$$\displaystyle{\theta =\langle \overline{a_{0},a_{1},\ldots,a_{n-1}}\rangle =\langle a_{0},a_{1},\ldots,a_{n-1},\theta \rangle.}$$

Then equation (2.1.8) gives

$$\displaystyle{\theta = \frac{\theta h_{n-1} + h_{n-2}} {\theta k_{n-1} + k_{n-2}} }$$

and this is a quadratic equation in θ. Hence θ is either a quadratic irrational number or a rational number, but the latter is ruled out by Theorem 2.1.7. Now ξ can be written in terms on θ,

$$\displaystyle{\xi =\langle b_{0},b_{1},\ldots,b_{j},\theta \rangle = \frac{\theta m + m'} {\theta q + q'} }$$

where m′∕q′ and mq are the last two convergents to \(\langle b_{0},b_{1},\ldots,b_{j}\rangle\). But θ is of the form \((a + \sqrt{b})/c\), and hence ξ is of similar form because, as with θ, we can rule out the possibility that ξ is rational.

To prove the converse, let us begin with any quadratic irrational ξ, or ξ 0, of the form \(\xi =\xi _{0} = (a + \sqrt{b})/c\), with integers a, b, c > 0, c ≠ 0. The integer b is not a perfect square since ξ is irrational. We multiply numerator and denominator by | c | to get

$$\displaystyle{\xi _{0} = \frac{ac + \sqrt{bc^{2}}} {c^{2}} \quad \text{or}\quad \xi _{0} = \frac{-ac + \sqrt{bc^{2}}} {-c^{2}} }$$

according as c is positive or negative. Thus we can write ξ in the form

$$\displaystyle{\xi _{0} = \frac{m_{0} + \sqrt{d}} {q_{0}} }$$

where q 0 | (dm 0 2), d, m 0 and q 0 are integers, q 0 ≠ 0, d not a perfect square. By writing ξ 0 in this form we can get a simple formulation of its continued fraction expansion \(\langle a_{0},a_{1},a_{2},\ldots \rangle\). We will prove that the equations

$$\displaystyle\begin{array}{rcl} a_{i} = [\xi _{i}],\quad \xi _{i} = \frac{m_{i} + \sqrt{d}} {q_{i}} & & {}\\ \end{array}$$
$$\displaystyle\begin{array}{rcl} m_{i+1} = a_{i}q_{i} - m_{i},\quad q_{i+1} = \frac{d - m_{i+1}^{2}} {q_{i}} & &{}\end{array}$$
(2.1.13)

define infinite sequences of integers m i , q i , a i , and irrationals ξ i in such a way that equations (2.1.7) hold, and hence we will have the continued fraction expansion of ξ 0.

In the first step, we start with ξ 0, m 0, q 0 as determined above, and we let a 0 = [ξ 0]. If ξ i , m i , q i , a i are known, then we take \(m_{i+1} = a_{i}q_{i} - m_{i}\), \(q_{i+1} = (d - m_{i+1}^{2})/q_{i}\), \(\xi _{i+1} = (m_{i+1} + \sqrt{d})/q_{i+1}\), \(a_{i+1} = [\xi _{i+1}]\). That is, (2.1.13) actually does determine sequences ξ i , m i , q i , a i .

Now we use induction to prove that the m i and q i are integers such that q i ≠ 0 and q i  | (dm i 2).

Next we can verify that

$$\displaystyle\begin{array}{rcl} \xi _{i} - a_{i}& =& \frac{-a_{i}q_{i} + m_{i} + \sqrt{d}} {q_{i}} = \frac{\sqrt{d} - m_{i+1}} {q_{i}} = \frac{d - m_{i+1}^{2}} {q_{i}(\sqrt{d} + m_{i+1})} {}\\ & =& \frac{q_{i+1}} {\sqrt{d} + m_{i+1}} = \frac{1} {\xi _{i+1}} {}\\ \end{array}$$

which verifies (2.1.7) and so we have proved that \(\xi _{0} =\langle a_{0},a_{1},a_{2},\ldots \rangle\), with a i defined by (2.1.13).

Let \(\xi '_{i} = (m_{i} -\sqrt{d})/q_{i}\), the conjugate of ξ i . We get the equation

$$\displaystyle{\xi '_{0} = \frac{\xi '_{n}h_{n-1} + h_{n-2}} {\xi '_{n}k_{n-1} + k_{n-2}} }$$

by taking conjugates in (2.1.8). Solving for ξ n we obtain

$$\displaystyle{\xi '_{n} = -\frac{k_{n-2}} {k_{n-1}}\left (\frac{\xi '_{0} - h_{n-2}/k_{n-2}} {\xi '_{0} - h_{n-1}/k_{n-1}}\right ).}$$

As n tends to infinity, both \(h_{n-1}/k_{n-1}\) and \(h_{n-2}/k_{n-2}\) tend to ξ 0, which is different from ξ0, and hence the fraction in parentheses tends to 1. Thus for sufficiently large n, say n > N where N is fixed, the fraction in parentheses is positive, and ξ n is negative. But ξ n is positive for n ≥ 1 and hence ξ n ξ n  > 0 and n > N. Applying (2.1.13) we see that this gives \(2\sqrt{d}/q_{n}> 0\) and hence q r  > 0 for n > N.

It also follows from (2.1.13) that

$$\displaystyle\begin{array}{rcl} & q_{n}q_{n+1} = d - m_{n+1}^{2} \leq d,\quad q_{n} \leq q_{n}q_{n+1} \leq d & {}\\ & m_{n+1}^{2} <m_{n+1}^{2} + q_{n}q_{n+1} = d,\quad \vert m_{n+1}\vert <\sqrt{d}& {}\\ \end{array}$$

for n > N. Since d is a fixed positive integer we conclude that q n and m n+1 can assume only a fixed number of possible values for n > N. Hence the ordered pairs (m n , q n ) can assume only a fixed number of possible pair values for n > N, and so there are distinct integers j and k such that m j  = m k and q j  = q k . We can suppose we have chosen j and k so that j < k. By (2.1.13) this implies that ξ j  = ξ k and hence that

$$\displaystyle{\xi _{0} =\langle a_{0},a_{1},\ldots,a_{j-1},\overline{a_{j},a_{j+1},\ldots,a_{k-1}}\rangle,}$$

and we are done. □ 

The following result describes the subclass of real quadratic irrationals that have purely periodic continued fraction expansions, that is, expressions of the form \(\langle \overline{a_{0},a_{1},\ldots,a_{n}}\rangle\) (see [159]).

Theorem 2.1.20.

The continued fraction expansion of the real quadratic irrational number ξ is purely periodic if and only if ξ > 1 and − 1 < ξ′ < 0, where ξ′ denotes the conjugate of ξ.

Proof.

First we assume that ξ > 1 and − 1 < ξ′ < 0. As usual, we write ξ 0 for ξ and take conjugates in (2.1.7) to obtain

$$\displaystyle{ \frac{1} {\xi '_{i+1}} =\xi '_{i} - a_{i}. }$$
(2.1.14)

Now a i  ≥ 1 for all i, even for i = 0, since ξ 0 > 1. Hence if ξ i  < 0, then \(1/\xi '_{i+1} <-1\), and we have \(-1 <\xi '_{i+1} <0\). Since − 1 < ξ0 < 0, we see, by mathematical induction, that − 1 < ξ i  < 0 holds for all i ≥ 0. Then, since \(\xi '_{i} = a_{i} + 1/\xi '_{i+1}\) by (2.1.14), we have

$$\displaystyle{0 <- \frac{1} {\xi '_{i+1}} - a_{i} <1,\quad a_{i} = \left [- \frac{1} {\xi '_{i+1}}\right ].}$$

Now ξ is a quadratic irrational, so ξ j  = ξ k for some integers j and k with 0 < j < k. Then we have ξ j  = ξ k and

$$\displaystyle\begin{array}{rcl} & a_{j-1} = \left [-\frac{1} {\xi '_{j}}\right ] = \left [-\frac{1} {\xi '_{k}}\right ] = a_{k-1} & {}\\ & \xi _{j-1} = a_{j-1} + \frac{1} {\xi _{j}} = a_{k-1} + \frac{1} {\xi _{k}} =\xi _{k-1}.& {}\\ \end{array}$$

Thus ξ j  = ξ k implies \(\xi _{j-1} =\xi _{k-1}\). A j-fold iteration of this implication gives us \(\xi _{0} =\xi _{k-j}\), and we have

$$\displaystyle{\xi =\xi _{0} =\langle \overline{a_{0},a_{1},\ldots,a_{k-j-1}}\rangle.}$$

To prove the converse, let us assume that ξ is purely periodic, say \(\xi =\langle \overline{a_{0},a_{1},\ldots,a_{n-1}}\rangle\). where \(a_{0},a_{1},\ldots,a_{n-1}\) are positive integers. Then ξ > a 0 ≥ 1. Also, by (2.1.8) we have

$$\displaystyle{\xi =\langle a_{0},a_{1},\ldots,a_{n-1},\xi \rangle = \frac{\xi h_{n-1} + h_{n-2}} {\xi k_{n-1} + k_{n-2}}.}$$

Thus ξ satisfies the equation

$$\displaystyle{f(x) = x^{2}k_{ n-1} + x(k_{n-2} - h_{n-1}) - h_{n-2} = 0.}$$

This quadratic equation has two roots, ξ and its conjugate ξ′. Since ξ > 1, we need to only prove that f(x) has a root between − 1 and 0 in order to establish that − 1 < ξ′ < 0. We will do this by showing that f(−1) and f(0) have opposite signs. First we observe that \(f(0) = -h_{n-2} <0\) by (2.1.6), since a i  > 0 for i ≥ 0. Next we see that for n ≥ 1

$$\displaystyle\begin{array}{rcl} & f(-1) = k_{n-1} - k_{n-2} + h_{n-1} - h_{n-2} & {}\\ & = (k_{n-2} + h_{n-2})(a_{n-1} - 1) + k_{n-3} + h_{n-3} \geq k_{n-3} + h_{n-3}> 0.& {}\\ \end{array}$$

 □ 

We now turn to the continued fraction expansion of \(\sqrt{ d}\) for a positive integer d not a perfect square. We get at this by considering the closely related irrational number \(\sqrt{ d} + [\sqrt{d}]\). This number satisfies the conditions of Theorem 2.1.20, and so its continued fraction is purely periodic,

$$\displaystyle{ \sqrt{d} + [\sqrt{d}] =\langle \overline{a_{0},a_{1},\ldots,a_{r-1}}\rangle =\langle a_{0},\overline{a_{1},\ldots,a_{r-1},a_{0}}\rangle. }$$
(2.1.15)

We can suppose that we have chosen r to be the smallest integer for which \(\sqrt{d} + [\sqrt{d}]\) has an expansion of the form (2.1.15). Now we note that \(\xi _{i} =\langle a_{i},a_{i+1},\ldots \rangle\) is purely periodic for all values of i, and that \(\xi _{0} =\xi _{r} =\xi _{2r} =\ldots\). Furthermore, \(\xi _{1},\xi _{2},\ldots,\xi _{r-1}\) are all different from ξ 0, since otherwise there would be a shorter period. Thus ξ i  = ξ 0 if and only if i is of the form mr.

Now we can start with \(\xi _{0} = \sqrt{d} + [\sqrt{d}]\), q 0 = 1, \(m_{0} = [\sqrt{d}]\) in (2.1.13) because \(1\vert (d - [\sqrt{d}]^{2})\). Then, for all j ≥ 0, we have

$$\displaystyle\begin{array}{rcl} & \frac{m_{jr}+\sqrt{d}} {q_{jr}} =\xi _{jr} =\xi _{0} = \frac{m_{0}+\sqrt{d}} {q_{0}} = [\sqrt{d}] + \sqrt{d}& \\ & m_{jr} - q_{jr}[\sqrt{d}] = (q_{jr} - 1)\sqrt{d} &{}\end{array}$$
(2.1.16)

and hence q jr  = 1, since the left side is rational and \(\sqrt{d}\) is irrational. Moreover q i  = 1 for no other values of the subscript i. For q i  = 1 implies \(\xi _{i} = m_{i} + \sqrt{d}\), but ξ i has a purely periodic expansion so that, by Theorem 2.1.20 we have \(-1 <m_{i} -\sqrt{d} <0\), \(\sqrt{ d} - 1 <m_{i} <\sqrt{d}\), and hence \(m_{i} = [\sqrt{d}]\). Thus ξ i  = ξ 0 and i is a multiple of r.

We also establish that \(q_{i} = -1\) does not hold for any i. For \(q_{i} = -1\) implies \(\xi _{i} = -m_{i} -\sqrt{d}\) by (2.1.13), and by Theorem 2.1.20 we would have \(-m_{i} -\sqrt{d}> 1\) and \(-1 <-m_{i} + \sqrt{d} <0\). But this implies \(\sqrt{d} <m_{i} <-\sqrt{d} - 1\), which is impossible.

Noting that \(a_{0} = [\sqrt{d} + [\sqrt{d}]] = 2[\sqrt{d}]\), we can now turn to the case \(\xi = \sqrt{d}\). Using (2.1.15) we have

$$\displaystyle\begin{array}{rcl} \sqrt{ d}& =& -[\sqrt{d}] + (\sqrt{d} + [\sqrt{d}]) {}\\ & =& -[\sqrt{d}] +\langle 2[\sqrt{d}],\overline{a_{1},a_{2},\ldots,a_{r-1},a_{0}}\rangle {}\\ & =& \langle [\sqrt{d}],\overline{a_{1},a_{2},\ldots,a_{r-1},a_{0}}\rangle {}\\ \end{array}$$

with \(a_{0} = 2[\sqrt{d}]\).

When we apply (2.1.13) to \(\sqrt{d} + [\sqrt{d}]\), q 0 = 1, \(m_{0} = [\sqrt{d}]\) we have \(a_{0} = 2[\sqrt{d}]\), \(m_{1} = [\sqrt{d}]\), \(q_{1} = d - [\sqrt{d}]^{2}\). But we can also apply (2.1.13) to \(\sqrt{d}\) with q 0 = 1, m 0 = 0, and we find \(a_{0} = [\sqrt{d}]\), \(m_{1} = [\sqrt{d}]\), \(q_{1} = d - [\sqrt{d}]^{2}\). The value of a 0 is different, but the values of m 1, and of q 1, are the same in both cases. Since \(\xi _{i} = (m_{i} + \sqrt{d})/q_{i}\) we see that further application of (2.1.13) yields the same values for the a i , for the m i , and for the q i , in both cases. In other words, the expansions of \(\sqrt{ d} + [\sqrt{d}]\) and \(\sqrt{ d}\) differ only in the values of a 0 and m 0. Stating our results explicitly for the case \(\sqrt{d}\), we have the following theorem.

Theorem 2.1.21.

If the positive integer d is not a perfect square, the simple continued fraction expansion of \(\sqrt{d}\) has the form

$$\displaystyle{\sqrt{d} =\langle a_{0},\overline{a_{1},a_{2},\ldots,a_{r-1},2a_{0}}\rangle }$$

with \(a_{0} = [\sqrt{d}]\) . Furthermore, with \(\xi _{0} = \sqrt{d}\) , q 0 = 1, m 0 = 0, in equations (2.1.13) , we have q i = 1 if and only if r|i, and \(q_{i} = -1\) holds for no subscript i. Here r denotes the length of the shortest period in the expansion of \(\sqrt{d}\) .

2.2 Units and Norms in Quadratic Rings

2.2.1 Quadratic Rings

Let R be the commutative ring (see [42] and [54])

$$\displaystyle{ R =\{ m + n\sqrt{D}:\ m,n \in \mathbb{Z}\} }$$
(2.2.1)

where D is a positive that is not a perfect square, endowed with the standard operations induced from the ring of integers \((\mathbb{Z},+,\cdot )\). An element \(\varepsilon \in R\) is called a unit in R if it is inversable, that is there exists \(\varepsilon _{1} \in R\) such that \(\varepsilon \varepsilon _{1} =\varepsilon _{1}\varepsilon = 1\). Two elements α, β ∈ R are said to be divisibility associated if there exists a unit \(\varepsilon \in R\) such that \(\alpha =\varepsilon \beta\). We will adopt the notation α ∼ β to indicate that α and β have the property above. It is not difficult to see that “ ∼ ” is an equivalence relation.

If μ ∈ R, \(\mu = a + b\sqrt{D}\), we will denote by \(\overline{\mu }\) the element \(\overline{\mu } = a - b\sqrt{D}\) and will call it the conjugate of μ.

2.2.2 Norms in Quadratic Rings

Let us denote by \(N: R \rightarrow \mathbb{Z}\) the following function: if \(\mu = a + b\sqrt{D}\), then

$$\displaystyle{ N(\mu ) = a^{2} - Db^{2} =\mu \cdot \overline{\mu }. }$$
(2.2.2)

Proposition 2.2.1 (N Is Multiplicative).

For all μ 1 2 ∈ R, the following relation holds:

$$\displaystyle{N(\mu _{1}\mu _{2}) = N(\mu _{1})N(\mu _{2}).}$$

Proof.

If \(\mu _{1} = m_{1} + n_{1}\sqrt{D}\) and \(\mu _{2} = m_{2} + n_{2}\sqrt{D}\), then we have

$$\displaystyle{\mu _{1}\mu _{2} = (m_{1}m_{2} + Dn_{1}n_{2}) + (m_{1}n_{2} + m_{2}n_{1})\sqrt{D}}$$

and

$$\displaystyle\begin{array}{rcl} & N(\mu _{1}\mu _{2}) = (m_{1}m_{2} + Dn_{1}n_{2})^{2} - D(m_{1}n_{2} + m_{2}n_{1})^{2} & {}\\ & = m_{1}^{2}m_{2}^{2} + D^{2}n_{1}^{2}n_{2}^{2} - Dm_{1}^{2}n_{2}^{2} - Dm_{2}^{2}n_{1}^{2} = m_{1}^{2}(m_{2}^{2} - Dn_{2}^{2}) - Dn_{1}^{2}(m_{2}^{2} - dn_{2}^{2})& {}\\ & = (m_{1}^{2} - Dn_{1}^{2})(m_{2}^{2} - Dn_{2}^{2}) = N(\mu _{1})N(\mu _{2}). & {}\\ \end{array}$$

 □ 

Proposition 2.2.2.

An element \(\varepsilon \in R\) is an unit in \(R\) if and only if \(N(\varepsilon ) = \pm 1\) .

Proof.

If \(\varepsilon\) is a unit in R, then there exists \(\varepsilon _{1} \in R\) such that \(\varepsilon \varepsilon _{1} = 1\). Then from Proposition 2.2.1, \(N(\varepsilon )N(\varepsilon _{1}) = N(1) = 1^{2} - D0^{2} = 1\). Since \(N(\varepsilon )\) and \(N(\varepsilon _{1})\) are integers, it follows that \(N(\varepsilon ) = \pm 1\). Conversely, if \(N(\varepsilon ) = \pm 1\), then (2.2.2) yields \(\varepsilon \overline{\varepsilon } = \pm 1\). If \(N(\varepsilon ) = 1\), then \(\varepsilon \overline{\varepsilon } = 1\) and if \(N(\varepsilon ) = -1\), then \(\varepsilon (-\overline{\varepsilon }) = 1\). Both cases show that \(\varepsilon\) is a unit in R. □ 

Theorem 2.2.3.

For any integer a, the cardinal number of the set

$$\displaystyle{ S =\{\alpha \in R:\ N(\alpha ) = a\text{ and }\alpha \not\sim \beta \text{ for all }\beta \in R,\ \beta \neq \alpha \} }$$
(2.2.3)

is finite and does not exceed a 2 .

Proof.

If a = 0, then the cardinal number of S is 1. We may assume now that a is nonzero. Let α, β ∈ S such that αβ and \(\alpha \equiv \beta (\mathrm{mod}\ a)\). This means that there exists γ ∈ R such that \(\alpha -\beta = a\gamma\).

From the definition of the set S it follows that \(a = N(\alpha ) = N(\beta )\), hence \(\alpha -\beta = a\gamma = N(\alpha )\gamma = N(\beta )\gamma\).

Now embed the ring R into the field \(\mathbb{Q}(\sqrt{D}) =\{ r + s\sqrt{D}:\ r,s \in \mathbb{Q}\}\). Since \(N(\alpha ) = N(\beta ) = a\neq 0\), we have α, β ≠ 0 and

$$\displaystyle{\frac{\alpha } {\beta } = \frac{\beta +a\gamma } {\beta } = 1 + \frac{N(\beta )\gamma } {\beta } = 1 + \frac{\beta \overline{\beta }\gamma } {\beta } = 1 + \overline{\beta }\gamma }$$

and

$$\displaystyle{\frac{\beta } {\alpha } = \frac{\alpha -a\gamma } {\alpha } = 1 -\frac{N(\alpha )\gamma } {\alpha } = 1 -\frac{\alpha \overline{\alpha }\gamma } {\alpha } = 1 -\overline{\alpha }\gamma.}$$

The computations above show that

$$\displaystyle{\frac{\alpha } {\beta } -\frac{\beta } {\alpha } = (\overline{\beta } -\overline{\alpha })\gamma }$$

hence \(\frac{\alpha } {\beta }, \frac{\beta } {\alpha } \in R\) and α ∼ β, in contradiction with the definition of S. It follows that \(\alpha \equiv \beta (\mathrm{mod}\ a)\), for all α, β ∈ S.

On the other hand, it is not difficult to see that for all b in R there exist positive integers m, n such that 0 ≤ m < | a | , 0 ≤ n < | a | , and \(b \equiv m + n\sqrt{D}(\mathrm{mod}\ a)\).

The considerations above show that the mapping

$$\displaystyle{S \rightarrow \{ 0,1,2,\ldots,\vert a\vert - 1\} \times \{ 0,1,2,\ldots,\vert a\vert - 1\}}$$

given by α → (m, n), where 0 ≤ m, n ≤ | a | − 1, \(\alpha \equiv m + n\sqrt{D}(\mathrm{mod}\ a)\), is one-to-one.

This means that the set S is finite and its cardinal number is less or equal to a 2. □ 

Proposition 2.2.4 (The Conjugate Is Multiplicative).

For all μ 1 2 ∈ R, the following relation holds:

$$\displaystyle{ \overline{\mu _{1}\mu _{2}} = \overline{\mu }_{1}\overline{\mu }_{2}. }$$
(2.2.4)

Proof.

If \(\mu _{1} = m_{1} + n_{1}\sqrt{D}\) and \(\mu _{2} = m_{2} + n_{2}\sqrt{D}\), then

$$\displaystyle{\mu _{1}\mu _{2} = (m_{1}m_{2} + Dn_{1}n_{2}) + (m_{1}n_{2} + m_{2}n_{1})\sqrt{D}}$$

and

$$\displaystyle\begin{array}{rcl} & \overline{\mu _{1}\mu _{2}} = (m_{1}m_{2} + Dn_{1}n_{2}) - (m_{1}n_{2} + m_{2}n_{1})\sqrt{D}& {}\\ & = (m_{1} - n_{1}\sqrt{D})(m_{2} - n_{2}\sqrt{D}) = \overline{\mu }_{1}\overline{\mu }_{2}. & {}\\ \end{array}$$

 □ 

Remark.

Proposition 2.2.4 gives another proof of the fact that N is multiplicative. Indeed, we have

$$\displaystyle{N(\mu _{1}\mu _{2}) = (\mu _{1}\mu _{2})(\overline{\mu _{1}\mu _{2}}) = (\mu _{1}\mu _{2})(\overline{\mu }_{1}\overline{\mu }_{2}) = (\mu _{1}\overline{\mu }_{1})(\mu _{2}\overline{\mu }_{2}) = N(\mu _{1})N(\mu _{2}).}$$