Most introductory books on number theory have at least one section on the theory of continued fractions. I suggest

William Stein.

Elementary number theory: primes, congruences, and secrets. A computational approach.Undergraduate Texts in Mathematics, Springer, New York, 2009. MR2464052 (2009i:11002).

downloadable from his webpage. Chapter 5 is on continued fractions. Of interest to us is the proof that for any integer and any infinite sequence of positive integers the corresponding continued fraction converges to an irrational number. This gives us an explicit bijection between the space of irrationals and *Baire space*, . The bijection is actually a homeomorphism, so the two spaces are equal, as topological spaces. This was first noted by Baire, in

René Baire.

Sur la représentation des fonctions discontinues. Deuxième partie, Acta Math. 32 (1), (1909), 97–176. MR1555048.

For a very nice alternative proof of the homeomorphism that does not involve continued fractions, see Chapter 1 of

Arnold W. Miller.

Descriptive set theory and forcing. How to prove theorems about Borel sets the hard way. Lecture Notes in Logic, 4. Springer-Verlag, Berlin, 1995.MR1439251 (98g:03119).

Arnie’s homeomorphism also has the nice feature of being an explicit order preserving bijection between , ordered lexicographically, and the set of irrationals.

In William’s book, you may also want to look at section 5.4, where a proof is provided of Euler’s theorem from 1737 that the continued fraction of is given by

(No such nice pattern is known for .)

A few nice additional results on continued fractions, with references, are given in this blog entry.

A fascinating open problem, due to Zaremba from 1972, is discussed in

Alex Kontorovich.

From Apollonius to Zaremba: local-global phenomena in thin orbits. Bull. Amer. Math. Soc. (N.S.),50 (2), (2013), 187–228. MR3020826.

To state the problem, fix a positive integer , and consider the set

For example, consists of all numerators appearing in finite continued fractions consisting solely of ones: , that is, , so is the set of positive Fibonacci numbers.

Zaremba’s conjecture is that . In fact, much more is expected to be true. For example, Hensley conjectured in 1996 that contains all positive integers, with finitely many exceptions. The best result to date is that contains *almost all* positive integers, in the sense that

For this, see the announcement,

Jean Bourgain, and Alex Kontorovich.

On Zaremba’s conjecture, C. R. Math. Acad. Sci. Paris,349 (9-10), (2011), 493–495. MR2802911 (2012e:11012),

and the preprint

Jean Bourgain, and Alex Kontorovich.

On Zaremba’s conjecture. ArXiv:1107.3776.

(Of immediate interest to us is the fact described in Kontorovich’s survey that for , the set of infinite continued fractions

where for all is a *Cantor set*.)