arxiv: v2 [math.nt] 11 Jul 2018

Similar documents
Unique Expansions of Real Numbers

Expansions in non-integer bases

Paul Glendinning and Nikita Sidorov

arxiv: v1 [math.ds] 22 Dec 2018

A PROPERTY OF ALGEBRAIC UNIVOQUE NUMBERS

arxiv: v1 [math.fa] 14 Jul 2018

THE CANTOR GAME: WINNING STRATEGIES AND DETERMINACY. by arxiv: v1 [math.ca] 29 Jan 2017 MAGNUS D. LADUE

Hierarchy among Automata on Linear Orderings

GENERALIZED CANTOR SETS AND SETS OF SUMS OF CONVERGENT ALTERNATING SERIES

MORE ON CONTINUOUS FUNCTIONS AND SETS

Part III. 10 Topological Space Basics. Topological Spaces

CHAPTER 7. Connectedness

ALMOST EVERY NUMBER HAS A CONTINUUM. INTRODUCTION. Let β belong to (1, 2) and write Σ =

Solutions to Tutorial 8 (Week 9)

COMPLEXITY OF SHORT RECTANGLES AND PERIODICITY

P-adic Functions - Part 1

CHAPTER 5. The Topology of R. 1. Open and Closed Sets

Chapter 2 Metric Spaces

Some Background Material

II - REAL ANALYSIS. This property gives us a way to extend the notion of content to finite unions of rectangles: we define

NAME: Mathematics 205A, Fall 2008, Final Examination. Answer Key

Topological properties of Z p and Q p and Euclidean models

Part V. 17 Introduction: What are measures and why measurable sets. Lebesgue Integration Theory

Real Analysis Math 131AH Rudin, Chapter #1. Dominique Abdi

In N we can do addition, but in order to do subtraction we need to extend N to the integers

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

Lebesgue Measure and The Cantor Set

Week 2: Sequences and Series

Partial cubes: structures, characterizations, and constructions

Dynamical properties of S gap shifts and other shift spaces

Axioms of separation

Lebesgue Measure on R n

U e = E (U\E) e E e + U\E e. (1.6)

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

EXPANSIONS IN NON-INTEGER BASES: LOWER, MIDDLE AND TOP ORDERS

MAT1000 ASSIGNMENT 1. a k 3 k. x =

DO FIVE OUT OF SIX ON EACH SET PROBLEM SET

Some Basic Notations Of Set Theory

S. Mrówka introduced a topological space ψ whose underlying set is the. natural numbers together with an infinite maximal almost disjoint family(madf)

5 Set Operations, Functions, and Counting

3 COUNTABILITY AND CONNECTEDNESS AXIOMS

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

Chapter 1. Measure Spaces. 1.1 Algebras and σ algebras of sets Notation and preliminaries

Abstract Measure Theory

Essential Background for Real Analysis I (MATH 5210)

ON DENSITY TOPOLOGIES WITH RESPECT

Math 676. A compactness theorem for the idele group. and by the product formula it lies in the kernel (A K )1 of the continuous idelic norm

10 Typical compact sets

Estimates for probabilities of independent events and infinite series

Section 31. The Separation Axioms

Homework 1 Real Analysis

ABSTRACT INTEGRATION CHAPTER ONE

Continued fractions for complex numbers and values of binary quadratic forms

A Countably-Based Domain Representation of a Non-Regular Hausdorff Space

Measure and Category. Marianna Csörnyei. ucahmcs

A Short Review of Cardinality

REAL AND COMPLEX ANALYSIS

Topology. Xiaolong Han. Department of Mathematics, California State University, Northridge, CA 91330, USA address:

On Aperiodic Subtraction Games with Bounded Nim Sequence

Characterizations of the finite quadric Veroneseans V 2n

Chapter 4. Measure Theory. 1. Measure Spaces

Contents Ordered Fields... 2 Ordered sets and fields... 2 Construction of the Reals 1: Dedekind Cuts... 2 Metric Spaces... 3

ON SOME PROBLEMS OF EXPANSIONS INVESTIGATED BY P. ERDŐS ET AL.

DENSELY k-separable COMPACTA ARE DENSELY SEPARABLE

Measures and Measure Spaces

arxiv: v2 [math.ca] 4 Jun 2017

DRAFT MAA6616 COURSE NOTES FALL 2015

MA651 Topology. Lecture 9. Compactness 2.

Problem set 1, Real Analysis I, Spring, 2015.

Topological properties

Mathematics 220 Workshop Cardinality. Some harder problems on cardinality.

Math212a1413 The Lebesgue integral.

Lebesgue Measure on R n

Unique expansions with digits in ternary alphabets

SUBCONTINUA OF FIBONACCI-LIKE INVERSE LIMIT SPACES.

CHAPTER 8: EXPLORING R

Supplementary Notes for W. Rudin: Principles of Mathematical Analysis

INFINITY: CARDINAL NUMBERS

Chapter 8. P-adic numbers. 8.1 Absolute values

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007)

Generalized Pigeonhole Properties of Graphs and Oriented Graphs

In N we can do addition, but in order to do subtraction we need to extend N to the integers

MORE ABOUT SPACES WITH A SMALL DIAGONAL

A NOTE ON THE EIGHTFOLD WAY

MH 7500 THEOREMS. (iii) A = A; (iv) A B = A B. Theorem 5. If {A α : α Λ} is any collection of subsets of a space X, then

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

4. Images of Varieties Given a morphism f : X Y of quasi-projective varieties, a basic question might be to ask what is the image of a closed subset

ADVANCE TOPICS IN ANALYSIS - REAL. 8 September September 2011

TREE-LIKE CONTINUA THAT ADMIT POSITIVE ENTROPY HOMEOMORPHISMS ARE NON-SUSLINEAN

POL502: Foundations. Kosuke Imai Department of Politics, Princeton University. October 10, 2005

SMALL SUBSETS OF THE REALS AND TREE FORCING NOTIONS

Theorems. Theorem 1.11: Greatest-Lower-Bound Property. Theorem 1.20: The Archimedean property of. Theorem 1.21: -th Root of Real Numbers

Part II. Logic and Set Theory. Year

Endomorphism rings generated using small numbers of elements arxiv:math/ v2 [math.ra] 10 Jun 2006

Chapter 3: Baire category and open mapping theorems

LINEAR EQUATIONS WITH UNKNOWNS FROM A MULTIPLICATIVE GROUP IN A FUNCTION FIELD. To Professor Wolfgang Schmidt on his 75th birthday

1 The Cantor Set and the Devil s Staircase

1 Topology Definition of a topology Basis (Base) of a topology The subspace topology & the product topology on X Y 3

(1) Consider the space S consisting of all continuous real-valued functions on the closed interval [0, 1]. For f, g S, define

Infinite-Dimensional Triangularization

Transcription:

Bases in which some numbers have exactly two expansions Vilmos Komornik Département de mathématique, Université de Strasbourg, 7 rue René Descartes, 67084 Strasbourg Cedex, France arxiv:1705.00473v2 [math.nt] 11 Jul 2018 Abstract Derong Kong Mathematical Institute, University of Leiden, PO Box 9512, 2300 RA Leiden, The Netherlands In this paper we answer several questions raised by Sidorov on the set B 2 of bases in which there exist numbers with exactly two expansions. In particular, we prove that the set B 2 is closed, and it contains both infinitely many isolated and accumulation points in (1,q KL ), where q KL 1.78723 is the Komornik-Loreti constant. Consequently we show that the second smallest element of B 2 is the smallest accumulation point of B 2. We also investigate the higher order derived sets of B 2. Finally, we prove that there exists a δ > 0 such that where dim H denotes the Hausdorff dimension. dim H (B 2 (q KL,q KL +δ)) < 1, Keywords: Non-integer bases, two expansions, derived sets, accumulation points, unique expansion, Hausdorff dimension 2010 MSC: Primary: 11A63, Secondary: 37F20, 37B10 1. Introduction In this paper we consider expansions ((c i )) q := i=1 c i q i = x over the alphabet {0,1} in some base q > 1. The sequence (c i ) = c 1 c 2 is called a q-expansion of x. Such an expansion may exist only if x I q := [0,1/(q 1)]. If q > 2, then every expansion is unique by an elementary argument, but not every x I q has an expansion. If q (1,2], then every x I q has at least one expansion. For example, in the well-known integer base case q = 2 all numbers have a unique expansion, except the dyadic rational numbers that have two. Henceforth we assume that q (1,2]. Expansions in non-integer bases q (1,2) are more complicated than that in the integer base q = 2. Erdős et al. discovered in [10, 11, 12] that for any k N {ℵ 0 } there exist q (1,2) and x I q such that x has precisely k different q-expansions. Furthermore, in case q (1,ϕ), where ϕ 1.61803 denotes the Golden Ratio, every x (0, 1/(q 1)) has a continuum of q-expansions. Corresponding author Email addresses: komornik@math.unistra.fr (Vilmos Komornik), d.kong@math.leidenuniv.nl (Derong Kong) Preprint submitted to Elsevier July 12, 2018

