4

Consider the map $f:\mathbb Q^+ \to \mathbb Q^+$ defined as $f(x):=\dfrac1{2 \lfloor x \rfloor -x+1} , \forall x \in \mathbb Q^+$ ; then is the function

$g:\mathbb Z^+ \to \mathbb Q^+$ defined as $g(n):=f^n(1)=\underbrace{(f \circ f \circ \ldots f}_{n \text{ times}})(1)$ a bijection? That is, do the iterates of $f()$ hit all positive rationals?

  • what happens at x=-1? – JMP Mar 07 '15 at 15:45
  • 1
    @JonMarkPerry $x=-1$ is not in the domain or range – Alan Mar 07 '15 at 15:50
  • That's refering to n. I got it, the sequence starts $f_0(0)=1$, $f_1(0)=f(f(_0)(0))=1/2$, next is 2, 1/3, etc... – JMP Mar 07 '15 at 15:51
  • 1
    Where did you come across this particular $f$? What have you tried on the problem so far? – Steven Stadnicki Mar 07 '15 at 16:36
  • 1
    It is not too difficult to see that $f$ is a bijection $\mathbb Q_{\ge0}\to\mathbb Q_{>0}$, but do you have any particular reason to suspect it has only one orbit? – hmakholm left over Monica Mar 07 '15 at 17:16
  • 2
    The function sends $\dfrac pq$ to $\dfrac q{p+q-2(p\bmod q)}$, and if $p/q$ is in lowest terms, then this result is too. So possibly it might be easier to understand as a weird integer recurrence. – hmakholm left over Monica Mar 07 '15 at 17:37
  • 3
    This is known as Calkin–Wilf sequence – gtrrebel Mar 07 '15 at 17:54
  • I tweaked the definition slightly to start from $1$ rather than from $0$, since that lets the domain and range be explicitly defined as positive rather than non-zero, and the shift doesn't really affect anything. – Steven Stadnicki Mar 07 '15 at 17:55
  • 1
    @gtrrebel Given that that answers the question explicitly, maybe it should be fleshed out with some of the information from the Wikipedia link (and a pointer) and turned into an answer? – Steven Stadnicki Mar 07 '15 at 17:57
  • Yep, although I'd like to find a online proof for that – gtrrebel Mar 07 '15 at 18:00
  • A related problem (sorry, I don't remember the source for this): the Taylor series of $$\prod_{k=0}^\infty(1+x^{2^{k}} + x^{2^{k+1}}) = \sum_{k=0}^\infty a_k x^k$$ has the property that $g(n) =\frac{a_{n+1}}{a_n}$. – Winther Mar 07 '15 at 18:17
  • @gtrrebel I'll bet that looking at continued fraction expansions would lead towards a proof - this is probably related to iterating over all finite sequences of integers sorted by total sum (i.e., '1', '2', '1 1', '3', '2 1', '1 2', '1 1 1', '4', etc.) in some suitable Gray code order (with each sum corresponding to one level in the Calkin-Wilf tree). – Steven Stadnicki Mar 07 '15 at 19:20
  • If I’m not mistaken, these are the reciprocals of the numbers $q_n$ in this question, and I proved that they enumerated $\Bbb Q^+$ without repetition. – Brian M. Scott Mar 07 '15 at 22:42
  • @BrianM.Scott: Looks so -- at least both Wikipedia and OEIS claim that the halving-based recurrence in the other question defines the same sequence as the step-by-step one in this question. But I don't think it is at all obvious that the two definitions are equivalent. – hmakholm left over Monica Mar 08 '15 at 06:07
  • @Henning: It took a bit of work, but I’ve managed to supply the details. – Brian M. Scott Mar 08 '15 at 10:40
  • The title has $f^n(0)$, the body, $f^n(1)$. I guess it makes little difference, since $f(0)=1$, but still.... – Gerry Myerson Mar 08 '15 at 11:13
  • 1
    @Gerry: The body had $f^n(0)$ too, until Steven Stadnicki edited it. I don't really grasp his point; is $\mathbb Q_+\to \mathbb Q_+\setminus{1}$ much nicer than $\mathbb Q_{\ge 0} \to\mathb Q_+$? – hmakholm left over Monica Mar 09 '15 at 01:27

1 Answers1

3

As Henning noted in the comments,

$$\begin{align*} f\left(\frac{p}q\right)&=\frac1{2\left\lfloor\frac{p}q\right\rfloor-\frac{p}q+1}\\ &=\frac{q}{2q\left(\frac{p-(p\bmod q)}q\right)-p+q}\\ &=\frac{q}{p+q-2(p\bmod q)}\;. \end{align*}$$

If we let $p_0=q_0=1$ and define $p_n$ and $q_n$ by the recurrences

$$\begin{align*} p_{n+1}&=q_n\\ q_{n+1}&=p_n+q_n-2(p_n\bmod{q_n})\;, \end{align*}\tag{1}$$

clearly $g(n)=\frac{p_n}{q_n}$. Note that we can eliminate $q_n$ and reduce $(1)$ to

$$p_{n+1}=p_{n-1}+p_n-2(p_{n-1}\bmod{p_n})\;,$$

with initial conditions $p_0=p_1=1$.

An easy induction shows that $p_{2n}>p_{2n+1}$ for $n>0$, and $p_{2n+1}<p_{2n+2}$ for $n\ge 0$.

If $n>0$ is even, then by the induction hypothesis $p_{n-1}<p_n$, so $$p_{n+1}=p_{n-1}+p_n-2p_{n-1}=p_n-p_{n-1}<p_n\;.\tag{2}$$

If $n$ is odd, then $p_{n-1}>p_n$; let $p_{n-1}=kp_n+r$, where $k\ge 1$ and $0\le r<p_n$. Then $$p_{n+1}=p_{n-1}+p_n-2(p_{n-1}\bmod{p_n})=(k+1)p_n-r\ge 2p_n-r>p_n\;.$$

Let $r_0=1$, and define $r_n$ by the recurrence

$$\begin{align*} r_{2n+1}&=r_n\\ r_{2n+2}&=r_n+r_{n+1}\;. \end{align*}\tag{3}$$

Clearly $r_0=r_1=p_0=p_1=1$. Suppose that $r_k=p_k$ for $k\le 2n+1$. Then

$$\begin{align*} p_{2n+2}&=p_{2n}+p_{2n+1}-2(p_{2n}\bmod{p_{2n+1}})\\ &=r_{2n}+r_{2n+1}-2(r_{2n}\bmod{r_{2n+1}})\\&=r_{n-1}+2r_n-2\big((r_{n-1}+r_n\big)\bmod{r_n}\big)\\ &=r_{n-1}+2r_n-2(r_{n-1}\bmod{r_n})\\ &=r_n+\big(p_{n-1}+p_n-2(p_{n-1}\bmod{p_n})\big)\\ &=r_n+p_{n+1}\\ &=r_n+r_{n+1}\\ &=r_{2n+2}\;, \end{align*}$$

and $r_{2n+3}=r_{n+1}=r_{2n+2}-r_n=r_{2n+2}-r_{2n+1}=p_{2n+2}-p_{2n+1}=p_{2n+3}$ by (2). Thus, $r_n=p_n$ for all $n\ge 0$.

For $n\ge 1$ let $a_n=r_{n-1}=p_{n-1}$. Then $a_1=1$, and it follows from $(3)$ that

$$a_{2n}=r_{2n-1}=r_{n-1}=a_n$$

and

$$a_{2n+1}=r_{2n}=r_{n-1}+r_n=a_n+a_{n+1}$$

and hence that $\langle a_n:n\in\Bbb Z^+\rangle$ is the sequence defined in this question. In my answer to that question I showed that if $q_n=\frac{a_{n+1}}{a_n}$ for $n\in\Bbb Z^+$, the sequence $\langle q_n:n\in\Bbb Z^+\rangle$ is a bijection from $\Bbb Z^+$ to $\Bbb Q^+$, and the rational numbers $q_n$ are just the reciprocals of the numbers $g(n)$.

Brian M. Scott
  • 616,228
  • Good work, +1! Unfortunately, even though this proof demonstrates that it works, I still find myself wondering how it works, intuitively. But one can't have everything ... – hmakholm left over Monica Mar 08 '15 at 22:48