# Typical Examples Are Atypical

It was once remarked to me that the mathematical object that we commonly see are actually very rare.

For instances, we usually work with functions that are continuous and differentiable, but in fact almost all functions are discontinuous everywhere. If we work with a real number, it is usually computable, and if we work with a subset of the natural numbers it will be definable. But in fact, most real numbers are not computable and most sets of natural numbers are undefinable. (In the sense that there are an uncountable number of them, but only a countable number with this property. All the justifications are obvious if you realise the set of formulae/computer programs are countable.)

However, there is a particular example of this which is very striking. It is to do with continued fractions.

We let $[a_0,a_1,a_2,\dots]$ denote the real number that is the limit of the following infinite continued fraction:

$a_0 + \frac{1}{a_1+\frac{1}{a_2+\frac{1}{\ddots}}}$

So for instance, the continued fraction [1,2,2,2,...] is equal to:

$Q = 1 + \frac{1}{2+\frac{1}{2+\frac{1}{\ldots}}} = 1 + \frac{1}{1+Q}$

and hence $Q = \sqrt{2}$.

Any non-rational real number can be written as an infinite continued fraction, and every rational real number can be written as a finite continued fraction.

The weird thing is: The geometric mean of the continued fractions coefficients tends to the same constant for nearly every number.

$\lim_{N \rightarrow \infty}\left(\prod_{i=0}^{N}a_i \right)^{1/N} = C \approx 2.685\ldots$

Now, the interesting fact requires a bit of Measure Theory to derive. This is indented below so you can easily skip it if you do not know any Measure Theory.

Consider the measure space on the irrational numbers in the unit interval, $S=[0,1]-\mathbb{Q}$, with the usual measurable sets. (The Borel sets.)

Define the ‘Gauss Measure’ as the following integral, where integral is the usual integral using the Lebesgue measure:

$\mu(E) = \frac{1}{\log 2} \int_E \frac{1}{1+x}\:{\rm{d}}x$

So this measure is valid for any of the measurable set in the measure space as the Lebesgue measure is. Also, if the measure of a set with respect to this new measure is zero, it must have measure zero under the Lebesgue measure, and vise-versa. The measure of the whole space is 1, making it a ‘probability space’.

Now consider the following mapping:

$\theta(x) = \frac{1}{x} - \left\lfloor{\frac{1}{x}}\right\rfloor$

Another way of writing this, if you associate each number with its infinite continued fraction, is:

$\theta([a_0,a_1,a_2,\ldots]) = [a_1,a_2,a_3,\ldots]$

Now this function is a shift operator and so has some well known properties. First of all it is measure preserving, and so the pre-image of any sets in the space has the same measure as the set itself.

Second, this function is ergodic – that means that if any set has itself has a preimage then the set is either almost everything or almost nothing. That is,

$\mbox{If } \theta^{-1}(A) = A \mbox{ then } \mu(A) = 0 \mbox{ or } \mu(A) = 1$

This allows us to apply an ergodicity theorem, specifically Birkhoff’s Ergodic Theorem. This states that for a measurable function f in a probability space on X, and a measure preserving ergodic transformation T, we have, for almost all x:

$\lim_{n\rightarrow\infty}\frac{1}{n}\sum_{k=0}^{n-1} f(T^k(x))=\int_X f\:d\mu$

The hypothesises are fulfilled so it just requires choosing a function. Let us choose:

$f( [a_0,a_1,\cdots] ) = \log a_0$

This is clearly a measurable function. Now the right hand side is:

$\int_0^1 \frac{f(x)}{1+x}\:dx$

To show it is finite, it is easiest to split it into chunks:

$\sum_{k=1}^{\infty} \int_{\frac{1}{k+1}}^\frac{1}{k} \frac{\log k}{1+x}\:dx = \sum_{k=1}^{\infty}\log k\left[ \log\left(1+\frac{1}{k}\right)-\log\left(1+\frac{1}{k+1} \right)\right]$

For large k we can use the approximation for log to give:

$\approx \sum_{k=1}^{\infty}\log k\left[ \frac{1}{k}-\frac{1}{k+1}\right] < \sum_{k=1}^{\infty}\frac{1}{k^{3/2}} < \infty$

Hence it converges. Now consider the left hand side of the equation that Birkhoff’s Theorem gave us. It will simply be:

$\lim_{N \rightarrow \infty} \frac{1}{N}\sum_{i=0}^{N}{\log{a_i}}$

Now if the exponential of both sides is applied, we find that the geometric mean of the continued fractions coefficients almost always tend to a constant.

The even weirder thing is that despite nearly every number having this property, no number has ever been shown to have this property. (Except by giving a list of continued fraction coefficients which gives a number with the property, but then there is no way to express these numbers in terms of other usual numbers.)

No rational number has the property – they were left out as they only have finite continued fraction expansions. Root two, whose continued fraction was shown above, has a geometric mean of 2. The natural base of logarithms has a divergent geometric mean.

However, other numbers look like they will. Euler’s Gamma constant, Pi, and C itself all seem to have the property, numerically, but it hasn’t been shown for a single one.