Later, Sidorov proved in [26] that for any q (1,2) Lebesgue almost every x I q has a continuum of q-expansions (see also [5]). Many works have been devoted to unique expansions. Komornik and Loreti proved in [19] that there is a smallest base q KL 1.78723 in which x = 1 has a unique expansion. Subsequently, Glendinning and Sidorov discovered that the Komornik Loreti constant q KL plays an important role in describing the size of the univoque sets U q := {x I q : x has a unique q-expansion}, q (1,2]. They proved in [14] the following interesting results: if 1 < q ϕ, then U q = {0,1/(q 1)}; if ϕ < q < q KL, then U q is countably infinite; if q = q KL, then U q is uncountable and has zero Hausdorff dimension; if q KL < q 2, then dim H U q > 0, where dim H denotes the Hausdorff dimension. We point out that U q has a fractal structure for q (q KL,2). The authors and Li proved in [18] that the function q dim H U q has a Devil s staircase behavior. Based on the classification of the bases q (1,2] by Komornik and Loreti [20], the topology of the univoque sets U q was studied by de Vries and Komornik in [7]. They proved among others that U q is closed if and only if q / U, where U is the topological closure of U := {q (1,2] : 1 U q }. In other words, U is the set of univoque bases q (1,2] for which 1 has a unique expansion. An element of U is called a univoque base. As mentioned above, the smallest univoque base is q KL. The set U itself is also of general interest. Erdős et al. proved in [11] that U is a Lebesgue null set of first category. Later, Daróczy and Kátai proved in [6] that U has full Hausdorff dimension. The topological structure of U was clarified in [20]. In particular, the authors proved that U is a Cantor set, and U \U is a countable and dense subset of U. Recently, Bonanno et al. investigated in [4] the connections between U, α-continued fractions, unimodal maps and even the external rays of the Mandelbrot set. For more information on the sets U q and U we refer to the survey paper [15] and the book chapter [8]. Sidorov initiated in [27] the study of the sets B k := {q (1,2] : x I q having precisely k different q-expansions} for k = 2,3,... and k = ℵ 0. In particular, he has obtained the following important results for the set B 2. Theorem 1.1 (Sidorov, 2009). (i) q B 2 1 U q U q ; (ii) U B 2 ; (iii) [ϕ 3,2] B 2, where ϕ 3 1.83929 denotes the Tribonacci number, i.e., the positive zero of q 3 q 2 q 1; (iv) the smallest two elements of B 2 are q s 1.71064 and q f 1.75488, the positive zeros of the polynomials q 4 2q 2 q 1 and q 3 2q 2 +q 1 respectively. 2

Theorem 1.1 (ii) was also contained in [7, Theorem 1.3]. Until now very little is known about the sets B k. Sidorov proved in [27] that B k contains a left neighborhood of 2 for each k 2. Baker and Sidorov proved in [3] that the second smallest element q f of B 2 is the smallest element of B k for each k 3. It follows from the results of Erdős et al. [10, 11] that the Golden Ratio ϕ is the smallest element of B ℵ0. Recently, Baker proved in [2] that B ℵ0 has a second smallest element which is strictly smaller than the smallest element q s of B 2. Based on his work Zou and Kong proved in [29] that B ℵ0 is not closed. The purpose of this paper is to continue the investigations on the set B 2. We answer in particular the following questions of Sidorov [27]: Q1. Is B 2 a closed set? Q2. Is B 2 (1,q KL ) a discrete set? Q3. Is it true that for some δ > 0? dim H (B 2 (q KL,q KL +δ)) < 1 Some ideas of this paper might be useful for the future study of B k with k 3. Motivated by the work of de Vries and Komornik [7] (see also [16]) we introduce the sets V q := {x I q : x has at most one doubly infinite q-expansion}, q (1,2]. Here and in the sequel an expansion is called infinite if it does not end with 10 (it does not have a last one digit), and doubly infinite if it does not end with 01 or 10 (it has neither a last one digit, nor a last zero digit). Remark 1.2. If q is not an integer, then each x I q has a doubly infinite q-expansion, namely its quasi-greedy expansion. See also [28]. We recall from [7] that V q is closed, and U q U q V q for all q (1,2], where U q denotes the topological closure of U q. Using these sets we add two new characterizations of B 2 to Theorem 1.1 (i): Theorem 1.3. The following conditions are equivalent: (i) q B 2 ; (ii) 1 U q U q ; (iii) 1 U q U q ; (iv) 1 V q V q and q ϕ. In order to state our next results we recall from [20] and [16] the notation V := {q (1,2] : 1 V q }; this is the set of bases q (1,2] in which 1 has a unique doubly infinite q-expansion. Remark 1.4. The number x = 1 always has a doubly infinite q-expansion, namely its quasi-greedy expansion, even in integer bases. 3

We recall from [20] that V is closed, and that U U V. The smallest element of V is the Golden Ratio ϕ, while the smallest element of U (and U) is q KL. Furthermore, the difference set U \ U is countably infinite and dense in U, and the difference set V \U is discrete, countably infinite and dense in V. We recall from [7, 9] that (1,2]\U = (1,2)\U is the disjoint union of its connected components (q 0,q 0 ), where q 0 runs over {1} (U \ U) and q 0 runs over a proper subset U of U. Since the Komornik Loreti constant q KL is the smallest element of U, the first connected component is (1,q KL ). We recall that each left endpoint q 0 is an algebraic integer, and each right endpoint q 0, called a de Vries Komornik number, is a transcendental number; see Kong and Li [21]. We also recall that for each component, V (q 0,q0 ) is formed by an increasing sequence q 1 < q 2 < of algebraic integers, converging to q0. For example, the first two elements of V in the first connected component (1,q KL ) are the Golden Ratio ϕ and the second smallest element q f of B 2 ; see also Example 2.6 below. Now we state our basic results on B 2 : Theorem 1.5. (i) The set B 2 is compact. (ii) V \{ϕ} B 2. (iii) Each element of V \ {ϕ} is an accumulation point of B 2. Hence B 2 has infinitely many accumulation points in each connected component (q 0,q0 ) of (1,2)\U. (iv) The smallest accumulation point of B 2 is its second smallest element q f. (v) B 2 (1,q KL ) contains only algebraic integers, and hence it is countable. (vi) B 2 has infinitely many isolated points in (1,q KL ), and they are dense in B 2 (1,q KL ). Remarks 1.6. Theorem 1.5 (i) answers positively Sidorov s question Q1. Theorem 1.5 (ii) improves Theorem 1.1 (ii) because U (and even U) is a proper subset of V \{ϕ}. Since (1,q KL ) is a connected component of (1,2)\U, Theorem 1.5 (iii) answers negatively Sidorov s question Q2. Theorem 1.5 (iv) answers partially a question of Baker and Sidorov [3] about the smallest accumulation point of B k for k 2. We recall that the smallest accumulation point q f of B 2 is the smallest element of B k for all k 3. Theorem 1.5 (v) strengthens a result of Sidorov [27] stating that B 2 (1,q KL ) contains only algebraic numbers. In the following theorem we show that B 2 contains infinitely many accumulation points of all finite orders in (1,q KL ). For this we introduce the derived sets B (0) 2,B(1) 2,... by induction, setting B (0) 2 := B 2, and then B (j+1) 2 = {q (1,2] : q is an accumulation point of B (j) 2 } 4

for j = 0,1,... All these sets are compact by Theorem 1.5 (i) and a general property of derived sets. Since B 2 = B (0) 2 B (1) 2 B (2) 2, the derived set B ( ) 2 := j=0 B(j) 2 of infinite order is also well defined, non-empty and compact. Theorem 1.7. (i) U B ( ) 2. (ii) V \{ϕ} B (2) 2. (iii) minb (1) 2 = minb (2) 2 = q f. (iv) All sets B 2,B (1) 2,B(2) 2,... have infinitely many accumulation points in each connected component (q 0,q0 ) of (1,2]\U. (v) If q 1 < q 2 < are the elements of V (1,q KL ), then and hence q j+1 minb (2j) 2 < q 2j+1 for all j 0, minb (j) 2 ր minb ( ) 2 = q KL as j. (vi) For each j = 0,1,..., B (j) 2 (1,q KL ) has infinitely many isolated points, and they are dense in B (j) 2 (1,q KL ). Remark 1.8. Theorem 1.7 (iv) provides a negative answer to the question Q2 even if we replace B 2 by B (j) 2. Our last result is related to the local dimension of B 2. Theorem 1.9. For any q B 2 we have lim dim ( H B2 (q δ,q +δ) ) 2dim H U q. δ 0 Remarks 1.10. We recall from [18] that the dimension function q dim H U q is continuous, and vanishes at the Komornik Loreti constant q KL (see also Lemma 2.4 below). Since q KL U B 2, by Theorem 1.5 (v) and Theorem 1.9 there exists a δ > 0 such that dim H (B 2 (q KL,q KL +δ)) = dim H (B 2 (q KL δ,q KL +δ)) < 1. This answers affirmatively Sidorov s question Q3. A related result, recently obtained in [22], states that dim H ( B2 (q KL,q KL +δ) ) > 0 for all δ > 0. The rest of the paper is arranged in the following way. In Section 2 we recall some results from unique expansions. Based on the properties of unique expansions we describe the set B 2 in Section 3. In Section 4 we prove Theorem 1.3, and the first parts of Theorems 1.5 and 1.7. Section 5 is devoted to the detailed description of unique expansions. This important tool is extensively used in the rest of the paper. The remaining parts of Theorems 1.5 and 1.7 are proved in Sections 6 and 7, and the proof of Theorem 1.9 is given in Section 8. In the final section 9 we formulate some open questions related to the results of this paper. 5

