OSTROWSKI — the circle a trailing numeration reads

The object: the trailing Ostrowski numeration at an irrational α in (0, 1), α = [0; a₁, a₂, …], with denominators q₀ = 1, q_(k+1) = a_(k+1) q_k + q_(k−1) (q₋₁ = 0), numerators p_k by the same recurrence from p₋₁ = 1, p₀ = 0, and remainders θ_k = q_k α − p_k (θ₋₁ = −1), which alternate in sign and shrink. Every n ≥ 0 has one greedy string (Ostrowski, Abh. Math. Sem. Hamburg 1, 1922) n = Σ d_k q_k with d₀ ≤ a₁ − 1, d_k ≤ a_(k+1), and d_(k−1) = 0 wherever d_k = a_(k+1). Its depth-t tile is the integers sharing d₀ … d_(t−1), and a reader at lookahead c sees the input's depth-(t + c) tile and commits the output's depth-t tile, as in READING. Zeckendorf is α = 1/φ, φ the golden ratio; there q₀ = q₁ = 1 and d₀ is always 0, so digit k here is digit k − 1 of BONACCI's Zeckendorf, and depth t here is depth t − 1 there. This page shows that the numeration is the circle R/Z tiled by arcs, the integers sitting at nα mod 1, and decides every affine map n ↦ mn + ω (m ≥ 1, ω an integer) and every floor division ⌊n/m⌋ at every α. An affine map the circle carries has its walls on READING's wall set, the cuts −jα as B, by the containment criterion below. READING sorts maps into three classes: LIPSCHITZ (bounded lookahead), MIDDLE (finite lookahead at every depth, unbounded) and DISCONTINUOUS (no lookahead at some depth). Of the maps mn + ω only n + ω (ω ≥ 0), the successor's powers, is LIPSCHITZ. Floor division ⌊n/m⌋, m ≥ 2, is carried by no continuous map of the circle, since a tile holds every pair (n mod m, ⌊nα⌋ mod m), and no α puts it in MIDDLE.

Which place pays for the walls. The odometer, this numeration's completion, is totally disconnected, and its tiles are the balls of the agreement ultrametric, under which two strings are close when they share a long prefix. On such tiles, by READING: The reading lemma, a map Lipschitz for that metric reads at bounded lookahead and has no wall. The map n ↦ nα mod 1, extended to the odometer, folds it onto R/Z, two to one over the cuts. An affine circle map with a cut preimage that is not a cut has a wall there, since every input arc about that point maps across a cut (the containment criterion below), and it is DISCONTINUOUS on the odometer, READING's three classes carrying over to a compact completion with finitely many tiles per depth. ×m is such a map. Floor division, carried by no continuous circle map, is DISCONTINUOUS at every α as ×m is, at inputs off the cuts, where the folding is one to one.

MAP             ON THE CIRCLE      PREIMAGE OF A CUT       CLASS
n + ω, ω ≥ 0    x ↦ x + ωα         a cut                   LIPSCHITZ,
                                                             c ≤ 1 eventually
n + ω, ω ≤ −1   x ↦ x + ωα         of −α: −(ω + 1)α,       DISCONTINUOUS
                                     never a cut
mn + ω, m ≥ 2   x ↦ mx + ωα        (h − (j + ω)α)/m,       DISCONTINUOUS
                                     never a cut at h ≠ 0
⌊n/m⌋, m ≥ 2    none               —                       DISCONTINUOUS

In the table h = 0, …, m − 1 indexes the m preimages of the cut −jα. The three DISCONTINUOUS rows read at no lookahead from t₀, the first depth with q_t ≥ 2 (t₀ = 1 when a₁ ≥ 2, t₀ = 2 when a₁ = 1), and every map reads at 0 at the depths before it.

The circle numeration

Tier: theorem.
Verifier: proof; ostrowski.py::section_cuts.

The depth-t tiles match the q_t arcs into which the cuts −α, −2α, …, −q_t α divide the circle R/Z: n lies in a tile iff nα mod 1 lies in its arc. The prefix of value r (0 ≤ r < q_t) has the arc r α + J, with J the open interval between −θ_t and −θ_(t−1) when r < q_(t−1) (so d_(t−1) = 0) and between −θ_t and −θ_(t−1) − θ_t otherwise. The arcs have at most two lengths, |θ_(t−1)| + |θ_t| and |θ_(t−1)|. The open arcs of a depth are disjoint and nest in their parents', so a point off the cuts has one infinite coding (a point of the odometer whose tiles' closed arcs all hold it), and the cut −jα has exactly two, parting at digit t − 1 for the least t with q_t ≥ max(j, 2).

