Let $x\in(0,1)$ and let $\{d_n(x)\}$ be the sequence of regular continued fraction digits, as implied by the Gauss map $x\mapsto \frac1x\pmod1$. I'm trying to prove that $$\lim_{n\to\infty}\frac1n\left|\{k\in[n]:d_k(x)=0\pmod2\}\right|=\frac{\log\pi}{\log2}-1.$$
I want to do this using Birkhoff's pointwise ergodic theorem, using the Wallis product. It shouldn't be too difficult: it is well known that $T$ is measure preserving and ergodic w.r.t. $\mu=\frac{1}{\log2}\frac{1}{1+x}\lambda(0,1)$, where $\lambda(0,1)$ is the Lebesgue measure on the open unit interval. Then using $$f=\sum_{n\in\mathbb N}\mathbf1_{\left(\frac1{2n+1},\frac1{2n}\right]},$$ we should have that \begin{align*}\lim_{n\to\infty}\frac1n\left|\{k\in[n]:d_k(x)=0\pmod2\}\right|&=\lim_{n\to\infty}\frac1n\sum_{i=0}^{n-1}f(T^ix)=\int_{(0,1)}f\ \mathrm d \mu\\&=\frac1{\log2}\sum_{n\in\mathbb N}\int_{\left(\frac1{2n+1},\frac1{2n}\right]}\frac1{1+x}\ \mathrm dx\\&=\frac1{\log2}\sum_{n\in\mathbb N}\log\frac{1+\frac1{2n}}{1+\frac1{2n+1}}\\&=\frac1{\log2}\log\prod_{n\in\mathbb N}(1+\frac1{2n(2n+2)}),\end{align*} which does not seem to converge to $\log\pi/\log2-1$.
Any help is much appreciated.
The product you get is certainly
$$\frac{1}{\log 2} \cdot \log(4/\pi) = \frac{\log(4) - \log(\pi)}{\log(2)} = \frac{2 \log(2) - \log(\pi)}{\log(2)} = 2 - \frac{\log(\pi)}{\log(2)} \simeq 0.348504\ldots,$$
and that is the expected density of even digits. For odd digits you should get
$$ 1 - \left(2 - \frac{\log(\pi)}{\log(2)}\right) = \frac{\log(\pi)}{\log(2)} - 1,$$
so everything is consistent after taking into account there is a typo where "odd" and "even" must have been swapped.