2. Unique expansions In this section we recall several results on unique expansions that will be used to prove our main theorems. Let {0,1} be the set of sequences (d i ) = d 1 d 2 with elements d i {0,1}. Let σ be the left shift on {0,1} defined by σ((d i )) := (d i+1 ). Then ({0,1},σ) is a full shift. Accordingly, let {0,1} denote the set of all finite strings of zeros and ones, called words, together with the empty word denoted by ǫ. For a word c = c 1 c m {0,1} we denote by c k = (c 1 c m ) k the k-fold concatenation of c with itself, and by c = (c 1 c m ) the periodic sequence with period block c. For a word c = c 1 c m we set if c m = 0, and c + := c 1 c m 1 (c m +1) c := c 1 c m 1 (c m 1) if c m = 1. The reflection of a word c = c 1 c m is defined by the formula c := (1 c 1 ) (1 c m ), and the reflection of a sequence (d i ) {0,1} is defined by (d i ) = (1 d 1 )(1 d 2 ). In this paper we use lexicographical orderings <,, > and between sequences and words. Given two sequences (c i ),(d i ) {0,1} we write (c i ) < (d i ) or (d i ) > (c i ) if there exists an n N such that c 1 c n 1 = d 1 d n 1 and c n < d n. Furthermore, we write (c i ) (d i ) or (d i ) (c i ) if (c i ) < (d i ) or (c i ) = (d i ). Finally, for two words u,v {0,1} we write u < v or v > u if u0 < v0. Now we recall some notations and results from unique expansions. Given a base q (1,2] we denote by β(q) = (β i (q)) the lexicographically largest (called greedy) expansion of 1 in base q. Accordingly, we denote by α(q) = α 1 (q)α 2 (q) the lexicographically largest infinite (called quasi-greedy) expansion of 1 in base q. Here an expansion is infinite if it has infinitely many one digits. If β(q) = β 1 (q) β n (q)0 with β n (q) = 1, then α(q) is periodic and α(q) = (β 1 (q) β n (q) ). The following Parry type property (see [25]) of α(q) was given in [1]: Lemma 2.1. The map q α(q) is a strictly increasing bijection from (1,2] onto the set of all infinite sequences (a i ) {0,1} satisfying a n+1 a n+2 a 1 a 2 whenever a n = 0. We recall that U q is the set of x [0,1/(q 1)] having a unique q-expansion. We denote by U q the set of expansions of all x U q. The following lexicographical characterization is a simple variant of another one given by Erdős et al. [10]. Lemma 2.2. Let q (1,2]. Then (c i ) U q if and only if c n+1 c n+2 < α(q) whenever c n = 0, c n+1 c n+2 < α(q) whenever c n = 1. Lemmas 2.1 and 2.2 imply that the set-valued map q U q is increasing, i.e., U p U q if p < q. We recall that V q is the set of x I q having at most one doubly infinite q-expansion. The following lexicographical characterization of V q was given in [7]. 6

Lemma 2.3. Let q (1,2]. Then x V q if and only if x has a q-expansion (c i ) satisfying c n+1 c n+2 α(q) whenever c n = 0, c n+1 c n+2 α(q) whenever c n = 1. Lemma 2.3 implies that V q is closed for any q (1,2]. Then using Lemma 2.2 we conclude that U q U q V q for every q (1,2]. Moreover, the difference set V q \ U q is at most countable. It might happen that V q = U q (see Lemma 2.8 below). For any n 1 let L n (U q ) be the set of length n subwords of sequences in U q, and let #A denote the cardinality of a set A. Then the topological entropy of U q is defined by h top (U q ) = lim log#l n (U q) = inf n n n 1 log#l n (U q). n The above limit exists for each q > 1 by [18, Lemma 2.1]. Moreover, the following lemma was proved in [18]: Lemma 2.4. The Hausdorff dimension of U q is given by dim H U q = h top(u q) logq for every q (1,2]. Furthermore, the dimension function D : q dim H U q has a Devil s staircase behavior: D is continuous, and has bounded variation in (1,2]; D < 0 almost everywhere in [q KL,2]; D(q) = 0 for all 1 < q q KL, and D(q) > 0 for all q > q KL. We recall that U is the set of bases q (1,2] in which 1 has a unique q-expansion, and V is the set of bases q (1,2] in which 1 has a unique doubly infinite q-expansion. The following lexicographical characterizations of U, its closure U and V are due to Komornik and Loreti [20] (see also, [9]). Lemma 2.5. (i) q U \{2} if and only if α(q) = (α i (q)) satisfies α(q) < α n+1 (q)α n+2 (q) < α(q) for all n 1. (ii) q U if and only if α(q) = (α i (q)) satisfies α(q) < α n+1 (q)α n+2 (q) α(q) for all n 1. (iii) q V if and only if α(q) = (α i (q)) satisfies α(q) α n+1 (q)α n+2 (q) α(q) for all n 1. (2.1) Example 2.6. For the first two elements of V we have α(ϕ) = (10) and α(q f ) = (1100). 7

By Lemma 2.5 it is clear that U U V. Furthermore, V is closed. In order to prove our main results we will also need the following topological properties of U,U and V (see [20]): Lemma 2.7. (i) U \U is a countable dense subset of U, and V \U is a discrete dense subset of V. (ii) For each q U \U there exists a sequence (p n ) in U that p n ր q as n. (iii) For each q U \ U the quasi-greedy expansion α(q) is periodic. (iv) For each q V \(U {ϕ}) there exists a word a 1 a m with m 2 such that where (a 1 a m ) satisfies (2.1). α(q) = (a 1 a + m a 1 a + m), Finally, we recall from [7] the following relation between the sets U,V,U q,u q and V q. Lemma 2.8. (i) U q is closed if and only if q (1,2]\U. (ii) U q = U q = V q if and only if q (1,2]\V. (iii) Let (r 1,r 2 ) be a connected component of (1,2]\V. Then U q = U r 2 for all q (r 1,r 2 ]. 3. Description of B 2 In this section we describe the set B 2 by using unique expansions. The following result is essentially equivalent to Theorem 1.1 (i): Lemma 3.1. A number q (1,2] belongs to B 2 if and only if there exist two sequences (c i ),(d i ) U q satisfying the equality (1(c i )) q = (0(d i )) q. (3.1) Proof. The sufficiency of the condition (3.1) is obvious. Conversely, assume that a real number x has exactly two q-expansions, say (a i ) and (b i ). Then, assuming by symmetry that (a i ) > (b i ) lexicographically, there exists a first index n such that a n b n. Then a n = 1, b n = 0, (a n+i ),(b n+i ) U q, and (3.1) is satisfied with (c i) = (a n+i ) and (d i ) = (b n+i ). For each q (1, 2] we define Each sequence (c i ) A q satisfies A q := { (c i ) U q : c 1 = 0 }. c n+1 c n+2 < α(q) for any n 0, and U q = c A q {c,c} by Lemma 2.2. In the following improvement of Lemma 3.1 we use only sequences from A q : 8

