# Gauss measure and continued fraction

For $$x \in [0,1)$$ then the continued fraction representation of $$x=0 + \cfrac{1}{a_1(x)+\cfrac{1}{a_2(x)+\cfrac{1}{a_3(x)+\cfrac{1}{\dots}}}}$$ can be written as $$[0; a_1(x), a_2(x), a_3(x), \dotsc]$$ where $$a_j(x)$$ is a positive integer.

Define $$F(n_1, n_2, \dots, n_k)$$ to be a set of all $$x \in [0,1)$$ such that $$a_1(x) = n_1, a_2(x) = n_2, \dots, a_k(x) = n_k$$ (first $$k$$ digits in the continued fraction expansion is $$n_1, \dots, n_k$$).

Define $$\mu$$ be the (Gauss) measure, $$\mu(A) = \int_A \frac{1}{\log{2}}\frac{dt}{t+1}.$$

Then $$\mu(F(n_1, n_2, ..., n_k)) = \mu(F(n_k, n_{k-1}, ..., n_1)).$$

I want to verify the result. I study Ergodic Theory of Number using the online material : https://www-fourier.ujf-grenoble.fr/sites/default/files/files/fichiers/lecturenotesdajani2013.pdf

This fact is listed on the page $$38$$ of the pdf file. I check the book that mentioned as reference, but it is one of the exercise without proof.

I try the case when the length is 2: $$\mu(F(m, n)) = \frac{1}{\log(2)}\int_{F(m, n)} \frac{dt}{t+1} = \frac{\log(x+1)}{\log(2)}|_{F(m, n)}.$$

Since $$F(m, n) = \Big[\frac{n}{nm+1}, \frac{n+1}{m(n+1)+1}\Big)$$ and $$F(n, m) = \Big[\frac{m}{nm+1}, \frac{m+1}{n(m+1)+1}\Big),$$ by a simple simplification $$\log(x+1)|_{F(m,n)} = \log\Big(\frac{n + nm+1}{mn+1} \cdot \frac{m(n+1)+1}{n+1+m(n+1)+1}\Big)$$ and $$\log(x+1)|_{F(n, m)} = \log\Big(\frac{m+nm+1}{mn+1} \cdot \frac{n(m+1)+1}{m+1+n(m+1)+1}\Big).$$

So $$\mu(F(m,n)) = \mu(F(n,m)).$$

For general case of length $$k$$, it is quite hard to find the actual form of $$F(n_1, n_2, \dots, n_k)$$ and $$F(n_k, \dots, n_1)$$. So I wonder if there is a more straigth forward way to see why this identity holds.

An elementary argument proving the equality $$\mu(F(n_1, n_2, ..., n_k)) = \mu(F(n_k, n_{k-1}, ..., n_1))$$ for $$k>2$$ can be found in the proof of Lemma 5.4 in https://arxiv.org/abs/1909.03431.

Here is a sketch of the argument. It can be easily verified that,

$$\mu(F(n_1, n_2, ..., n_k))=\log_2 \left( \frac{1+[0;n_1,n_2,\dots n_k]}{1+[0;n_1, n_2, \dots n_k,1]}\right)$$.

Similarly,

$$\mu(F(n_k, n_{k-1}, ..., n_1))=\log_2 \left( \frac{1+[0;n_k,n_{k-1},\dots n_1]}{1+[0;n_k, n_{k-1}, \dots n_1,1]}\right)$$.

Let $$[0;n_1,n_2,\dots n_k]=p_k/q_k$$ and $$[0;n_1,n_2,\dots n_{k-1}]=p_{k-1}/q_{k-1}$$.

Now, using the recurrence relations for continued fractions, the terms appearing inside $$\log_2$$ in the above equations for $$\mu(F(n_1, n_2, ..., n_k))$$ and $$\mu(F(n_k, n_{k-1}, ..., n_1))$$ can be expressed in terms of $$p_k,q_k,p_{k-1}$$ and $$q_{k-1}$$ as follows,

$$[0;n_1, n_2, \dots n_k,1] = \frac{p_k+p_{k-1}}{q_k+q_{k-1}}$$

$$[0;n_k,n_{k-1},\dots n_1] = \frac{q_{k-1}}{q_k}$$

$$[0;n_k,n_{k-1},\dots n_1,1] = \frac{p_{k-1}+q_{k-1}}{p_k+q_k}$$.

The expressions for $$[0;n_k,n_{k-1},\dots n_1]$$ and $$[0;n_k,n_{k-1},\dots n_1,1]$$ follows from Theorem 6 in Continued Fractions by Khinchin. Substituting these expressions involving $$p_k,q_k,p_{k-1}$$ and $$q_{k-1}$$ in the original equations, it can be verified that $$\mu(F(n_1, n_2, ..., n_k)) = \mu(F(n_k, n_{k-1}, ..., n_1))$$.