Is $f$ a continuous function? I seek to understand whether a certain discontinuous function on the dyadic rationals can be recast using the Cantor set as a continuous function.

Let $X$ be the dyadic rationals in the interval $(\frac12,1]$

Let $2^{\nu_2(x)}$ be the highest power of $2$ that divides $x$.

Let $f:X\to X$ be given by

$f(x)=\begin{cases}
\frac14(3x+2^{\nu_2(x)})&amp; \text{ if} &amp; x&gt;\frac23 \\
\frac12(3x+2^{\nu_2(x)})&amp; \text{ if} &amp; x&lt;\frac23\\
\end{cases}$

Now cut the interval at $2/3$ and glue the two parts at $1/2=1$ and thereby, $f$ will run from $(\frac23,\frac76)$.

I think at the moment this is NOT a continuous function (under the normal metric) because e.g. $\lim_{n\to\infty}f(7/8-2^{-n})=f(7/8)-1/8$.


  The question is this:  Can reinterpreting the binary expansion of $x$ as its Cantor set by sending $2^{-m}\mapsto2\cdot3^{-m}$ make this a continuous function via the devil's staircase?


Let $\phi(x):\sum_{n=1}^\infty 2^ni:i\in\{0,1\}\mapsto\sum_{n=1}^\infty 3^ni:i\in\{0,2\}$

Then is $\phi f\phi^{-1}(x)$ continuous?

As a little background - I'm aware I am asking the xy question.  My objective is to make $f$ a continuous function from a segment of $\Bbb R$ to itself. To do so would prove there are no nontrivial cycles in the Collatz conjecture via Sharkovskii's theorem.

For this to be successful, the "recasting" of the function as a continuous function on a segment of $\Bbb R$ must only have cycles of the same order as any cycles of the original $f$.

I'm pretty sure there's a way to do this but sadly I'm also pretty sure it's not exactly what I'm doing here.  But to see what I'm doing wrong or how this is impossible will be as much help to me as a successful answer.
I suppose there will be mechanisms to relate discrete and continuous mathematics, but if your question is destined to the absence of cycles in the Collatz conjecture, you could try to put your question in the  graph theory, for example,

is it a forest, or equivalently, is a disjoint union of trees?

Is a directed tree to the case where the edges are all directed towards a particular vertex, or all directed away from a particular vertex?

is a connected graph? is a labeled graph?

the numbers n=1(mod 3) are the nodes of the union of disjoint trees?
I suppose there will be mechanisms to relate discrete and continuous mathematics, but if your question is destined to the absence of cycles in the Collatz conjecture, you could try to put your question in the  graph theory, for example,

is it a forest, or equivalently, is a disjoint union of trees?

Is a directed tree to the case where the edges are all directed towards a particular vertex, or all directed away from a particular vertex?

is a connected graph? is a labeled graph?

the numbers n=1(mod 3) are the nodes of the union of disjoint trees?