Consider the function $f:\mathbb{R}\to\mathbb{R}$, where for a base-3 expansion of $x\in\mathbb{R}$, we take the "pseudo-random" iterations of function $\mathscr{F}:\{0,1,2\}\to\{0,1,2\}$ where for the first iteration, replace base-3 digit zero with one; one with two, and two with zero.

In mathematical terms, if $\mathscr{F}:=\left\{(0,1),(1,2),(2,0)\right\}$, such that equation:
$$\mathscr{F}^{k}=\underset{k\text{ times}}{\underbrace{\mathscr{F}(\mathscr{F}(\cdots\mathscr{F}(x)))}}$$ is the $k$-th iteration of $\mathscr{F}$, we define a function with "pseudo-random" outputs in $\mathbb{N}$. If we define $g_{\varepsilon}:\mathbb{R}\to\mathbb{R}$ where:

$$g_{\varepsilon}(x)=\begin{cases}
\quad\!\!(2\varepsilon)^{x/(2\varepsilon)} & \quad\!\! x<-\varepsilon\\
-1/x & \!-2\varepsilon\le x <0\\
\quad \! 0 & \!\!\quad x=0 \\
\quad\!{1}/{x} & \quad\!\! 0<x<\varepsilon \\
\quad\!\!\,\varepsilon^{-x/\varepsilon} & \quad\!\! x\ge \varepsilon\\
\end{cases}$$

such that $\left[\cdot\right]$ rounds to the nearest integer, then function $z_{\varepsilon}:\mathbb{R}^2\to\mathbb{R}$ or

$$z_{\varepsilon}(x,k)=\big[g_{\varepsilon}(x) k\sin(g_{\varepsilon}(x)k)\big]$$

contains "pseudo-random" outputs of $\mathbb{N}$, where furthermore:

$$\small{f_{\varepsilon}(x)=\left\{\sum\limits_{k=-\infty}^{\infty}{\text{sign}\left(\mathscr{F}^{z_{\varepsilon}(x,k)}(a)\right)\mathscr{F}^{z_{\varepsilon}(x,k)}(a)}/{3^k}:a\in\left\{0,1,2\right\},x=\sum\limits_{k=-\infty}^{\infty}a/{3^k}\right\}}$$

which is the same as:

$$\scriptsize{f_{\varepsilon}(x)=\left\{\sum\limits_{k=-\infty}^{\infty}\Big(\text{sign}(\text{mod}(z_{\varepsilon}(x,k)+a,3))\cdot\text{mod}(z_{\varepsilon}(x,k)+a,3)\Big)/{3^k}:a\in\left\{0,1,2\right\},x=\sum\limits_{k=-\infty}^{\infty}a/{3^k}\right\}}$$

(i.e., $\mathscr{F}^{k}(a)=\text{mod}(a+k,3)$), such that for set $A\subseteq \mathbb{R}$ we want an $f:\mathbb{R}\to\mathbb{R}$ where:

\begin{equation}
\small{\forall(\varepsilon_1>0)\exists(A\subseteq\mathbb{R})\forall(\varepsilon\in A)\exists(M>0)\forall(x\in\mathbb{R})\left(0<\varepsilon\le M\Rightarrow \left|f_{\varepsilon}(x)-f(x)\right|<\varepsilon_{1}\right)}
\label{bjj}\tag{1}
\end{equation}

**Note:** For $g_{\varepsilon}(x)$, we have $2\varepsilon$ (rather than $\varepsilon$) to avoid symmetry in the graph of $f$, and the $\text{sign}$ function in $f_{\varepsilon}(x)$ to allow negative outputs in $f$'s graph.

Using evidence, consider $f_{\varepsilon}(x)\mapsto f_{\varepsilon}(x,t)$ where:

$$\scriptsize{f_{\varepsilon}(x,t)=\left\{\sum\limits_{k=-\infty}^{t}\Big(\text{sign}(\text{mod}(z_{\varepsilon}(x,k)+a,3))\cdot \text{mod}(z_{\varepsilon}(x,k)+a,3)\Big)/{3^k}:a\in\left\{0,1,2\right\},x=\sum\limits_{k=-\infty}^{\infty}a/{3^k}\right\}}$$

and $x\in G_{r}:=\left\{c/d:c,d\in\mathbb{Z}, d\le r, -dr\le c\le dr\right\}$, such that when $x\in G_{10}$, we get the set of points $\left\{(x,f_{.1}(x,10)):x\in G_{10}\right\}$ is:

[![enter image description here][2]][2]

**Question:** If $f$ does not exist or satisfy the motivation, how do we change equation $\eqref{bjj}$ so it does?

I assume none of the expected values in the **preliminaries** give this function a unique and finite expected value. (Hopefully, someone can check.)

  [2]: https://i.sstatic.net/bWglD.png