# functions on a continued fraction expansion

Let $x$ be an irrational number with continued fraction expansion $[a_0;a_1,a_2,\ldots]$. Is there an $x$ and a non-identity function $f$ such that $f(x)=[f(a_0);f(a_1),f(a_2),\ldots]$.

Given that I don't know too much about continued fractions other than you might learn as an introduction, I'm not sure about this. It's something that just came to mind.

$f(x)=ax^2+(1-3a)x+1+2a$, where $a=4+\frac{11}{4}\sqrt2-\sqrt{13}-\frac{3}{4}\sqrt{26}$.

$f(1)=a+1-3a+1+2a=2$

$f(2)=4a+2-6a+1+2a=3$

$f(\sqrt2)=2a+\sqrt2-3a\sqrt2+1+2a=4a+1+\sqrt2-3a\sqrt2$

Now

$4a+1+\sqrt2=17+12\sqrt2 -4\sqrt{13}-3\sqrt{26}$

and

$-3a\sqrt2=-12\sqrt2-\frac{33}{2}+3\sqrt{26}+\frac{9}{2}\sqrt{13}$

so $f(\sqrt2)=\frac{1}{2}\left(1+\sqrt{13}\right)$.

Finally $f(\sqrt2)=\frac{1}{2}\left(1+\sqrt{13}\right)=[2;\bar3]=[f(1);f(\bar2)]$

Maybe there's an easier/simpler example?

Slightly different choice.

$g(x)=ax^2+(2-3a)x+2a$, where $a=6+4\sqrt2-2\sqrt{5}-\frac{3}{2}\sqrt{10}$.

$g(1)=a+2-3a+2a=2$

$g(2)=4a+4-6a+2a=4$

$g(\sqrt2)=2a+2\sqrt2-3a\sqrt2+2a=4a+2\sqrt2-3a\sqrt2$

Now

$4a+2\sqrt2=24+18\sqrt2 -8\sqrt{5}-6\sqrt{10}$

and

$-3a\sqrt2=-18\sqrt2-24+6\sqrt{10}+9\sqrt{5}$

so $g(\sqrt2)=\sqrt5$.

Finally $g(\sqrt2)=\sqrt5=[2;\bar4]=[g(1);g(\bar2)]$