# Hopping to infinity along a string of digits

Let $$s$$ be an infinite string of decimal digits, for example: $$\begin{array}{cccccccccc} s = 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 & \cdots \end{array}$$ Consider a marker, the head, pointing to the first digit, $$3$$ in the above example. Interpret the digit under the head as an instruction to move the head $$3$$ digits to the right, i.e., to the $$4$$th digit. Now the head is pointing to $$1$$. Interpret this as an instruction to move $$1$$ place to the left. Continue in this manner, hopping through the string, alternately moving right and left. Think of the head as akin to the head of a Turing machine, and $$s$$ as the tape of instructions.

There are three possible behaviors. (1) The head moves off the left end of $$s$$:

$$\begin{array}{cccccccccc} 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 4 & 1 & 5 & 9 & 2 & 6 & 5 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} \end{array}$$
(2) The head goes into a cycle, e.g., when the head hits $$0$$:
$$\begin{array}{cccccccccccccc} 6 & 4 & 5 & 7 & 5 & 1 & 3 & 1 & 1 & 0 & 6 & 4 & 5 & 9 \\ \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 4 & 5 & 7 & 5 & 1 & 3 & 1 & 1 & 0 & 6 & 4 & 5 & 9 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 4 & 5 & 7 & 5 & 1 & 3 & 1 & 1 & 0 & 6 & 4 & 5 & 9 \\ \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 4 & 5 & 7 & 5 & 1 & 3 & 1 & 1 & 0 & 6 & 4 & 5 & 9 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} \\ 6 & 4 & 5 & 7 & 5 & 1 & 3 & 1 & 1 & 0 & 6 & 4 & 5 & 9 \\ \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 4 & 5 & 7 & 5 & 1 & 3 & 1 & 1 & 0 & 6 & 4 & 5 & 9 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} \end{array}$$
(3) The head moves off rightward to infnity:
$$\begin{array}{ccccccccccccc} 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} & \text{} & \text{} & \text{} \\ 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 & 1 & 3 \\ \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{ {}^{\wedge}} & \text{} \\ \end{array}$$
This last string could be viewed as the decimal expansion of $$31/99 = 0.3131313131313\cdots$$.

Q1. What is an example of an irrational number $$0.d_1 d_2 d_3 \cdots$$ whose string $$s=d_1 d_2 d_3 \cdots$$ causes the head to hop rightward to infinity?

Q1.5. (Added). Is there an explicit irrational algebraic number with the hop-to-$$\infty$$ property?

I'm thinking of something like $$\sqrt{7}-2$$, the 2nd example above (which cycles).

Q2. More generally, which strings cause the head to hop rightward to infinity?

Update (summarizing answers, 13Apr2019). Q1. There are irrationals with the hop-to-$$\infty$$ property (@EthanBolker, @TheSimpliFire), but explicit construction requires using, e.g., the Thue-Morse sequence (@Wojowu). Q1.5. @EthanBolker suggests this may be difficult, and @Wojowu suggests it may be false (b/c: nine consecutive zeros): Perhaps no algebraic irrational has the hop-to-$$\infty$$ property. Q2. A partial algorithmic characterization by @TheSimpliFire.

• You want a string such that the $D_1=(1+d_1)$th digit is less than $d_1$, that the $D_2=(1+d_1-D_1)$th digit is greater than $D_1$, that the $D_3=(1+d_1-D_1+D_2)$th digit is less than $D_2$, etc. I think it is possible to generate an algorithm and you can try for some simulations. – TheSimpliFire Apr 13 at 12:32
• Another question. For sequences that don't hop to infinity behavior is determined by a (finite) initial subsequence. There are only countably many of those. What are they? – Ethan Bolker Apr 13 at 12:42
• I think Q1.5 is hard since digit sequences for algebraic numbers are hard adamczewski.perso.math.cnrs.fr/Siauliai.pdf – Ethan Bolker Apr 13 at 13:58
• Followup question: what are the measures of the three sets in the interval $(0,1)$? – eyeballfrog Apr 13 at 16:30
• @eyeballfrog The set of numbers with hop to infinity property has measure zero, because you can't hop past a string of nine zeros. This also strongly suggests no algebraic irrational has this property. – Wojowu Apr 13 at 18:21

$$x 1^{x-2} y 1^{y-2} z1^{z-2} \ldots$$ moves off to infinity for any sequence of digits $$xyz\ldots$$ between $$3$$ and $$9$$. Select a sequence that defines an irrational number.
$$x 1 ?^{x-1} y 1 ?^{y-1} z 1 ?^{z-1} \ldots$$ works, where $$?^n$$ is an arbitrary string of $$n$$ digits, since those spots will never be hopped on.
• Clearly it will be irrational if $t = 0.xyz\ldots$ is, since then periodicity is impossible. It can be even when $t$ is rational because the $?$'s can force that. – Ethan Bolker Apr 13 at 14:47
• I worry about explicitly specifying $t=0.xyz\cdots$, excluding digits $\{ 0,1,2 \}$, guaranteeing $t$ is irrational. – Joseph O'Rourke Apr 13 at 16:46