Lemma 3.2. A number q (1,2] belongs to B 2 if and only if q is a zero of the function for some c,d A q. f c,d (q) := (1c) q +(1d) q (1 ) q Proof. Let q (1,2]. Since U q = c A {c,c}, by Lemma 3.1 we have q B 2 if and only if q q satisfies one of the following equations for some c,d A q: (1c) q = (0d) q, (1c) q = (0d) q, (1c) q = (0d) q and (1c) q = (0d) q. It follows by reflection that the first and the forth equalities are equivalent. It remains to prove that the first and the third equalities never hold. Since d A q, by Lemma 2.2 we have (0d) q < (00α(q)) q < (10 ) q (1c) q. Similarly, (0d) q < (1c) q. This implies that q B 2 if and only if q is a zero of the function f c,d (q) = (1c) q (0d) q = (1c) q +(1d) q (1 ) q. In view of Lemma 3.2 we are led to investigate the functions f c,d for c,d A q. Lemma 3.3. Let q (1,2] and c,d A q. (i) The function f c,d is continuous and symmetric: f c,d = f d,c. (ii) If c A q and c > c, then f c,d > f c,d. (iii) If d A q and d > d, then f c, d > f c,d. (iv) f c,d (2) 0. Proof. (i) follows from the definition of f c,d, (ii) follows from the definition of f c,d and the property of unique expansions that (1 c) q > (1c) q for any c,c A q with c > c. (iii) follows from (i) and (ii). Finally, (iv) follows from (ii), (iii) and the equality f c,d (2) = (10 ) 2 +(10 ) 2 (1 ) 2 = 0 when c = d = 0 (the lexicographically smallest element of A q). Lemma 3.2 states that each q B 2 is a zero of the function f c,d for some c,d A q. We prove in our next lemma that no function f c,d with c,d A q can provide more than one element of B 2 [q,2]. Since B 2 (1,q f ) contains only one element by Theorem 1.1 (iv): the positive zero q s 1.71064 of q 4 2q 2 q 1, henceforth we restrict our attention to the set B 2 [q f,2]. Lemma 3.4. Let q [q f,2] and c,d A q. (i) If c 010 or d 010, then f c,d (q) > 0. (ii) If c 0 3 10 and d 0 2 10, or c 0 2 10 and d 0 3 10, then f c,d (q) > 0. 9

d 010 (i) 0 2 10 (ii) 0 3 10 (iii) 0 0 3 10 0 2 10 010 c Figure 1: Different cases of Lemma 3.4. (iii) In all other cases the function f c,d is strictly increasing in [q,2]. Proof. (i) Let q [q f,2]. Applying Lemma 2.2 we see that 0 is the lexicographically smallest element of A q and 010 / A q. In view of Lemma 3.3 it suffices to prove that This follows from the following computation: The last inequality holds because f c,d (q) 0 when c = 010 and d = 0. f c,d (q) = (1010 ) q +(10 ) q (1 ) = 2 q + 1 q 3 1 q 1 = q3 2q 2 +q 1 q 3 0. (q 1) q 3 2q 2 +q 1 q 3 f 2q2 f +q f 1 = 0. (ii) We recall that ϕ 3 1.83929 is the Tribonacci number, the positive zero of q 3 q 2 q 1. We distinguish the following two cases: (a) q [q f,ϕ 3 ] and (b) q [ϕ 3,2]. Case (a): q [q f,ϕ 3 ]. Since α(ϕ 3 ) = (110), by Lemma 2.1 we have α(q) (110). Then by Lemma 2.2 it follows that if c A q with c 0k 10 for some k 0, then c 0 k (100). In view of Lemma 3.3 it suffices to prove f c,d (q) > 0 when c = 0 3 (100) and d = 0 2 (100). This follows from the following observation: f c,d (q) = (10 3 (100) ) q +(10 2 (100) ) q (1 ) q = 2 q + 1 q 2 (q 3 1) + 1 q(q 3 1) 1 q 1 = q4 q 3 q 2 q +1 q 2 (q 3 1) > 0. 10

Here the last inequality follows by using the inequalities q 4 q 3 q 2 q +1 q 4 f q3 f q2 f q f +1 = 2 q f > 0. Case (b): q [ϕ 3,2]. By Lemma 3.3 it suffices to prove that This follows from the following computation: f c,d (q) > 0 when c = 0 3 10 and d = 0 2 10. f c,d (q) = (10 3 10 ) q +(10 2 10 ) q (1 ) q = 2 q + 1 q 4 + 1 q 5 1 q 1 = q5 2q 4 +q 2 1 q 5 (q 1) > 0. The last inequality follows by using q ϕ 3 and ϕ 3 3 = ϕ2 3 +ϕ 3 +1: q 5 2q 4 +q 2 1 ϕ 5 3 2ϕ 4 3 +ϕ 2 3 1 = ϕ 4 3 +ϕ 3 3 +2ϕ 2 3 1 = ϕ 2 3 ϕ 3 1 > 0. (iii) Let q [q f,2] and p 1,p 2 [q,2] with p 1 < p 2. We will prove the inequality f c,d (p 1 ) < f c,d (p 2 ) by distinguishing two cases again (see Figure 1). First case: c < 0 3 10 and d < 010, or c < 010 and d < 0 3 10. Observe that for any sequence (a i ) {0,1} and for any positive integer n the elementary inequality 0 (a 1 a 2 ) p1 (a 1 a 2 ) p2 (a 1 a n 1 ) p1 (a 1 a n 1 ) p2 (3.2) holds. By Lemma 3.3 it suffices to prove that Using (3.2) with n = 5 and n = 3 we get f c,d (p 1 ) < f c,d (p 2 ) when c 0 4 1 and d 0 2 1. f c,d (p 2 ) f c,d (p 1 ) = [(1c) p2 (1c) p1 ]+[(1d) p2 (1d) p1 ] [(1 ) p2 (1 ) p1 ] [(10 4 1 ) p2 (10 4 1 ) p1 ]+[(10 2 1 ) p2 (10 2 1 ) p1 ] [(1 ) p2 (1 ) p1 ] = [(10 4 1 ) p2 +(10 2 1 ) p2 (1 ) p2 ] [(10 4 1 ) p1 +(10 2 1 ) p1 (1 ) p1 ]. The required inequality f c,d (p 2 ) > f c,d (p 1 ) follows by observing that the function is strictly increasing in [q f,2]. g 1 (x) := (10 4 1 ) x +(10 2 1 ) x (1 ) x = x5 2x 4 +x 2 +1 x 5 (x 1) Second case: c < 0 2 10 and d < 0 2 10. Now using (3.2) with n = 4 we get, similarly to the first case, the inequality Note that the function f c,d (p 2 ) f c,d (p 1 ) [2(10 3 1 ) p2 (1 ) p2 ] [2(10 3 1 ) p1 (1 ) p1 ]. g 2 (x) := 2(10 3 1 ) x (1 ) x = x4 2x 3 +2 x 4 (x 1) is strictly increasing in [q f,2]. Therefore we conclude that f c,d (p 2 ) > f c,d (p 1 ). 11

Let q [q f,2] and set Ω q := { (c,d) A q A q : f c,d (q) 0 }. If (c,d) Ω q, then f c,d has a unique root in [q,2] by Lemmas 3.3 (iv) and 3.4, and this root, denoted by q c,d, belongs to B 2 by Lemma 3.2. We have B 2 [q,2] = p [q,2] { qc,d : (c,d) Ω } p. An element of B 2 [q f,2] may have multiple representations: see Remark 4.2 below. Lemma 3.5. Let q [q f,2]. (i) If (c,d),( c,d) Ω q and c > c, then q c,d < q c,d ; (ii) If (c,d),(c, d) Ω q and d > d, then q c, d < q c,d. Proof. By symmetry we only prove (i). Let (c,d),( c,d) Ω q with c > c. Applying Lemma 3.3 and using the definitions of q c,d,q c,d we have f c,d (q c,d ) = 0 = f c,d (q c,d ) = (1c) qc,d +(1d) qc,d (1 ) qc,d < (1 c) qc,d +(1d) qc,d (1 ) qc,d = f c,d (q c,d ). Since f c,d is strictly increasing in [q,2] by Lemma 3.4, we conclude that q c,d < q c,d. 4. Proof of Theorem 1.3, Theorem 1.5 (i)-(iv) and Theorem 1.7 (i)-(iii) We recall thatv is the set of basesq (1,2] in which1has a unique doubly infiniteq-expansion; equivalently, V = {q (1,2] : 1 V q }. In this section we show that V \{ϕ} B 2. Based on this observation we give new characterizations of B 2 (Theorem 1.3). We also show that B 2 is closed, V \ {ϕ} B (2) 2, and we conclude that the second smallest element q f of B 2 is also the smallest accumulation point of B 2 (Theorem 1.5). We recall that U is the set of univoque bases q (1,2] in which 1 has a unique q-expansion, i.e., U = {q (1,2] : 1 U q }. First we show that its topological closure U is a subset of B 2 : Lemma 4.1. We have U B 2, and even U B ( ) 2. Proof. Since U is a Cantor set and therefore U ( ) = U, it suffices to prove that U B 2. Furthermore, since U B 2 by Theorem 1.1, it suffices to prove that U \U B 2. Take q U \U arbitrarily. By Lemma 2.7 (iii) there exists a word a 1 a m such that α(q) = (a 1 a m ). Suppose that m is the smallest period of α(q). Then m 2, and the greedy q-expansion of 1 is given by β(q) = a 1 a + m 0. Observe that σ n (β(q)) < β(q) for all n 1 (cf. [25]). Then applying Lemma 2.5 (ii) it follows that a 1 a m i a i+1 a m < a i+1 a + m a 1 a m i for all 0 < i < m. (4.1) 12