Proof. The star of a digit string is Σ d_k θ_k, and the cap at position k is the largest digit allowed there, a_(k+1), or a₁ − 1 at position 0. Write S = Σ_(k≥t) d_k θ_k for the star of a legal tail. Because a_(k+1) θ_k = θ_(k+1) − θ_(k−1), the cap-filling on one parity, every position of that parity at its cap and the rest 0, telescopes: (a_(t+1), 0, a_(t+3), 0, …) has star −θ_(t−1) and (0, a_(t+2), 0, a_(t+4), …) has star −θ_t. The θ_k alternate in sign, so S is largest when every position of positive θ sits at its cap and every other position is 0, and least with the parities exchanged. When d_(t−1) = 0 both strings are legal and are the two cap-fillings, so every finite tail, short of each infinite cap-filling at infinitely many positions, lies strictly inside the interval between −θ_t and −θ_(t−1). When d_(t−1) ≠ 0 the cap at position t is barred, and the cap-filling that uses it becomes (a_(t+1) − 1, 0, a_(t+3), …), with star −θ_(t−1) − θ_t. Position 0 always has this second form, its cap being a₁ − 1. Now n = r + (tail) gives nα ≡ Σ d_k θ_k, and so the arc.

Its endpoints are r α − θ_t ≡ −(q_t − r)α and r α − θ_(t−1) ≡ −(q_(t−1) − r)α, or −(q_(t−1) + q_t − r)α in the second form. Each is −jα with 1 ≤ j ≤ q_t. The q_(t−1) prefixes below q_(t−1) take the longer arc, and the lengths sum to q_t |θ_(t−1)| + q_(t−1) |θ_t| = |q_t p_(t−1) − q_(t−1) p_t| = 1. The union of the closed arcs holds the dense set of nα, so it is the circle, and total length 1 makes the interiors disjoint, which gives the tile's converse. A child's tail star plus d_t θ_t is a tail star of its parent, so the arcs nest. q_t arcs tiling a circle have q_t endpoints, all among the q_t points −jα, so they are those points. A point interior to an arc at every depth has one nested chain of tiles. A cut −jα, from the first depth where it is an endpoint of two different arcs, has two chains, left and right, and no more: an arc ending on the cut has one child holding it, ending on it on the same side. A depth earlier it lies inside an arc (j > q_(t−1)) or the only one, so the chains part at digit t − 1.

The two codings of −α

Tier: theorem.
Verifier: proof; ostrowski.py::section_codings.

q_K − 1 is the cap-filling on one parity: (0, a₂, 0, a₄, …, a_K) at even K and (a₁ − 1, 0, a₃, 0, …, a_K) at odd K. The first has star −α + θ_K and the second 1 − α + θ_K, so as K grows the two converge to the two codings of −α. They part at position t₀ − 1, the lowest position a nonzero digit can take. So n ↦ n − 1 sends the inputs q_K, which converge to 0 in the odometer, to images that converge, alternately, to two distinct points of the completion. At golden the two strings and the two points of the odometer that the successor sends to 0 are Barat, Berthé, Liardet and Thuswaldner's (Ann. Inst. Fourier 56, 2006, Example 5.5), who say every Ostrowski numeration behaves alike; the closed form at every α is not stated there.

Proof. At K = 1 the string is q₁ − 1 = a₁ − 1. At K ≥ 2, q_K − 1 = a_K q_(K−1) + (q_(K−2) − 1), with 0 ≤ q_(K−2) − 1 < q_(K−1), so the greedy digit at position K − 1 is the cap a_K. Then position K − 2 is 0, and the recursion descends by two to q₀ − 1 = 0 or q₁ − 1 = a₁ − 1. The stars are the telescoped sums of the previous proof, cut at K. At position 0 the two strings read 0 and a₁ − 1, and at position 1 they read a₂ and 0, so they part at 0 when a₁ ≥ 2 and at 1 when a₁ = 1.

The containment criterion

Tier: criterion.
Verifier: proof; ostrowski.py::section_successors; ostrowski.py::section_tears.

Let f(n) = mn + ω with m ≥ 1, on the n where it is ≥ 0, so that f(n)α ≡ g(nα) with g(x) = mx + ωα. At a depth t with q_t ≥ 2, f reads at lookahead c iff every g-preimage of every cut −jα, j ≤ q_t, is a cut −iα with i ≤ q_(t+c). At q_t = 1 every map reads at 0. So f's walls on the circle are g⁻¹(B) \ B with B the cuts: READING: The wall criterion's set, on a connected space.

Proof. A point lies in no open depth-(t + c) arc exactly when it is a cut −iα with i ≤ q_(t+c), so the condition says that no preimage lies inside a depth-(t + c) arc. Take an input arc I at depth t + c. If no preimage lies in its interior, g(interior I) is connected and misses every depth-t cut. (Wrapping the whole circle, it would meet one.) So it lies in one output arc, and the integers of I are never at its endpoints. If a preimage y lies inside I, the integers of I sit dense on both sides of y, and g, a local homeomorphism, puts their images on both sides of the cut g(y). Those are two different arcs once q_t ≥ 2.

The affine maps

