Solution (source code)

= Solution

For $x>0$, $N(x)=\lfloor1/x\rfloor$ and $T(x)=1/x-\lfloor1/x\rfloor$. Iterating this <Gauss continued-fraction map> on an <irrational number> never reaches zero, and its <continued fraction> is
$$
\boxed{x=[0;N(x),N(Tx),N(T^2x),\ldots].}
$$
The branches $T:(1/(n+1),1/n)\to(0,1)$ have inverse $x_n(y)=1/(n+y)$, for $n\geq1$. The <change of variables formula> for a <probability density function> gives, <almost everywhere>,
$$
f_{T(X)}(y)=\sum_{n=1}^\infty f\!\left(\frac1{n+y}\right)\frac1{(n+y)^2}
=\frac1{\log2}\sum_{n=1}^\infty\left[\frac1{n+y}-\frac1{n+y+1}\right]
=\frac1{(\log2)(1+y)}.
$$
The endpoints of these branches are a <countable set> of probability zero. Thus \b[$T(X)$ and $X$ have the same distribution]; this <Gauss measure> is an <invariant measure> for the <Gauss continued-fraction map>.