Since q U \U, by Lemmas 2.1 and 2.7 (ii) there exists a p U (1,q) such that α 1 (p) α m (p) = α 1 (q) α m (q) = a 1 a m. (4.2) In fact we could find infinitely many p U (1,q) satisfying (4.2). Now we claim that c := a 1 a + mα 1 (p)α 2 (p) belongs to A q, where A q is the set of sequences in U q with a prefix 0. First we prove that c U q. Since p U (1,q), by Lemmas 2.1 and 2.5 (i) it follows that α(q) < α(p) σ n (α(p)) α(p) < α(q) for any n 0. Then by Lemma 2.2 it suffices to prove α(q) < σ i (c) < α(q) for any 0 < i < m. By (4.1) it follows that for any 0 < i < m we have a i+1 a + m < a i+1 a m a 1 a m i, which implies that σ i (c) < α(q) for any 0 < i < m. Furthermore, by (4.1) we have This, together with (4.2), implies that a i+1 a + m a 1 a m i and a 1 a i a m i+1 a m. σ i (c) = a i+1 a + mα 1 (p)α 2 (p) = a i+1 a + ma 1 a i α i+1 (p)α i+2 (p) a 1 a m α(p) > a 1 a m α(q) = α(q); the last equality holds because α(q) = (a 1 a m ). Therefore, c U q. Since a 1 = 0, we conclude that c A q. Now take d := 0 m α(p). Then by the above reasoning we also have d A q. In view of Lemma 3.2 the following calculation shows that q B 2 : f c,d (q) = (1c) q +(1d) q (1 ) q = (1a 1 a + mα(p)) q +(10 m α(p)) q (1 ) q = (2a 1 a + m1 ) q (1 ) q = (10 ) q (0a 1 a + m0 ) q = 0; the last equality holds because β(q) = a 1 a + m 0. Remark 4.2. The proof of Lemma 4.1 shows that each q U \ U B 2 has infinitely many representations, i.e., q = q c,d for infinitely many pairs (c,d) Ω q. The preceding lemma may be improved: Lemma 4.3. V \{ϕ} B 2. 13

Proof. By Lemma 4.1 it remains to prove that each q V \(U {ϕ}) belongs to B 2. Set { } V = (a i ) {0,1} : (a i ) (a n+i ) (a i ) for all n 1. (4.3) By Lemmas 2.5 (iii) and 2.7 (iv) there exists a block a 1 a m with m 2 such that α(q) = (a 1 a + m a 1 a + m) V and (a 1 a m ) V. We claim that belongs to A q. c = a 1 a + m(a 1 a m ) Since both α(q) = (a 1 a + m a 1 a + m) and (a 1 a m ) belong to V, we have and a i+1 a + m < a i+1 a m a 1 a m i a i+1 a + ma 1 a i a 1 a m i a m i+1 a m > a 1 a + m for all 0 < i < m. This implies the relations (a 1 a + ma 1 a + m) < σ i (c) < (a 1 a + ma 1 a + m) for all i > 0. Hence c U q. Since a 1 = 0, we conclude that c A q. Let d := 0 2m (a 1 a m ), then d A q. We complete the proof of q B 2 by showing that f c,d (q) = 0. This follows from the following computation: f c,d (q) = (1a 1 a + m(a 1 a m ) ) q +(10 2m (a 1 a m ) ) q (1 ) q = (2a 1 a + ma 1 a m 1 ) q (1 ) q = (10 ) q (0a 1 a + m a 1 a m 0 ) q = 0; the last equality holds because β(q) = a 1 a + ma 1 a m 0. We recall that U q is the set of x I q having a unique q-expansion, U q is its topological closure, and V q is the set of x I q having at most one doubly infinite q-expansion. We also recall that U q U q V q for all q (1,2]. Lemma 4.3 allows us to give new characterizations of B 2 : Proposition 4.4. Set C 2 := { q (1,2] : 1 U q U q } and D 2 := {q (1,2] : 1 V q V q }. Then B 2 = C 2 = D 2 \{ϕ}. Proof. We already know from Theorem 1.1 (i) that B 2 = {q (1,2] : 1 U q U q }. Since U q U q V q for all q (1,2], we have B 2 C 2 D 2. (4.4) 14

Since U q = U q for all q (1,2]\U by Lemma 2.8 (i), we infer from Lemma 4.1 that C 2 B 2 U = B 2. Combining this with (4.4) we conclude that C 2 = B 2. Next, since V q = U q for all q (1,2]\V by Lemma 2.8 (ii), using also Lemma 4.3 we obtain that D 2 B 2 V = B 2 {ϕ}. Observe that the condition 1 V q V q is satisfied for q = ϕ because 0,1 V ϕ. This implies that ϕ D 2. Combining this with (4.4) and ϕ / B 2 we conclude that B 2 = D 2 \{ϕ}. Lemma 4.5. B 2 is compact. Proof. SinceB 2 is bounded, it suffices to prove that its complement is open. Since by Theorem 1.1 (iv) that B 2 has a smallest point q s 1.71064, it suffices to show that (q s,2]\b 2 is a neighborhood of each of its points. Fix q (q s,2]\b 2 arbitrarily. Since ϕ 1.61803< q s, we have q / V by Lemma 4.3. Consider the connected component (r 1,r 2 ) of the open set (1,2)\V that contains q. Since q / U, by Lemma 2.8 (i) the set U q is compact, and hence U q U q is compact. Since by Theorem 1.1 (i) that q / B 2 is equivalent to 1 / U q U q, hence dist(1,u q U q ) > 0. By Lemma 2.8 (iii) we have U p = U q for all p (r 1,r 2 ). Therefore the sets U p depend continuously on p (r 1,r 2 ), and hence the inequality dist(1,u p U p ) > 0 remains valid in a small neighborhood G of q. Then 1 / U p U p, i.e., p / B 2 for all p G. Next we improve Lemma 4.3: each q V \{ϕ} is even an accumulation point of B 2. In fact, the following stronger result holds: Lemma 4.6. V \{ϕ} B (2) 2. Proof. In view of Lemma 4.1 it suffices to show that each q V \(U {ϕ}) belongs to B (2) 2. Take q V \(U {ϕ}) arbitrarily. By Lemma 2.7 there exists a word a 1 a m with m 2 such that α(q) = (a 1 a + m a 1 a + m) V and (a 1 a m ) V, where V is defined in (4.3). The proof of Lemma 4.3 shows that q = q c,d, where Set c = a 1 a + m(a 1 a m ) A q and d = 0 2m (a 1 a m ) A q. d k = 0 2m (a 1 a m ) k (a 1 a + ma 1 a + m), k = 1,2,... We claim that d k A p for all k 1 and p (q,2]. It suffices to prove that α(p) < σ i ((a 1 a m ) k (a 1 a + ma 1 a + m ) ) < α(p) for all i 0. (4.5) Since (a 1 a + ma 1 a + m) = α(q) V and α(p) > α(q), we infer from Lemmas 2.1 and 2.5 that α(p) < α(q) σ i ((a 1 a + ma 1 a + m) ) α(q) < α(p) for all i 0. 15

It remains to prove (4.5) for 0 i < mk. Since (a 1 a m ) V we have a 1 a + m < a i+1 a m a 1 a i < a 1 a + m for all 0 i < m, and this implies (4.5). We have shown that d k A p for all p > q and k 1. Since d k < d, using the equality α(q) = (a 1 a + m a 1 a + m) it follows that f c,dk (q) = (1c) q +(1d k ) q (1 ) q = (1c) q +(10 2m (a 1 a m ) k+1 0 ) q (1 ) q < (1c) q +(1d) q (1 ) q = f c,d (q) = 0. By Lemma 3.4 this implies that f c,dk has a unique root q c,dk in (q,2], and then it belongs to B 2. Since d k strictly increases to d as k, we conclude by Lemma 3.5 and continuity that q c,dk ց q as k. By the same argument as above we can also show that for each fixed k 1, q cl,d k B 2, and q cl,d k ր q c,dk as l, where c l := a 1 a + m(a 1 a m ) l (a 1 a + ma 1 a + m). Therefore q B (2) 2. Now we apply the above results to prove some theorems stated in the introduction: Proof of Theorem 1.3. We combine Proposition 4.4 and Theorem 1.1 (i). Proof of Theorem 1.5 (i)-(iv). (i)-(iii) were established in Lemmas 4.5, 4.3 and 4.6, respectively. (iv) We know that the smallest element q s of B 2 is isolated. The second smallest element q f of B 2 belongs to V (it is the smallest element in V after ϕ), hence it is the smallest accumulation point of B 2 by the preceding lemma. Indeed, q f 1.75488 satisfies qf 4 = q3 f + q2 f + 1. Hence α(q f ) = (1100), so that q f V \{ϕ} by Lemma 2.5. Theorem 1.5 (v)-(vi) will be proved in Section 7 below. Proof of Theorem 1.7 (i)-(iii). (i) and (ii) coincide with Lemmas 4.1 and 4.6, respectively. (iii) follows from Lemma 4.6 and Theorem 1.5 (iv). Theorem 1.7 (iv)-(vi) will be proved in Sections 6 and 7 below. 5. Explicit description of unique expansions In this section we give the detailed description of unique expansions. This will be used to investigate the derived sets B (j) 2 and B ( ) 2 in the next sections. We recall that U is a Cantor set, and its smallest element is the Komornik Loreti constant q KL. Furthermore, its complement is the union of countably many disjoint open intervals: (1,2]\U = (1,2)\U = (q 0,q0 ), (5.1) 16