Tier: theorem; observation (the finite check's reads).
Verifier: proof; ostrowski.py::section_successors; ostrowski.py::section_tears.

n + ω with ω ≥ 0 reads at c_min(t) = min{c : q_(t+c) ≥ q_t + ω} wherever q_t ≥ 2. At ω ≥ 1 that is 1 at every depth where q_t ≥ 2 and q_(t−1) ≥ ω, so the map is LIPSCHITZ, and the successor reads at lookahead 1 from t₀ on. n + ω (ω ≤ −1) and mn + ω (m ≥ 2, any ω) read at no lookahead at any depth t ≥ t₀: DISCONTINUOUS, at every irrational α.

Proof. The preimages of −jα under x ↦ mx + ωα are (h − (j + ω)α)/m, h = 0..m − 1. Such a point is −iα mod 1 only if (mi − j − ω)α is an integer ≡ −h mod m, which for irrational α forces mi = j + ω and h = 0. At m = 1, ω ≥ 0 every preimage −(j + ω)α is a cut, at depth t + c iff q_t + ω ≤ q_(t+c), and q_(t+1) ≥ q_t + q_(t−1) gives the 1. At m = 1, ω ≤ −1 the preimage of −α under x ↦ x + ωα is −(ω + 1)α, which is −iα for no i ≥ 1. At m ≥ 2 the preimages with h ≠ 0 are never cuts. Take −α, a cut at every depth, and apply the containment criterion. So 2n has walls at (1 − α)/2 and at −α/2 (the preimage at h = 0, where 2i = 1 has no solution), among others. At golden the pairs that share any number of low digits while their doubles part are BONACCI: The comb's, against a published lemma.

The successor's finite-state side is C. Frougny's (On the sequentiality of the successor function, Inform. Comput. 139 (1997) 17–38). Her reading, least significant digit first, is the one here. A function is right subsequential when a deterministic finite transducer reading right to left computes it, and her Theorem 3 takes a scale whose least linear recurrence has a dominant root β (simple, larger in modulus than every other root): the successor is right subsequential iff the greedy expansion of 1 in base β is finite and the recurrence is the one its digits write. Among Ostrowski scales it reaches those whose partial quotients are eventually a constant a, where q_(k+1) = a·q_k + q_(k−1) from some k on (the theorem lets the first terms be any), that expansion is the two digits a, 1, and the successor is right subsequential. At a₁ = 1 the scale starts at q₁, d₀ being 0. Off eventually constant quotients q_(k+1)/q_k = [a_(k+1); a_k, …, a₁] has no limit: it is unbounded with the quotients, and with them bounded a limit L would fix a_(k+1) = ⌊L⌋ from some k on, the tail [0; a_k, …, a₁] keeping from 0 and 1; a dominant root would give one, and the theorem does not apply.

A check over the integers below N cannot see the walls of n + ω (ω ≤ −1) and mn + ω (m ≥ 2): at N = 10⁴ and 10⁵ it finds n − 1, n − 2, 2n, 2n + 1, 3n, 3n + 1, 4n and 4n + 1 reading at t₀ at c_N − 1, c_N or c_N + 1, at golden, silver, bronze, √3 − 1, e − 2, ∛2 − 1 and a seeded random α with quotients in 1..4, c_N the largest c with q_(t₀+c) ≤ N, where one depth deeper a tile holds at most one integer below N.

Floor division is never MIDDLE here

Tier: theorem.
Verifier: proof; ostrowski.py::section_residues; ostrowski.py::section_tears.

Every tile, at every depth and every α, holds integers of every pair (n mod m, ⌊nα⌋ mod m), and ⌊n/m⌋ (m ≥ 2) reads at no lookahead at any depth t ≥ t₀, at every irrational α: DISCONTINUOUS, never MIDDLE. READING: The division trichotomy puts ⌊n/2⌋ in MIDDLE on a chain whose radix 2 comes at ever sparser depths, since a chain's tiles are residue classes, which fix n mod m once m divides the modulus. An Ostrowski tile is the integers of an arc and fixes n mod m at no depth.

Proof. The rotation by (1, α) on Z/m × R/mZ is minimal. Its forward orbit's closure is a closed subgroup, since in a compact group the closure of a semigroup is a group. It holds m(1, α) = (0, mα), whose multiples are dense in R/mZ because α is irrational, and adding (1, α) gives the rest. So the integers whose nα mod 1 lies in an arc realize every pair. Write n = mu + s with u = ⌊n/m⌋ and s = n mod m, 0 ≤ s < m. Then uα = (nα − sα)/m, so fix s. The images of an input tile about a non-cut x then come arbitrarily close to all m points (x − sα + P)/m, P = ⌊nα⌋ mod m, each of 0..m − 1 met at the fixed s, 1/m apart: no continuous circle map carries ⌊n/m⌋. As x runs once round, these points sweep the circle, so each cut is crossed. At the moment one of them crosses a depth-t cut, −jα with j ≤ q_t, no other sits on a cut: two of them differ by k/m, 0 < k < m, and two cuts by a multiple of α. At q_t ≥ 2 a cut parts two arcs, so the crossing point and some other point lie in different depth-t arcs just before or just after the crossing. At a non-cut x there, every input tile about x holds integers of both.