# A rational orbit that's provably dense in the reals?

Iterating the map $\ \ x\ \mapsto\ x-\frac{1}{x},\ \$ the orbit of initial point $2$ is "probably" dense in $\mathbb{R}$. Is there an explicit rational mapping together with an initial rational whose orbit is provably dense in $\mathbb{R}$?

NB: "Rational mapping" here means simply a function from rationals to rationals, not the definition in algebraic geometry.

EDIT: Does the following approach work? ...

The answer to another posted question proves that with $$f(x)=\dfrac1{2 \lfloor x \rfloor -x+1}$$the rational orbit $$1,\ f(1),\ f(f(1)),\ ...,\ f^n(1),\ ...$$ is the Calkin-Wilf sequence containing every positive rational exactly once, and is therefore dense in $\mathbb{R^+}$.

Question: Can it be shown that in this Calkin-Wilf sequence the even-index rationals alone are dense in $\mathbb{R^+}$, and likewise for the odd-index rationals?

If so, then, noting that $f(0)=1$, we can obtain a rational orbit that's provably dense in the whole of $\mathbb{R}$ by simply taking $$0,\ g(0),\ g(g(0)),\ ...,\ g^n(0),\ ...$$ with $$g(x) = \begin{cases} -f(x) & \text{if }x\ge 0 \\ f(-x) & \text{if }x<0 \end{cases}$$ so $$g^n(0) = \begin{cases} f^n(0) & \text{if }n\text{ is even} \\ -f^n(0) & \text{if }n\text{ is odd}. \end{cases}$$

Start from the theorem that for any irrational $\mu \in (0,1)$ the set $$\{2^k \mu\} : k \in \Bbb{N}$$ where (following Knuth's Concrete Mathematics) the notation $\{x\}$ means the fractional part of $x$ ($\equiv x-\lfloor x \rfloor$) is dense in $(0,1)$.

Now look at the map $$x \mapsto \frac{x - \frac{1}{x}}{2}$$ with some initial point $x_0$. The equation for this map superficially looks a lot like the example you give. But that $2$ in the denominator does a couple of things:

• $x_n$ is the $n$-th guess you would obtain if you were naively to try to find $\sqrt{-1}$ using Newton's algorithm with a starting guess of $x_0$.

• We can express the value of $x_n$ in closed form (I attribute this to Carl Bender in a course at MIT in 1973 or so, but of course it may have been known much earlier):

$$x_n = \cot \left( 2^n \cot^{-1}x_0 \right)$$

But as long as $\cot{-1}x_0$ is not a rational multiple of $2\pi$, by the theorem stated above the set $$\{2^k \cot^{-1}x_0\} : k \in \Bbb{N}$$ is dense in $(0,2\pi)$.

So the set of values of $x_k$ is the set of cotangents of a dense set on the circle; in turn, the set of values of $x_k$ is dense on the real line. An example is an initial value of $x_0 = 2$.

• "Start from the theorem..." : that's not a theorem, that's just false (e.g. take for $\mu$ an irrational number with no $11$ in its binary expansion). You have to be more careful; the binary expansion of $\mu$ must contain all finite strings of digits. The binary Champernowne constant, for instance, does the trick. Otherwise, pretty nice argument. – D. Thomine Jan 6 '16 at 22:51
• @D.Thomine - So for this answer to work, we need to find a rational $x_0$ such that the binary expansion of $\cot^{-1}x_0$ provably contains every finite binary string. Isn't that beyond current mathematics? – r.e.s. Jan 7 '16 at 0:22
• @r.e.s. : yes, you are right. I didn't catch that. So this method doesn't work, after all. – D. Thomine Jan 7 '16 at 10:50