where q 0 runs over {1} (U \ U) and q0 runs over a proper subset U of U, formed by the de Vries Komornik numbers. The first connected component is (1,q KL ). Each left endpoint q 0 is an algebraic integer, and each right endpoint q0 is a transcendental number. Since q 0 {1} (U \U), we have α(q 0 ) = (a 1 a m ) with a smallest periodic block a 1 a m satisfying a i a m a 1 a i 1 a 1 a + m and a i a + m a 1 a i 1 a 1 a + m (5.2) for all 0 < i m. This implies that β(q 0 ) = a 1 a + m0. Here we use the convention α(1) := 0 for q 0 = 1, although 0 is not a 1-expansion of 1. However β(1) = 10 is a 1-expansion of 1 in the natural sense. (We have not defined q-expansions for q = 1.) We will say that the interval (q 0,q0 ) is the connected component of (1,2] \ U generated by a 1 a m. In particular, the interval (1,q KL ) is called the connected component of (1,2] \ U generated by the word a 1 = 0. We recall that V is the set of bases q (1,2] such that 1 has a unique doubly infinite q- expansion, and that U V. Furthermore, for each connected component (q 0,q 0) of (1,2]\U, we have V (q 0,q 0) = {q n : n = 1,2,...}, where q 0 < q 1 < q 2 < < q0 and q n ր q0 as n. Therefore (q 0,q 0)\V = (q n,q n+1 ). Let (q 0,q 0) be the connected component of (1,2]\U generated by ω 0 = a 1 a m. We define a sequence of words recursively by the formulas ω 0 := a 1 a + m and For example, n=0 ω n+1 := ω n ω n +, n = 0,1,... ω 1 = a 1 a + m a 1 a m, and ω 2 = a 1 a + m a 1 a m a 1 a + ma 1 a + m. Observe that ω n is a word of length 2 n m. We recall from [20, 7, 9] the relations α(q n ) = (ω n ) = (ω n 1 ω n 1 ), and β(q n ) = ω n 0 (5.3) for all n = 0,1,... It follows that the infinite sequence α(q 0 ) = lim n α(q n ) begins with ω 0 ω 0 + ω 0 ω 0 ω 0 ω 0 ω 0ω 0 +. The construction shows that for q0 = q KL the quasi-greedy expansion α(q0 ) is the truncated Thue-Morse sequence (see Section 7). The main purpose of this section is to describe explicitly the difference sets U q \ U q 0 for all q (q 0,q 0] for any connected component (q 0,q 0) of (1,2]\U. We need the following result from [21]: Lemma 5.1. Let (q 0,q 0 ) be a connected component of (1,2]\U generated by ω 0, and let (c i) U q 0. If c l = 0 for some l 1 and c l+1 c l+2 k m = ω k for some k 0, then the next block of length 2 k m is c l+2k m+1 c l+2 k+1 m = ω k or c l+2k m+1 c l+2 k+1 m = ω k +. 17

Symmetrically, if c l = 1 for some l 1 and c l+1 c l+2 k m = ω k for some k 0, then the next block of length 2 k m is We also need [21, Lemma 4.2]: c l+2 k m+1 c l+2 k+1 m = ω k or c l+2 k m+1 c l+2 k+1 m = ω k. Lemma 5.2. Let (q 0,q0 ) be a connected component of (1,2]\U generated by ω 0. Then for any n 0 the word ω n = θ 1 θ 2n m satisfies for all 0 i < 2 n m. θ 1 θ 2n m i < θ i+1 θ 2n m θ 1 θ 2n m i Now we prove the main result of this section: Theorem 5.3. Let (q 0,q 0 ) be a connected component of (1,2]\U generated by ω 0. Then U q 0 \U q 0 is formed by the sequences of the form ω(ω 0 )j0 (ω k1 ω k1 ) j1 (ω k1 ω k2 ) s2 (ω k2 ω k2 ) j2 (ω k2 ω k3 ) s3 (5.4) and their reflections, where the word ω satisfies ω(ω k ) U q 0 for all k 0, and the indices k r, j r, s r satisfy the following conditions: 0 k 1 < k 2 < are integers; j r {0,1, } or j r = for each r; s r {0,1} for all r; j r = = s u = j u = 0 for all u > r. Remark 5.4. We may assume in Theorem 5.3 that s r +j r +s r+1 1 whenever r 2 and j r <. Indeed, in case s r +j r +s r+1 = 0 the word ω kr is missing, and we may renumber the blocks. Proof. First we show that each sequence in U q 0 \U q 0 or its reflection is of the form (5.4). or Fix (c i ) U q 0 \U q 0 arbitrarily. There exists a smallest integer N 1 such that c N = 0 and c N+1 c N+2 α(q 0 ) = (ω 0 ) (5.5) c N = 1, c N+1 c N+2 α(q 0 ) = (ω 0 + ). Since the reflection (c i ) of (c i ) also belongs to U q, we may assume that (5.5) holds. 0 Then setting ω 0 =: a 1...a m we have and for 0 < n < N we have c N+1 c N+m 1 = a 1 a m 1, (5.6) c n+1 c n+m a 1...a m if c n = 0, c n+1 c n+m a 1...a m if c n = 1. (5.7) Indeed, (5.6) follows from the relations α(q 0 ) c N+1 c N+2 < α(q 0 ), 18

because both α(q 0 ) and α(q 0 ) start with a 1 a m 1, while (5.7) follows from the minimality of N implying because α(q 0 ) begins with a 1...a m. c n+1 c n+2 < α(q 0 ) if c n = 0, c n+1 c n+2 > α(q 0 ) if c n = 1, We claim that the word ω = c 1 c N satisfies ω(ω k ) U q 0 for all k 0. Since (ω k ) U q 0 by Lemma 2.2, it suffices to prove for each 0 < n N the relations c n+1 c N (ω k ) < α(q 0 ) if c n = 0, c n+1 c N (ω k ) > α(q 0 ) if c n = 1. If n = N, then c N = 0 and (ω k ) = α(q k ) < α(q 0). Otherwise the relations follow from (5.7) because each (ω k ) begins with c N+1 c N+m 1 by (5.6), and α(q 0 ) begins with a 1...a m 1 a + m. If (c i ) = c 1 c N (ω0 ), then it is of the form (5.4). Otherwise there is a largest integer j 0 1 satisfying c N+1 c N+j0m = (ω0. Then by (5.5) and (c )j0 i ) U q we have 0 c N+j0m+1 c N+(j0+1)m = ω 0. Let k 1 0 be the largest integer such that c N+j0m+1 c N+j0m+2 k 1m = ω k1. Since c N+j0m = 0 and c N+j0m+1 c N+j0m+2 k 1m = ω k1, by Lemma 5.1 and the maximality of k 1 the next block of length 2 k1 m must be c N+j0m+2 k 1m+1 c N+j0m+2 k 1 +1 m = ω k1. Then Lemma 5.1 implies that the next block of length 2 k1 m is Hence or In the first subcase we either have c N+j0m+2 k 1 +1 m+1 c N+j0m+2 k 1 +1 m+2 k 1m = ω k1 or ω k 1. c N+j0m+1 c N+j0m+2 k 1 +1 m+2 k 1m = ω k1 ω k1 ω k1 c N+j0m+1 c N+j0m+2 k 1 +1 m+2 k 1m = ω k1 ω k1+1. c N+j0m+1c N+j0m+2 = (ω k1 ω k1 ), (5.8) or there exists a largest integer j 1 1 and a largest integer k 2 > k 1 such that c N+j0m+1 c N+j0m+j 12 k 1 +1 m+2 k 2m = (ω k1 ω k1 ) j1 ω k2. (5.9) In the second subcase there exists a largest integer k 2 > k 1 such that c N+j0m+1 c N+j0m+2 k 1m+2 k 2m = ω k1 ω k2. (5.10) Using (5.8) (5.10) we see that if (c u+i ) starts with ω k where k is the largest such index, then three possibilities may occur: (i) (c u+i ) = (ω k ω k ) ; (ii) (c u+i ) starts with (ω k ω k ) j k ω l for some j k 1 and a maximal l > k; 19

(iii) (c u+i ) starts with (ω k ω k ) j k ω k ω l for some j k 0 and a maximal l > k. Repeating the above reasoning in Subcase (ii) for sequences starting with ω l, we have three possibilities: (iia) (c u+i ) = (ω k ω k ) j k (ω l ω l ) for some j k 1; (iib) (c u+i ) starts with (ω k ω k ) j k (ω l ω l ) j l ω n for some j k 1,j l 1 and a maximal n > l; (iic) (c u+i ) starts with (ω k ω k ) j k (ω l ω l ) j l ω l ω n for some j k 1,j l 0 and a maximal n > l. Repeating the above reasoning in Subcase (iii) for sequences starting with ω l, we have three possibilities again: (iiia) (c u+i ) = (ω k ω k ) j k ω k (ω l ω l ) = (ω k ω k ) j k (ω k ω l )(ω l ω l ) ; (iiib) (c u+i ) starts with (ω k ω k ) j k ω k (ω l ω l ) j l ω n = (ω k ω k ) j k (ω k ω l )(ω l ω l ) j l 1 (ω l ω n ) for some j k 0,j l 1 and a maximal n > l; (iiic) (c u+i ) starts with (ω k ω k ) j k ω k (ω l ω l ) j l ω l ω n = (ω k ω k ) j k (ω k ω l )(ω l ω l ) j l ω n for some j k 0,j l 0 and a maximal n > l. Iterating this reasoning in subcases (iib), (iic), (iiib) and (iiic) we obtain eventually that (c i ) = c 1 c N (ω 0 )j0 (ω k1 ω k1 ) j1 (ω k1 ω k2 ) s2 (ω k2 ω k2 ) j2 (ω k2 ω k3 ) s3 with k r,j r,s r as specified in the statement of the theorem. Now we prove that, conversely, each sequence of the form (5.4) belongs to U q 0 \U q 0. Take a sequence (c i ) of form (5.4). By Lemma 2.2 it suffices to prove that c n+1 c n+2... < α(q 0 ) whenever c n = 0, c n+1 c n+2... > α(q 0 ) whenever c n = 1. (5.11) Write c 1...c N = ω and ω 0 = a 1...a m. We distinguish three cases. First case: 0 < n < N. Since (ω k ) is strictly increasing as k, there exists a large integer k such that c n+1 c n+2... c n+1...c N (ω k ) < α(q 0) if c n = 0, c n+1 c n+2... c n+1...c N (ω 0 ) > α(q 0 ) if c n = 1; the second inequality of each line follows from the relations ω(ω k ) U q 0 for all k 0. Second case: N n < N +j 0 m. Writing ω 0 =: a 1...a m again, we observe that c N+j0m+1 c N+j0m+m = ω 0 = a 1...a + m, and therefore c n+1 c n+m = a i+1...a m a 1...a i for some 0 i < m. (5.12) We infer from Lemma 5.2 that a 1...a m i a i+1...a m < a 1...a m i for all 0 < i < m. 20

Hence and a i+1...a m a 1...a i < a 1...a + m = ω 0 for all 0 i < m a i+1...a m a 1...a i a 1...a m > a 1...a + m = ω 0 for all 0 < i < m. Since α(q 0) begins with ω 0, in view of (5.12) they imply (5.11). Third case: n N + j 0 m. Write ω k := θ 1 θ 2 k m for k = 0,1,... By definition ω k is a prefix of α(q 0) for all k 0. By Lemma 5.2 the following strict inequalities hold for all k 0 and 0 < i 2 k m: θ i+1 θ 2 k mθ 1 θ i < θ 1 θ 2 k m and θ i+1 θ 2 k m > θ 1 θ 2 k m i. Since ω k is a prefix of ω l whenever k < l, it follows that c n+1 c n+2... satisfies (5.11). Furthermore, we note that (ω0 ) / U q 0 and that the words ω k are forbidden in U q 0 for all k 0. We conclude that all sequences of the form (5.4) belong to U q 0 \U q 0. By symmetry this completes the proof. Now we recall that A q is the set of sequences (c i ) U q with c 1 = 0. Let (q 0,q 0) be a connected component of (1,2]\U generated by ω 0 and write (q 0,q 0 ) V = {q n : n 1} as above. Then for each n 0 we have α(q n ) = (ω n) = (ω n 1 ω n 1 ). We are going to describe A q \A q 0 for any q (q n,q n+1 ]. This is based on the following lemma: Lemma 5.5. Let (q 0,q 0 ) be a connected component of (1,2] \ U generated by ω 0 = a 1...a m. Suppose (q 0,q 0) V = {q n : n 1}. Then for any q (q n,q n+1 ] the words ω n and its reflection ω n are forbidden in the language of U q. Proof. Since U q is reflection invariant, it suffices to prove that ω n is forbidden. Assume on the contrary that there exists a sequence (c i ) U q with c N+1 c N+2n m = ω n. Since α(q) α(q n+1 ) = (ω n ω n ), it follows that c N = 0, and then c N+1 c N+2 < (ω n ω n ) by Lemma 2.2. This implies that c N+2 n m+1 c N+2 n+1 m ω n. (5.13) On the other hand, since c N+2 n m = 1, we have c N+2 n m+1 c N+2 n+1 m > (ω n ω n ) by Lemma 2.2. Combining with (5.13) this yields that c N+2n m+1 c N+2 n+1 m = ω n. A similar argument shows that if c u+1 c u+2n m = ω n, then the next block of length 2 n m is ω n. Iterating the above reasoning we conclude that if (c i ) has a word ω n then it will eventually end with (ω n ω n ) = α(q n+1 ). This contradicts our initial assumption (c i ) U q. Theorem 5.3 and Lemma 5.5 imply the following Corollary 5.6. Let (q 0,q0 ) be a connected component of (1,2] \ U generated by ω 0, and let (q 0,q0) V = {q n : n 1} with q 1 < q 2 <. If q (q n,q n+1 ] for some n 1, then all elements of A q \A q 0 are given by ω(ω 0 )j0 (ω k1 ω k1 ) j1 (ω k1 ω k2 ) s2 (ω k2 ω k2 ) j2 (ω km 1 ω km ) sm (ω km ω km ) jm, where the nonempty word ω satisfies ω(ω k ) A q for all 0 k < n, and 0 k 1 < k 2 < k 3 < < k m < n are integers; j r {0,1, } for r = 0,...,m 1, and j m = ; s r {0,1} for r = 2,...,m. 21

Remark 5.7. We emphasize that the initial word ω cannot be empty. For otherwise the corresponding sequence might begin with the digit 1 for j 0 = 0, while the sequences in A q start with 0. If (q 0,q 0 ) = (1,q KL), then the initial word ω is simply of the form 0 j because (ω 0 ) = 0. 6. Proof of Theorem 1.7 (iv) Based on the results of the preceding section, in this section we investigate the derived sets B (1) 2,B(2) 2,... Since U B ( ) 2 by Lemma 4.1, it suffices to investigate the derived sets B (j) 2 in each connected component (q 0,q0 ) of (1,2]\U. In the following we consider an arbitrary connected component (q 0,q0) of (1,2]\U generated by ω0 = a 1 a m satisfying (5.2), and we write (q 0,q0 ) V = {q n : n 1} with q 1 < q 2 < as usual, so that (q 0,q0) = (q n,q n+1 ]. n=0 By Corollary 5.6 and Lemma 3.2 for each q (q n,q n+1 ] B 2 there exist two words ω, ω satisfying ω(ω k ), ω(ω k ) A q for all 0 k < n, and a pair of vectors (k,s,j) and ( k, s, j) satisfying the statements in Corollary 5.6 such that q = q ω,k,s,j; ω, k, s, j with an obvious notation. We mention that a q B 2 may have multiple representations (see Remark 4.2). We have the following result: Lemma 6.1. Let (q 0,q 0) be a connected component of (1,2]\U generated by ω 0 and write (q 0,q 0) V = {q n : n 1} with q 1 < q 2 <. Suppose q = q ω,k,s,j; ω, k, s, j B 2 (q n,q n+1 ] for some n 0, where the words ω, ω satisfy ω(ω k ) A q, ω(ω k ) A q for all 0 k < n, and the vectors (k,s,j) = (k 1,...,k m1 ;s 2,...,s m1 ;j 0,,j m1 1, ), ( k, s, j) = ( k 1,..., k m2 ; s 2,..., s m2 ; j 0,, j m2 1, ) satisfy for some j 0 the conditions m 1 0, m 2 0 and 0 (k m1 +1)+( k m2 +1) 2n j. (Here we use the convention that k m1 := 1 if m 1 = 0 and k m2 = 1 if m 2 = 0.) Then q (B 2 (q n,q n+1 ]) (j). Moreover, in case j 1 and q B (j) 2 (q n,q n+1 ) then there exist two sequences (p u ),(r u ) in B (j 1) 2 (q n,q n+1 ) such that p u ր q and r u ց q as u. Proof. For j = 0 the lemma follows from Corollary 5.6 and Lemma 3.2. Proceeding by induction on j, assume that the assertion is true for some 0 j < 2n, and consider j +1. 22

Take a point q ω,k,s,j; ω, k, s, j B 2 (q n,q n+1 ] such that ω(ω k ), ω(ω k ) A q for all 0 k < n, and satisfy (k,s,j) = (k 1,...,k m1 ;s 2,...,s m1 ;j 0,,j m1 1, ), ( k, s, j) = ( k 1,..., k m2 ; s 2,..., s m2 ; j 0,, j m2 1, ) 0 (k m1 +1)+( k m2 +1) 2n (j +1). (6.1) We will show that q ω,k,s,j; ω, k, s, j (B 2 (q n,q n+1 ]) (j+1) by distinguishing the cases q ω,k,s,j; ω, k, s, j (q n,q n+1 ) and q ω,k,s,j; ω, k, s, j = q n+1. First case: q ω,k,s,j; ω, k, s, j (q n,q n+1 ). Since 1 k m1 n 1 and 1 k m2 n 1, (6.1) implies that k m1 < n 1 or k m2 < n 1. Without loss of generality we assume k m1 < n 1, and we consider for each u 1 the vectors and (k +,s,j u ) := (k 1,...,k m1,k m1 +1;s 2,...,s m1,0;j 0,,j m1 1,u, ) (k +,s +,j u ) := (k 1,...,k m1,k m1 +1;s 2,...,s m1,1;j 0,,j m1 1,u, ). Applying the induction hypothesis, it follows by continuity that for all sufficiently large u. Writing q ω,k+,s,j u; ω, k, s, j, q ω,k +,s +,j u; ω, k, s, j B(j) 2 (q n,q n+1 ). ω k,s,j := (ω 0 )j0 (ω k1 ω k1 ) j1 (ω k1 ω k2 ) s2 (ω k2 ω k2 ) j2 (ω km1 1ω km1 ) sm 1 (ωkm1 ω km1 ), ω k+,s,j u := (ω 0 )j0 (ω k1 ω k1 ) j1 (ω k1 ω k2 ) s2 (ω k2 ω k2 ) j2 ω k+,s +,j u := (ω 0 )j0 (ω k1 ω k1 ) j1 (ω k1 ω k2 ) s2 (ω k2 ω k2 ) j2 for convenience, we have and (ω km1 1ω km1 ) sm 1 (ωkm1 ω km1 ) u (ω km1 +1ω km1 +1), (ω km1 1ω km1 ) sm 1 (ωkm1 ω km1 ) u (ω km1 ω km1 +1)(ω km1 +1ω km1 +1) ω k+,s,j 1 > ω k+,s,j 2 > ω k+,s,j 3 > > ω k,s,j ω k+,s +,j 1 < ω k+,s +,j 2 < ω k+,s +,j 3 < < ω k,s,j. Therefore, using Lemma 3.5 we obtain that for sufficiently large u the sequences belong to B (j) 2 (q n,q n+1 ) and (p u ) := (q ω,k +,s,j u; ω, k, s, j ) and (r u) := (q ω,k +,s +,j u; ω, k, s, j ) p u ր q ω,k,s,j; ω, k, s, j, r u ց q ω,k,s,j; ω, k, s, j. In particular, q ω,k,s,j; ω, k, s, j (B 2 (q n,q n+1 ]) (j+1). Second case: q ω,k,s,j; ω, k, s, j = q n+1. We obtain similarly to the preceding case that there exists a sequence (p u ) (B 2 (q n,q n+1 ]) (j) satisfying p u ր q ω,k,s,j; ω, k, s, j as u. Therefore, q ω,k,s,j; ω, k, s, j (B 2 (q n,q n+1 ]) (j+1) as required. 23

Proposition 6.2. Let (q 0,q 0 ) be a connected component of (1,2]\U generated by ω 0 = a 1...a m and write (q 0,q 0) V = {q n : n 1} with q 1 < q 2 <. Then B (n) 2 (q n,q n+1 ) for all n 2. Remark 6.3. The assumption n 2 cannot be omitted. Indeed, for (q 0,q 0 ) = (1,q KL) we know that B 2 (q 0,q 2 ) = {q s }. Since q s > q 1, this implies that B 2 (q 0,q 1 ) = B (1) 2 (q 1,q 2 ) =. Proof. Let n 2, and set and ω = 0 2nm ω 0, ω = ω 0, (k,s,j) = (0; ;1, ), ( k, s, j) = (0,1,...,n 2;0,...,0;1,...,1, ). Note thatω 0 = a 1 a + m. Takeq (q n,q n+1 ) withn 2. Thenα(q) begins witha 1...a + m a 1...a m. Pick 0 k < n. Using Lemma 5.2 we see that σ i (a 1 a + m(ω k ) ) < a 1 a + ma 1 a m... = α(q) and σ i (a 1 a + m(ω k ) ) > a 1 a + ma 1 a m... = α(q) for all i 0. Hence ω 0 (ω k ) A q, and therefore ω(ω k ), ω(ω k ) A q follows from Corollary 5.6 that the sequences for all 0 k < n. It c := ωω k,s,j = 0 2nm ω 0 ω 0 (ω 0ω 0 ) and d := ωω k, s, j = ω 0 ω 0 (ω 0ω 0 ) (ω n 3 ω n 3 )(ω n 2 ω n 2 ) also belong to A q. We are going to prove that f c,d(q n ) < 0 and f c,d (q n+1 ) > 0. It will then follow by Lemmas 3.2 and 3.4 that f c,d has a (unique) zero q ω,k,s,j; ω, k, s, j in (q n,q n+1 ), and then Lemma 6.1 will imply that q ω,k,s,j; ω, k, s, j B (n) 2 (q n,q n+1 ). It remains to prove the two inequalities. Since ω 0 ω0 = ω 1 and ω k ω k = ω k+1 for all k 0, we have f c,d (q) = (1c) q (0d) q = (10 2nm ω 0 ω 0 (ω 0ω 0 ) ) q (0ω 0 ω 0 + (ω 0 ω 0 ) (ω n 3 ω n 3 )(ω n 2 ω n 2 ) ) q = (10 2nm ω 1 (ω 1 ) ) q (0ω 1 ω 1 + ω 2+ ω n 2 + (ω n 1 + ) ) q.. (6.2) = (10 2nm ω 1 (ω 1 ) ) q (0ω n (ω n 1 + ) ) q for all q. Since (ω n 0 ) qn = 1 and the word ω n is of length 2 n m, we infer from (6.2) that f c,d (q n ) = (0 2n m+1 ω 1 (ω 1 ) ) qn (0 2n m+1 (ω n 1 + ) ) qn < 0, because ω 1 (ω 1 ) < (ω n 1 + ) 24

for all n 2. Indeed, (ω + n 1 ) starts with ω + 1 > ω 1 if n = 2, ω 1 ω 1 > ω 1 ω1 if n = 3, ω 1 ω1 ω 1 > ω 1 (ω1 )2 if n 4. Next we observe that (ω n ω + n 0 ) qn+1 = 1. Therefore, using (6.2) we have and hence f c,d (q n+1 ) = (10 2nm ω 1 (ω 1 ) ) qn+1 (0ω n (ω n 1 + ) ) qn+1 We observe that If n 3, then so that = (0 2n m+1 ω 1 (ω 1 ) ) qn+1 +(0 2n m+1 ω n + 0 ) qn+1 (0 2n m+1 (ω n 1 + ) ) qn+1 = q 2n m 1 [(ω 1 (ω 1 ) ) qn+1 +(ω n + 0 ) qn+1 ((ω n 1 + ) ) qn+1 ]. and thus f c,d (q n+1 ) > 0 as required. (ω n 1 + ) = (ω n 2 ω n 2 ) = ω n 2 (ω n 1 ) < ω n 2 + 0 ω n + 0 = ω n 2 ω n 2 ω n 2ω n 2 + 0 ; (ω n 1 + ) < ω n + 0 +0 2n 2 m 1 10. 0 2n 2 m 1 10 ω 1 (ω 1 ), (6.3) ((ω n 1 + ) ) qn+1 < (ω 1 (ω 1 ) ) qn+1 +(ω n + 0 ) qn+1, (6.4) The relation (6.3) and hence the proof of f c,d (q n+1 ) > 0 remains valid if n = 2 and ω 0 contains at least one zero digit. In the remaining case we have n = 2 and for some m 1. If m 2, then ω 0 = 1 m, ω 1 = 1 m 0 m 1 1, ω 2 = 1 m 0 m 1 10 m 1 m (ω 1 (ω 1 ) ) q3 +(ω 2 + 0 ) q3 = ((0 m 1 m 1 0(1 m 0 m ) ) q3 +(0 m 1 m 1 01 m 0 m 1 10 ) q3 so that (6.4) holds again. (0 m 10 ) q3 +(0 m 10 ) q3 > (0 m 1 10 ) q3 > ((0 m 1 m ) ) q3 = ((ω 1 + ) ) q3, Finally, if m = 1, then (6.4) takes the form This is equivalent to ((01) ) q3 < (00(10) ) q3 +(00110 ) q3. q 3 3 < (q 3 +1) 2, and this holds because the unique positive root of the polynomial x 3 (x+1) 2 is greater than 2. 25