1 Introduction

By a Cantor set we mean a nonempty, compact, perfect and nowhere dense subset of the real line. Cantor sets appear in several publications in many different settings. They occur in mathematical models involving fractals, iterated functional systems and fractional measures [12]. They play a role in number theory (e.g. in b-ary number representations, and in connection with continued fractions [16]). They are rooted in dynamical systems in the study of homoclinic bifurcations [27], in signal processes and ergodic theory, and also in limit theorems from probability, as it is stated in [28]. Finally, let us mention the applications in spectral theory [11, 33]. Important results describe geometrical properties of Cantor sets via Hausdorff and packing measures and the respective fractal dimensions, and multifractal spectrum [3, 10, 15, 17]. Also, several authors conducted extensive studies on the arithmetic sums [1, 24, 34] and products [32] of two Cantor sets, and their intersections [19, 21]. See also the recent results on Furstenberg’s famous intersection conjecture [18, 31, 36].

In our paper we consider central Cantor sets \(C\left( \lambda \right) \), which we define using a sequence \(\lambda =\left( \lambda _{n}\right) \in \left( 0,\frac{1}{2}\right) ^{\mathbb {N}}\). These are Cantor sets such that the ratio of measures of the intervals defined in subsequent steps of the construction is equal to \(\lambda _{n}\) (for the Cantor ternary set, \(\lambda _{n}\equiv \frac{1}{3}\)). We are interested in properties of the difference set \(C(\lambda )-C(\lambda )\). Several authors examined sums and differences of Cantor sets (beside the papers mentioned before, see also [2, 22, 29, 30]). Considerations about sums and differences of central Cantor sets were often based on the relationship between central Cantor sets and the achievement sets, i.e. the sets of all subsums of convergent series (see Proposition 4.1). By a subsum of a convergent series we mean the sum of the series obtained from the given series by considering the indices belonging to a set \(A\subset \mathbb N\).

The study of topological properties of the sets of subsums of series has a long history. The first papers on this topic were written over a hundred years ago. In 1914 Kakeya [20] proved that if \(x_{n}>\sum _{j=n+1}^{ \infty }x_{j}\) for any n, then the set \(E\left( x\right) \) of all subsums of a series \(\sum _{j=1}^{\infty }x_{j}\) of positive numbers is a Cantor set. He also showed that \(E\left( x\right) \) is a finite union of closed intervals if and only if \(x_{n}\le \sum _{j=n+1}^{\infty }x_{j}\) for sufficiently large n’s. Kakeya conjectured that the set \(E\left( x\right) \) is either a Cantor set or a finite union of closed intervals. The first examples showing that this hypothesis is false appeared in the papers by Weinstein and Shapiro [35], and by Ferens [13]. Guthrie and Nymann [14] formulated the theorem that \(E\left( x\right) \) is either a Cantor set or a finite union of closed intervals or a Cantorval (compare also [26]). Nice descriptions of these problems can be found in [25] and [8]. Recently, there have appeared a lot of interesting papers that explore properties of achievement sets, i.e. [5,6,7, 9, 23, 29]. Recall the notion of a Cantorval. We say that a non-empty perfect subset C of \(\mathbb {R}\) is a Cantorval, if any gap in C (that is, connected and bounded component of \(\mathbb R{\setminus } C\)) is accumulated on both sides by gaps and by proper components of C (see [24]).

Based on results of sets of subsums of series, Anisca and Ilie in [2] proved that a finite sum of central Cantor sets is either a Cantor set or a finite union of closed intervals, or a Cantorval. In particular, the set \(C(\lambda )-C(\lambda )\) has this property (compare Theorem 2.2). Moreover, \(C(\lambda )-C(\lambda )\) is a finite union of closed intervals if and only if \(\lambda _{n}\ge \frac{1}{3}\) for sufficiently large n’s (see Theorem 2.3). A main goal of our paper is to find conditions which imply that the difference set \(C\left( \lambda \right) -C\left( \lambda \right) \) is a Cantorval. We examine sets \(C\left( \lambda \right) -C\left( \lambda \right) \) for the sequences such that \(\lambda _{n}< \frac{1}{3}\) for infinitely many terms and \(\lambda _{n}\ge \frac{1}{3}\) for infinitely many terms. The main result is contained in Theorem 3.2 where we have obtained a sufficient condition for the set \(C\left( \lambda \right) -C\left( \lambda \right) \) to be a Cantorval. This theorem gives also a formula for the measure of such a Cantorval (written as the sum of the series) and some information about its interior. The proof of the theorem is based on the properties resulting from the construction of central Cantor sets and it does not use methods related to the study of achievement sets. However, we use relationships between central Cantor sets and achievement sets in Theorem 4.5 describing the sets that meet the assumptions of Theorem 3.2. We give an easy formula for sequences, which achievement sets are rescaled central Cantor sets satisfying the assumptions of Theorem 3.2. We also show that the algebraic sum of four copies of such Cantor sets is a closed interval. In Theorem 4.6 we prove that the measure of Cantorvals, which are the difference sets of these achievement sets is always equal to 3. As a corollary in Proposition 4.8 we get an easy formula for the measure of some of the Cantorvals that can be obtained by using Theorem 3.2.

The paper is organized as follows. Section 2 contains basic preliminaries on central Cantor sets and their differences sets. Section 3 introduces additional technical tools and presents main theorems, including Theorem 3.2 and its possibile reformulations. Section 4 deals with application of Theorem 3.2 to the achievements sets of fast convergent series. The proofs of the main theorems have been postponed to the last Sect. 5.

2 Preliminaries

Let us introduce basic notation. For \(A,B\subset \mathbb {R}\) we denote by \(A\pm B\) the set \(\left\{ a\pm b:a\in A,\,b\in B\right\} \). The set \(A-A\) is called the difference set of A. The Lebesgue measure of a measurable set A is denoted by \( \left| A\right| \). By \(l\left( I\right) \), \(r\left( I\right) \) and \( c\left( I\right) \) we denote the left endpoint, the right endpoint and the center of a bounded interval I, respectively. The sequence \((i,\dots ,i)\) with n terms is denoted by \(i^{(n)}\). By t|n we denote the sequence consisting of the first n terms of a given sequence t. If \(t|n=s\), we say that t is an extension of s and write \(s\prec t\). To denote the concatenation of two sequences t and s, we write .

The construction of a central Cantor subset of [0, 1] is the following (see [4]).

Let \(\lambda =\left( \lambda _{n}\right) \) be a sequence such that \(\lambda _{n}\in \left( 0,\frac{1}{2}\right) \) for any \(n\in \mathbb {N}\). Let \(I:=\left[ 0,1\right] \) and P be the open interval such that \(c\left( P\right) =c\left( I\right) \) and \(\left| P\right| =\left( 1-2\lambda _{1}\right) \left| I\right| \). We define inductively intervals \(P_t\) and \(I_t\) indexed by finite sequences \(t=(t_1,\dots ,t_n)\), \(n\in \mathbb N\), of zeros and ones, as follows. The left and the right components of \( I{\setminus } P\) are denoted by \(I_{0}\) and \(I_{1}\), we write \(d_{1}:=\left| I_{0}\right| =\left| I_{1}\right| \), and we define open intervals, of length \(\left( 1-2\lambda _{2}\right) d_{1}\), that are concentric with \(I_{0}\) and \(I_{1}\) as \(P_{0}\) and \( P_{1}\), respectively. In general, \( I_{t_{1},\dots ,t_{n},0}\) and \(I_{t_{1},\dots ,t_{n},1}\) are the left and the right components of the set \(I_{t_{1},\dots ,t_{n}}{\setminus } P_{t_{1},\dots ,t_{n}}\), \(d_{n+1}\) is the length of each of these components, and \(P_{t_{1},\dots ,t_{n},0}\) and \(P_{t_{1},\dots ,t_{n},1}\) are open intervals of length \(\left( 1-2\lambda _{n+2}\right) d_{n+1}\), concentric with \(I_{t_{1},\dots ,t_{n},0}\) and \(I_{t_{1},\dots ,t_{n},1}\), respectively.

From the construction it follows that the length of each interval \( I_{t_{1},\dots ,t_{n}}\) is equal to

$$\begin{aligned} d_{n}=\lambda _{1}\cdot \ldots \cdot \lambda _{n}. \end{aligned}$$

Denote \(C_{n}(\lambda ):=\bigcup _{(t_{1},\dots ,t_{n})\in \{0,1\}^{n}}I_{t_{1},\dots ,t_{n}}\) and \(C(\lambda ):=\bigcap _{n\in \mathbb {N }}C_{n}(\lambda )\). Then, \(C(\lambda )\) is called a central Cantor set.

Now, we introduce the family of itervals \(J_s\) indexed by finite sequences \(s=(s_1,\dots , s_n)\), \(n\in \mathbb N\), with \(s_i\in \{0,1,2\}\) (these intervals will play an important role in our main theorems). Let \(J:=I-I=\left[ -1,1\right] \). For fixed \(n\in \mathbb {N}\) and \(s\in \left\{ 0,1,2\right\} ^{n}\) we define the interval \(J_{s}\) by \( J_{s}:=I_{t}-I_{p}\), where \(p,t\in \left\{ 0,1\right\} ^{n}\) satisfy \( s_{i}=t_{i}-p_{i}+1\) for \(i=1,\ldots ,n\). Observe that the definition of \( J_{s}\) does not depend on the choice of \(p\ \)and t. Indeed, for \(n=1\) we have \(J_{0}=I_{0}-I_{1}=\left[ -1,-1+2d_{1}\right] \), \( J_{1}=I_{0}-I_{0}=I_{1}-I_{1}=\left[ -d_{1},d_{1}\right] \) and \( J_{2}=I_{1}-I_{0}=\left[ 1-2d_{1},1\right] \). For \(n\in \mathbb {N}\), \(s\in \left\{ 0,1,2\right\} ^{n}\) and \(p,t\in \left\{ 0,1\right\} ^{n}\) such that \( J_{s}=I_{t}-I_{p}\), we have

which proves that intervals \(J_{s}\) are well defined.

Let \(n\in \mathbb {N}\), \(s\in \left\{ 0,1,2\right\} ^{n}\), and \(\lambda \in \left( 0,\frac{1}{2}\right) ^{\mathbb {N}}\). If \(\lambda _{n+1}<\frac{1}{3}\), then the set is a union of two open intervals. We denote them by \(G_{s}^{0}\) and \(G_{s}^{1}\), and call the left and the right gap in \(J_{s}\). If \(\lambda _{n+1}\ge \frac{1}{3}\), then and . We denote these intervals by \( Z_{s}^{0}\) and \(Z_{s}^{1}\), and we call them the left and the right overlap in \(J_{s}\). We also assume that \(d_{0}:=\left| I\right| =1\) and that \(\left\{ 0,1,2\right\} ^{0}\) contains only the empty sequence \(s=\emptyset \). For \(s\in \left\{ 0,1,2\right\} ^{n}\) (\(n\in \mathbb {N}\)) we define the numbers

$$\begin{aligned} N\left( s,0\right) :=\max \left\{ j:s_{j}>0\right\} \text { and }N\left( s,1\right) :=\max \left\{ j:s_{j}<2\right\} , \end{aligned}$$

where \(\max \emptyset :=0\). From the above definitions we conclude the following easy properties.

Proposition 2.1

Let \(n,k\in \mathbb {N}\), \(s,u\in \left\{ 0,1,2\right\} ^{n}\), and \( \lambda \in \left( 0,\frac{1}{2}\right) ^{\mathbb {N}}\). The following properties hold.

  1. (1)

    \(\left| J_{s}\right| =2d_{n}.\)

  2. (2)

    , and

  3. (3)

    If \(n>k\), then \(d_{n-1}-d_{n}<d_{k-1}-d_{k}\).

  4. (4)

    \(l\left( J_{s}\right) -l\left( J_{u}\right) =c\left( J_{s}\right) -c\left( J_{u}\right) =r\left( J_{s}\right) -r\left( J_{u}\right) =\sum _{r=1}^{n}\left( s_{r}-u_{r}\right) \cdot \left( d_{r-1}-d_{r}\right) .\)

  5. (5)

    If , , and

  6. (6)

    If \(\lambda _{n+1}\ge \frac{1}{3}\), then , , and

  7. (7)

    \(C_{n}\left( \lambda \right) -C_{n}\left( \lambda \right) =\bigcup _{t\in \left\{ 0,1,2\right\} ^{n}}J_{t}.\)

  8. (8)

    If \(\lambda _{n+1}\ge \frac{1}{3},\ldots ,\lambda _{n+k}\ge \frac{1}{3}\), then \(J_{s}=\bigcup _{t\in \left\{ 0,1,2\right\} ^{n+k},s\prec t}J_{t}\) and \(C_{n}\left( \lambda \right) -C_{n}\left( \lambda \right) =C_{n+k}\left( \lambda \right) -C_{n+k}\left( \lambda \right) \).

  9. (9)

    \(C(\lambda )-C(\lambda )=\bigcap _{n\in \mathbb {N} }(C_{n}(\lambda )-C_{n}(\lambda ))\).

  10. (10)

    \(C(\lambda )+C(\lambda )=\left( C(\lambda )-C(\lambda )\right) +1\).

Proof

Conditions (1)–(2), (5)–(6) and the equality \(l\left( J_{s}\right) -l\left( J_{u}\right) =c\left( J_{s}\right) -c\left( J_{u}\right) =r\left( J_{s}\right) -r\left( J_{u}\right) \) are obvious. Since \(\lambda _{n}<\frac{1}{2}\), we have \( d_{n-1}-d_{n}>d_{n}>d_{n}-d_{n+1}\), which implies (3). If \(t\in \left\{ 0,1,2\right\} ^{r}\), where \(r\in \mathbb {N}\cup \left\{ \emptyset \right\} \), then

Hence by induction we get \(c\left( J_{s}\right) =\sum _{r=1}^{n}(s_{r}-1)\cdot \left( d_{r-1}-d_{r}\right) \), which gives (4). From the equality

$$\begin{aligned} C_{n}(\lambda )-C_{n}(\lambda )=\bigcup _{p\in \{0,1\}^{n}}I_{p}-\bigcup _{q\in \{0,1\}^{n}}I_{q}=\bigcup _{p,q\in \{0,1\}^{n}}(I_{p}-I_{q})=\bigcup _{t\in \{0,1,2\}^{n}}J_{t} \end{aligned}$$

we obtain (7). If \(\lambda _{n+1}\ge \frac{1}{3}\), then by (6), we have . Consequently, \(J_{s}=\bigcup _{t\in \left\{ 0,1,2\right\} ^{n+1},s\prec t}J_{t}\), which implies (8). To prove (9) it is enough to show that for any nonincreasing sequences \((A_{n})\) and \( (B_{n}) \) of compact subsets of \(\mathbb {R}\),

$$\begin{aligned} \bigcap _{n=1}^{\infty }A_{n}-\bigcap _{n=1}^{\infty }B_{n}=\bigcap _{n=1}^{\infty }(A_{n}-B_{n}). \end{aligned}$$

The inclusion “\(\subset \)” is clear. Let \(x\in \bigcap _{n=1}^{\infty }(A_{n}-B_{n}).\) Then, for any \(n\in \mathbb {N}\) we have \(x=\alpha _{n}-\beta _{n}\), where \(\alpha _{n}\in A_{n}\) and \(\beta _{n}\in B_{n}\). Pick subsequences \((\alpha _{k_{n}})\) and \((\beta _{k_{n}})\) convergent to \( \alpha \in A_{1}\) and \(\beta \in B_{1}\), respectively. Since sequences \( (A_{n})\) and \((B_{n})\) are nonincreasing, we have that \(\alpha \in \bigcap _{n=1}^{\infty }A_{n}\) and \(\beta \in \bigcap _{n=1}^{\infty }B_{n}\). Hence

$$\begin{aligned} x=\lim \limits _{k\rightarrow \infty }(\alpha _{n_{k}}-\beta _{n_{k}})=\alpha -\beta \in \bigcap _{n=1}^{\infty }A_{n}-\bigcap _{n=1}^{\infty }B_{n}, \end{aligned}$$

which ends the proof of (9). The sets \(C_{n}(\lambda )\) are symmetric with respect to \(\frac{1}{2}\). Therefore, \(C(\lambda )\) is also symmetric with respect to \(\frac{1}{2}\), which implies (10). \(\square \)

Now, let us state basic (known) facts about difference sets of central Cantor sets which will be useful in our considerations. One of the first results in this topic was proved by Kraft in [22]. He showed that, if a sequence \(\lambda =\left( \lambda _{n}\right) \in \left( 0, \frac{1}{2}\right) ^{\mathbb {N}}\ \) is constant, that is, \(\lambda _{n}=\alpha \) for any \(n\in \mathbb {N}\), then \(C\left( \lambda \right) -C\left( \lambda \right) = [-1,1]\) if and only if \(\alpha \ge \frac{1}{3}\). Moreover, if \(\alpha < \frac{1}{3}\), then \(C\left( \lambda \right) -C\left( \lambda \right) \) is a Cantor set. Anisca and Ilie [2, Theorem 2] proved an important trichotomy theorem on finite sums of central Cantor sets. Below we present a particular version of their result, which corresponds to our considerations.

Theorem 2.2

([2]). For any sequence \(\lambda \in \left( 0,\frac{1}{2}\right) ^{ \mathbb {N}}\), the set \(C\left( \lambda \right) -C\left( \lambda \right) \) has one of the following fashions:

  1. (1)

    a finite union of closed intervals;

  2. (2)

    a Cantor set;

  3. (3)

    a Cantorval.

Below, we will observe that \(C\left( \lambda \right) -C\left( \lambda \right) \) is a finite union of intervals if and only if \(\lambda _{n}\ge \frac{1}{3}\) for sufficiently large n’s. Similar results, with proofs based on other tools, were shown by Anisca and Ilie (see [2, Theorem 3]).

Theorem 2.3

Let \(\lambda =\left( \lambda _{n}\right) \in \left( 0,\frac{1}{2} \right) ^{\mathbb {N}}\). The following statements hold.

  1. (1)

    \(C\left( \lambda \right) -C\left( \lambda \right) =\left[ -1,1\right] \) if and only if \(\lambda _{n}\ge \frac{1}{3}\) for all \(n\in \mathbb {N}\).

  2. (2)

    \(C\left( \lambda \right) -C\left( \lambda \right) \) is a finite union of intervals if and only if the set \(\left\{ n\in \mathbb {N}:\lambda _{n}<\frac{1}{3}\right\} \) is finite.

Proof

We will only prove (2) (the proof of (1) is similar).

\(\Leftarrow \)” Let \(k\in \mathbb {N}\) be such that \(\lambda _{n}\ge \frac{1 }{3}\) for all \(n\ge k\). From Proposition 2.1 it follows that \( C_{n+1}\left( \lambda \right) -C_{n+1}\left( \lambda \right) =C_{n}\left( \lambda \right) -C_{n}\left( \lambda \right) \) for \(n\ge k\), and consequently

$$\begin{aligned} C\left( \lambda \right) -C\left( \lambda \right) =C_{k}\left( \lambda \right) -C_{k}\left( \lambda \right) =\bigcup _{s\in \left\{ 0,1,2\right\} ^{k}}J_{s}. \end{aligned}$$

\(\Rightarrow \)” Assume that \(C\left( \lambda \right) -C\left( \lambda \right) \) is a finite union of closed intervals, but \(\left\{ n\in \mathbb {N}:\lambda _{n}<\frac{1}{3}\right\} \) is infinite. Then, there are \(w>0\) and \( n\in \mathbb {N}\) such that \(\left[ -1,-1+w\right] \subset C\left( \lambda \right) -C\left( \lambda \right) \), \(2d_{n-1}<w\), and \(\lambda _{n}<\frac{1}{3 }\). Let \(x\in G_{0^{\left( n-1\right) }}^{0}\). Since

$$\begin{aligned} x\in J_{0^{\left( n-1\right) }}=\left[ -1,-1+2d_{n-1}\right] \subset \left[ -1,-1+w\right] \subset C\left( \lambda \right) -C\left( \lambda \right) \subset C_{n}\left( \lambda \right) -C_{n}\left( \lambda \right) , \end{aligned}$$

there is \(s\in \left\{ 0,1,2\right\} ^{n}\) such that \(x\in J_{s}\). The sequence s is not an extension of \(0^{\left( n-1\right) }\) because \(x\in G_{0^{\left( n-1\right) }}^{0}\). Hence \(s_{k}>0\) for some \(k<n\), and consequently

a contradiction. \(\square \)

3 Difference Sets of Central Cantor Sets: Main Theorems

Our main goal is to find sufficient conditions for the set \(C\left( \lambda \right) -C\left( \lambda \right) \) to be a Cantorval. From Theorem 2.3 it follows that we need to assume that \(\lambda _{n}<\frac{1}{3}\) for infinitely many terms. From Theorem 2.2 we infer that, for a sequence \( \lambda \) satisfying the above condition, it suffices to prove that \(C\left( \lambda \right) -C\left( \lambda \right) \) has nonempty interior. To show this, we will consider intervals \(J_t\) (for \(t\in \{0,1,2\}^n\), \(n\in \mathbb N\)) defined in Sect. 2 and the respective gaps inside them. We will take an interval \(J_{t}\) and distinguish a family \(\mathcal {G}_{t}\) of gaps such that \(J_{t}{\setminus } \bigcup \mathcal {G}_{t}\subset C\left( \lambda \right) -C\left( \lambda \right) \) and \(\text {int}\left( J_{t}{\setminus } \bigcup \mathcal {G}_{t}\right) \ne \emptyset \). The proof of the second condition requires the assumption that \(\lambda _{n}\ge \frac{1}{ 3}\) for infinitely many terms (see Theorem 3.1). To prove the first condition, we will need far stronger assumptions (see Theorem 3.2). The families \(\mathcal {G}_t\) of gaps, defined below, will serve as a basic technical tool in our main theorems.

So, let us introduce additional notation and definitions that can be useful in the sequel. We consider sequences such that \(\lambda _{n}<\frac{1}{3}\) for infinitely many terms. For a fixed sequence \(\lambda \) and a fixed number \( k_{0}\) we need the sequence \(\left( k_{n}\right) \) consisting of all indices greater than \(k_{0}\), for which \(\lambda _{k_{n}}<\frac{1}{3}\), and the families \(\mathcal {G}_{t}\left( n\right) \) of some particular gaps in intervals \(J_{s}\) for \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \(t \prec s\).

Let \(\lambda =\left( \lambda _{j}\right) _{j\in \mathbb {N}}\in \left( 0, \frac{1}{2}\right) ^{\mathbb {N}}\) be such that \(\lambda _{j}<\frac{1}{3}\) for infinitely many terms and \(\lambda _{k_{0}+1}>\frac{1}{3}\) for some \( k_{0}\in \mathbb {N}\cup \left\{ 0\right\} \). By \(\left( k_{n}\right) _{n\in \mathbb {N}}\) we denote an increasing sequence such that \(\left( \lambda _{k_{n}}\right) _{n\in \mathbb {N}}\) is a subsequence of the sequence \(\left( \lambda _{j}\right) _{j>k_{0}}\) consisting of all terms which are less than \( \frac{1}{3}\).

Fix \(k\ge k_{0}\) and \(t\in \left\{ 0,1,2\right\} ^{k}\). There is a unique \( m\in \mathbb {N}\) such that \(k_{m-1}\le k<k_{m}\). For \(n\ge m\) we define families \(\mathcal {G}_{t}\left( n\right) \subset \left\{ G_{s}^{i}\!:\!s\!\in \!\left\{ 0,\!1,\!2\right\} ^{k_{n}-1},i\in \left\{ 0,1\right\} \right\} \) inductively as follows.

First, let for \(n\ge m\). Then, put \(\mathcal {G} _{t}\left( m\right) :=\widetilde{\mathcal {G}_{t}}\left( m\right) \). Assume that we have defined families \(\mathcal {G}_{t}\left( l\right) \) for \(m\le l\le n\). Then, define \(\mathcal {G}_{t}\left( n+1\right) \) as

Geometrically, the family \(\widetilde{\mathcal {G}_{t}}\left( n\right) \) consists of the leftmost gap and the rightmost gap in the interval \(J_{t}\) which appear in \( (C_{k_{n}}\left( \lambda \right) \cap I_p)-(C_{k_{n}}\left( \lambda \right) \cap I_q) \), where \(p,q \in \{0,1\}^k\) are such that \(J_t = I_p-I_q\). The family \(\mathcal {G}_{t}\left( n\right) \) consists of the gaps from \( \widetilde{\mathcal {G}_{t}}\left( n\right) \) and the gaps that appear in \( (C_{k_{n}}\left( \lambda \right) \cap I_p)-(C_{k_{n}}\left( \lambda \right) \cap I_q) \) which are nearest the gaps from \(\bigcup _{l=m}^{n-1}\mathcal {G}_{t}\left( l\right) \).

Let \(\mathcal {G}_{t}:=\bigcup _{n\ge m}\mathcal {G}_{t}\left( n\right) \) and

The next theorem yields information about relationships between the sets \( C\left( \lambda \right) -C\left( \lambda \right) \) and \(\bigcup \mathcal {G} _{t}\). It states that, under some assumptions, \( \text {int}\left( J_{t}{\setminus } \bigcup \mathcal {G}_{t}\right) \ne \emptyset \). Moreover, this theorem shows that for \(t=\emptyset \) the inclusion \(C\left( \lambda \right) -C\left( \lambda \right) \subset \left[ -1,1\right] {\setminus } \bigcup \mathcal {G}_{t}\) holds, and it gives the formula for a measure of the set \(\bigcup \mathcal {G}_{t}\). Using these conditions, in Theorem 3.2 we will prove (under additional assumptions) that \(\text {int}\left( C\left( \lambda \right) -C\left( \lambda \right) \right) \ne \emptyset \) and, in consequence, \(C\left( \lambda \right) -C\left( \lambda \right) \) is a Cantorval. We will also get the formula for the measure of the set \(C\left( \lambda \right) -C\left( \lambda \right) \).

Theorem 3.1

Assume that \(\lambda =\left( \lambda _{j}\right) _{j\in \mathbb {N} }\in \left( 0,\frac{1}{2}\right) ^{\mathbb {N}}\) is a sequence such that: \( \lambda _{n}<\frac{1}{3}\) for infinitely many terms, \(\lambda _{n}\ge \frac{1}{3}\) for infinitely many terms, and there exists \(k_{0}\in \mathbb {N }\cup \left\{ 0\right\} \) such that \(\lambda _{k_{0}+1}>\frac{1}{3}\). Let \( k\ge k_{0}\), \(t\in \left\{ 0,1,2\right\} ^{k}\) and \(m\in \mathbb {N}\) be such that \(k_{m-1}\le k<k_{m}\), where the sequence \(\left( k_n \right) \) consists of all indices greater than \(k_0\), for which \(\lambda _{k_n} < \frac{1}{3}\). The following statements hold.

  1. (1)

    The set \(J_{t}\setminus \bigcup \mathcal {G}_{t}\) has nonempty interior.

  2. (2)

    If \(k=k_{0}=0\) and \(t=\emptyset \), then \(C\left( \lambda \right) -C\left( \lambda \right) \subset \left[ -1,1\right] {\setminus } \bigcup \mathcal {G}_{t}\) and

    $$\begin{aligned} \left| \bigcup \mathcal {G}_{t}\right| =\sum _{n=1}^{\infty }2\cdot 3^{n-1}\left( d_{k_{n}-1}-3d_{k_{n}}\right) . \end{aligned}$$

The following theorem is the main result of our paper.

Theorem 3.2

Assume that \(\lambda =\left( \lambda _{j}\right) _{j\in \mathbb {N} }\in \left( 0,\frac{1}{2}\right) ^{\mathbb {N}}\) is a sequence such that: \( \lambda _{n}<\frac{1}{3}\) for infinitely many terms, \(\lambda _{n}\ge \frac{ 1}{3}\) for infinitely many terms, and \(k_{0}\in \mathbb {N}\cup \left\{ 0\right\} \) is such that \(\lambda _{k_{0}+1}>\frac{1}{3}\). Let \(k \ge k_0\), \(t \in \{0,1,2\}^k\) and \(m \in \mathbb N\) be such that \(k_{m-1} \le k < k_m\), where the sequence \(\left( k_n \right) \) consists of all indices greater than \(k_0\), for which \(\lambda _{k_n} < \frac{1}{3}\). Moreover, assume that there exists a sequence \(\left( \delta _{n}\right) _{n\in \mathbb {N}}\) such that for any \(n\in \mathbb {N}\), the following conditions hold

$$\begin{aligned} \left\{ \begin{array}{l} 3d_{r}-d_{r-1}=\delta _{n}\text { if }k_{n-1}<r<k_{n}, \\ 4d_{k_{n}}=\delta _{n}+\delta _{n+1}, \\ d_{k_{n}-1}-d_{k_{n}}=\delta _{n}-\delta _{n+1}. \end{array} \right. \end{aligned}$$
(3.1)

Then, we have:

  1. (1)

    \(J_{t}{\setminus } \bigcup \mathcal {G}_{t}\subset C\left( \lambda \right) -C\left( \lambda \right) \).

  2. (2)

    The set \(C\left( \lambda \right) -C\left( \lambda \right) \) is a Cantorval.

  3. (3)

    If \(k=k_{0}=0\) and \(t=\emptyset \), then \(C\left( \lambda \right) -C\left( \lambda \right) =J_{t}{\setminus } \bigcup \mathcal {G}_{t}\) and

    $$\begin{aligned} \left| C\left( \lambda \right) -C\left( \lambda \right) \right| =2-2\sum _{n=1}^{\infty }3^{n-1}\left( d_{k_{n}-1}-3d_{k_{n}}\right) . \end{aligned}$$

Remark 1

If a sequence \(\left( \delta _{n}\right) \) satisfies condition (3.1), then

$$\begin{aligned} \delta _{n}=3d_{k_{0}+1}-d_{k_{0}}-\sum _{r=1}^{n-1}\left( d_{k_{r}-1}-d_{k_{r}}\right) =\frac{1}{2}\left( 3d_{k_{n}}+d_{k_{n}-1}\right) . \end{aligned}$$

The following proposition shows that the assumptions of Theorem 3.2 can be written as a system of infinitely many equations. In the next section we will use such a version of condition (3.1) to examine achievement sets of some fast convergent series.

Proposition 3.3

Assume that \(\lambda =\left( \lambda _{j}\right) _{j\in \mathbb {N} }\in \left( 0,\frac{1}{2}\right) ^{\mathbb {N}}\) is a sequence such that \( \lambda _{n}<\frac{1}{3}\) for infinitely many terms and \(k_{0}\in \mathbb {N}\cup \left\{ 0\right\} \) is such that \(\lambda _{k_{0}+1}>\frac{1}{3}\). Then, the following conditions are equivalent.

  1. (1)

    There is a sequence \(\left( \delta _{n}\right) _{n\in \mathbb {N}}\) satisfying condition (3.1).

  2. (2)

    For any \(r\in \mathbb {N}\), we have:

    $$\begin{aligned} \begin{array}{lll} 3d_{r+1}=4d_{r}-d_{r-1} &{} \text {if} &{} \lambda _{r},\lambda _{r+1}\ge \frac{1 }{3}\text { or }\lambda _{r},\lambda _{r+1}<\frac{1}{3}, \\ 3d_{r+1}=5d_{r}-2d_{r-1} &{} \text {if} &{} \lambda _{r}\ge \frac{1}{3}\ \text {and }\lambda _{r+1}<\frac{1}{3}, \\ 6d_{r+1}=7d_{r}-d_{r-1} &{} \text {if} &{} \lambda _{r}<\frac{1}{3}\text { and } \lambda _{r+1}\ge \frac{1}{3}. \end{array} \end{aligned}$$
  3. (3)

    For any \(r\in \mathbb {N}\), we have:

    $$\begin{aligned} \begin{array}{lll} 3\lambda _{r}\lambda _{r+1}=4\lambda _{r}-1 &{} \text {if} &{} \lambda _{r},\lambda _{r+1}\ge \frac{1}{3}\text { or }\lambda _{r},\lambda _{r+1}< \frac{1}{3}, \\ 3\lambda _{r}\lambda _{r+1}=5\lambda _{r}-2 &{} \text {if} &{} \lambda _{r}\ge \frac{1}{3}\ \text {and }\lambda _{r+1}<\frac{1}{3}, \\ 6\lambda _{r}\lambda _{r+1}=7\lambda _{r}-1 &{} \text {if} &{} \lambda _{r}<\frac{ 1}{3}\text { and }\lambda _{r+1}\ge \frac{1}{3}. \end{array} \end{aligned}$$

Proof

The equivalence of conditions (2) and (3) is obvious.

(1)\(\Rightarrow \)(2). Let us consider four cases.

1\(^{\text {o}}\) \(\lambda _{r},\lambda _{r+1}\ge \frac{1}{3}\). Then, \( 3d_{r}-d_{r-1}=3d_{r+1}-d_{r}\), so \(3d_{r+1}=4d_{r}-d_{r-1}\).

2\(^{\text {o}}\) \(\lambda _{r},\lambda _{r+1}<\frac{1}{3}\). Then, \(r=k_{n}\) and \(r+1=k_{n+1}\) for some \(n\in \mathbb {N}\). Hence

$$\begin{aligned} \left\{ \begin{array}{l} -4d_{r}=-4d_{k_{n}}=-\delta _{n}-\delta _{n+1}, \\ d_{r-1}-d_{r}=d_{k_{n}-1}-d_{k_{n}}=\delta _{n}-\delta _{n+1}, \\ 4d_{r+1}=4d_{k_{n+1}}=\delta _{n+1}+\delta _{n+2}, \\ d_{r}-d_{r+1}=d_{k_{n+1}-1}-d_{k_{n+1}}=\delta _{n+1}-\delta _{n+2}. \end{array} \right. \end{aligned}$$

Adding the above equations, we get \(3d_{r+1}-4d_{r}+d_{r-1}=0\).

3\(^{\text {o }}\lambda _{r}\ge \frac{1}{3}\ \)and \(\lambda _{r+1}<\frac{1}{3}\). Then, \(r=k_{n}-1\) for some \(n\in \mathbb {N}\). Hence

$$\begin{aligned} \left\{ \begin{array}{l} 4d_{r+1}=4d_{k_{n}}=\delta _{n}+\delta _{n+1},\\ d_{r}-d_{r+1}=d_{k_{n}-1}-d_{k_{n}}=\delta _{n}-\delta _{n+1}, \\ -2\left( 3d_{r}-d_{r-1}\right) =-2\delta _{n}. \end{array} \right. \end{aligned}$$

Adding the above equations, we obtain \(3d_{r+1}-5d_{r}+2d_{r-1}=0\).

4\(^{\text {o}}\) \(\lambda _{r}<\frac{1}{3}\) and \(\lambda _{r+1}\ge \frac{1}{3} \). Then, \(r=k_{n}\) for some \(n\in \mathbb {N}\). Hence

$$\begin{aligned} \left\{ \begin{array}{l} -4d_{r}=-4d_{k_{n}}=-\delta _{n}-\delta _{n+1}, \\ d_{r-1}-d_{r}=d_{k_{n}-1}-d_{k_{n}}=\delta _{n}-\delta _{n+1}, \\ 2\left( 3d_{r+1}-d_{r}\right) =2\delta _{n+1}. \end{array} \right. \end{aligned}$$

Adding the above equations, we get \(6d_{r+1}-7d_{r}+d_{r-1}=0\).

(2)\(\Rightarrow \)(1). Set \(\delta _{n}:=\frac{1}{2}\left( 3d_{k_{n}}+d_{k_{n}-1}\right) \). We will show that this sequence satisfies condition (3.1).

Assume that \(k_{n-1}<r<k_{n}\). If \(r+1<k_{n}\), then \(\lambda _{r},\lambda _{r+1}\ge \frac{1}{3}\). Therefore, \(3d_{r+1}=4d_{r}-d_{r-1}\), and consequently \(3d_{r+1}-d_{r}=3d_{r}-d_{r-1}\). Hence

$$\begin{aligned} 3d_{k_{n-1}+1}-d_{k_{n-1}}=\ldots =3d_{k_{n}-1}-d_{k_{n}-2}. \end{aligned}$$

On the other hand, if \(r+1=k_{n}\), then \(\lambda _{k_{n}-1}\ge \frac{1}{3}\) and \(\lambda _{k_{n}}<\frac{1}{3}.\) Therefore, \( 3d_{k_{n}}=5d_{k_{n}-1}-2d_{k_{n}-2}\), and consequently

$$\begin{aligned} 3d_{k_{n}-1}-d_{k_{n}-2}=\frac{1}{2}\left( 6d_{k_{n}-1}-2d_{k_{n}-2}\right) = \frac{1}{2}\left( 3d_{k_{n}}+d_{k_{n}-1}\right) =\delta _{n}, \end{aligned}$$

which completes the proof of the first equality in (3.1).

We now show that the second equality holds. If \(k_{n+1}-k_{n}=1\), then \( \lambda _{k_{n}},\lambda _{k_{n}+1}<\frac{1}{3}\), and consequently \( 3d_{k_{n}+1}=4d_{k_{n}}-d_{k_{n}-1}\). Hence

$$\begin{aligned} 4d_{k_{n}}-\delta _{n}= & {} 4d_{k_{n}}-\frac{1}{2}\left( 3d_{k_{n}}+d_{k_{n}-1}\right) =4d_{k_{n}}-\frac{1}{2}\left( 3d_{k_{n}}+4d_{k_{n}}-3d_{k_{n}+1}\right) \\= & {} \frac{1}{2}\left( 3d_{k_{n}+1}+d_{k_{n}}\right) =\frac{1}{2}\left( 3d_{k_{n+1}}-d_{k_{n+1}-1}\right) =\delta _{n+1}. \end{aligned}$$

On the other hand, if \(k_{n+1}-k_{n}>1\), then \(\lambda _{k_{n}}<\frac{1}{3}\) and \(\lambda _{k_{n}+1}\ge \frac{1}{3}\), and consequently \( 6d_{k_{n}+1}=7d_{k_{n}}-d_{k_{n}-1}\). Using the first equality, we get

$$\begin{aligned} 4d_{k_{n}}-\delta _{n}= & {} 4d_{k_{n}}-\frac{1}{2}\left( 3d_{k_{n}}+d_{k_{n}-1}\right) =4d_{k_{n}}-\frac{1}{2}\left( 3d_{k_{n}}+7d_{k_{n}}-6d_{k_{n}+1}\right) \\= & {} 3d_{k_{n}+1}-d_{k_{n}}=\delta _{n+1}, \end{aligned}$$

which finishes the proof of the second equality in (3.1). The third equality results from the second one because

$$\begin{aligned} \delta _{n}-\delta _{n+1}=2\delta _{n}-\left( \delta _{n}+\delta _{n+1}\right) =3d_{k_{n}}+d_{k_{n}-1}-4d_{k_{n}}=d_{k_{n}-1}-d_{k_{n}}. \end{aligned}$$

\(\square \)

It may seem unnatural to describe covering the gaps via equalities as in Theorem 3.2. Our initial idea was to describe it by inequalities. However, it turned out that the system of received inequalities is equivalent to condition (3.1). It suggests that sequences satisfying the assumptions of Theorem 3.2 are quite exceptional. In the next section we will argue why the family of such sequences is interesting. In Theorem 4.5 we will also show that Theorem 3.2 gives us infinitely many new examples of central Cantor sets which difference sets are Cantorvals.

4 An Application: The Sets of Subsums of Series

We will use the results obtained in the previous section to examine the sets of subsums of series. Let \(x=\left( x_{j}\right) _{j\in \mathbb {N}}\) be a nonincreasing sequence of positive numbers such that the series \( \sum _{j=1}^{\infty }x_{j}\) is convergent. The set

$$\begin{aligned} E\left( x\right) :=\left\{ \sum _{j\in A}x_{j}:A\subset \mathbb {N}\right\} \end{aligned}$$

(where \(\sum _{j \in \emptyset }x_j:= 0\)) of all subsums of \(\sum _{j=1}^{\infty }x_{j}\) is called the achievement set of x. The sum and the remainders of a series we denote by \(S:=\sum _{j=1}^{\infty }x_{j}\) and \(r_{n}:=\sum _{j=n+1}^{\infty }x_{j}\). Obviously, \(r_{0}=S\). If \(x_{n}>r_{n}\) for \(n\in \mathbb {N}\), then the series is called fast convergent. If \(x_n \le r_n\) for \(n \in \mathbb N\), then the series is called slowly convergent.

There is a very close relationship between central Cantor sets and the achievement sets of fast convergent series. This is shown in the following proposition.

Proposition 4.1

[29, p. 27]. The following conditions hold.

  1. (1)

    If \(\left( \lambda _{j}\right) _{j\in \mathbb {N}}\in \left( 0,\frac{1}{ 2}\right) ^{\mathbb {N}}\), then the series \(\sum _{j=1}^{\infty }x_{j}\) given by the formula

    $$\begin{aligned} x_{1}=1-\lambda _{1}\quad \text {and}\quad x_{j}=\lambda _{1}\cdot \ldots \cdot \lambda _{j-1}\cdot \left( 1-\lambda _{j}\right) \text { for }j>1, \end{aligned}$$
    (4.1)

    is fast convergent, \(S=1\) and \(C\left( \lambda \right) =E\left( x\right) \).

  2. (2)

    If a series \(\sum _{j=1}^{\infty }x_{j}\) is fast convergent and \( \lambda _{j}=\frac{r_{j}}{r_{j-1}}\) for \(j\in \mathbb {N}\), then \(\left( \lambda _{j}\right) _{j\in \mathbb {N}}\in \left( 0,\frac{1}{2}\right) ^{ \mathbb {N}}\) and \(E\left( x\right) =S\cdot C\left( \lambda \right) \).

The best known characterization of intervals as achievement sets of series comes from Kakeya.

Theorem 4.2

([20]). Let \((x_n)\) be a non-increasing sequence of positive terms such that the series \(\sum _{j=1}^{\infty }x_{j}\) is convergent. Then E(x) is a closed interval if and only if the series \(\sum _{j=1}^{\infty }x_{j}\) is slowly convergent.

We will examine the difference set \(E\left( x\right) -E\left( x\right) \) for some convergent series with positive terms. Observe that \(\left( E\left( x\right) -E\left( x\right) \right) +S=E\left( x\right) +E\left( x\right) =E\left( x_{1},x_{1},x_{2},x_{2},\ldots \right) \). Thus, the properties of the difference \(E\left( x\right) -E\left( x\right) \) are the same as the properties of the sum \(E\left( x\right) +E\left( x\right) \).

We first check which series correspond to sequences satisfying the assumptions of Theorem 3.2. It turns out that they have a very simple form.

Proposition 4.3

Assume that a sequence \(\lambda \in \left( 0,\frac{1}{2}\right) ^{\mathbb {N} } \) satisfies the assumptions of Theorem 3.2, that is, \(\lambda _{n}< \frac{1}{3}\) for infinitely many terms, \(\lambda _{n}\ge \frac{1}{3}\) for infinitely many terms, \(\lambda _{k_{0}+1}>\frac{1}{3}\) for some \(k_{0}\in \mathbb {N}\cup \left\{ 0\right\} \), \(\left( k_{n}\right) _{n\in \mathbb {N}}\) is an increasing sequence of natural numbers such that \(\left( \lambda _{k_{n}}\right) _{n\in \mathbb {N}}\) is a subsequence of the sequence \(\left( \lambda _{j}\right) _{j>k_{0}}\) consisting of all terms which are less than \( \frac{1}{3}\), and there is a sequence \(\left( \delta _{n}\right) \) satisfying (3.1). If the sequence x is given by formula (4.1), then for any \(j\in \mathbb {N}\), we have

$$\begin{aligned} x_{k_{0}+j}=\left\{ \begin{array}{c} \frac{1}{3^{j-1}}x_{k_{0}+1}\text { if }\lambda _{k_{0}+j}\ge \frac{1}{3} \\ \frac{2}{3^{j-1}}x_{k_{0}+1}\text { if }\lambda _{k_{0}+j}<\frac{1}{3} \end{array} \right. . \end{aligned}$$

Proof

Using Proposition 3.3 we will calculate \(\frac{x_{r+1}}{x_{r}}\) for \( r>k_{0}\). We have

$$\begin{aligned} \frac{x_{r+1}}{x_{r}}=\frac{\lambda _{r}\left( 1-\lambda _{r+1}\right) }{ 1-\lambda _{r}}. \end{aligned}$$

If \(\lambda _{r},\lambda _{r+1}\ge \frac{1}{3}\ \)or \(\lambda _{r},\lambda _{r+1}<\frac{1}{3}\), then \(3\lambda _{r}\lambda _{r+1}=4\lambda _{r}-1\). Hence \(1-\lambda _{r+1}=\frac{1-\lambda _{r}}{3\lambda _{r}}\), and so \(\frac{ x_{r+1}}{x_{r}}=\frac{1}{3}\). If \(\lambda _{r}\ge \frac{1}{3}\) and \(\lambda _{r+1}<\frac{1}{3}\), then \(3\lambda _{r}\lambda _{r+1}=5\lambda _{r}-2\). Therefore, \(1-\lambda _{r+1}=\frac{2-2\lambda _{r}}{3\lambda _{r}}\), which gives \(\frac{x_{r+1}}{x_{r}}=\frac{2}{3}\). If \(\lambda _{r}<\frac{1}{3}\) and \(\lambda _{r+1}\ge \frac{1}{3}\), then \(6\lambda _{r}\lambda _{r+1}=7\lambda _{r}-1\). Thus, \(1-\lambda _{r+1}=\frac{1-\lambda _{r}}{6\lambda _{r}}\), and consequently \(\frac{x_{r+1}}{x_{r}}=\frac{1}{6}\). An easy induction leads to our assertion. \(\square \)

Corollary 4.4

Assume that a sequence \(\lambda \) satisfies the assumptions of Theorem 3.2 and \(k_{0}=0\), i.e. \(\lambda _{1}>\frac{1}{3}\) and the sequence \( \left( \lambda _{k_{n}}\right) _{n\in \mathbb {N}}\) consists of all terms of the sequence \(\lambda \) less than \(\frac{1}{3}\). If the sequence x is given by formula (4.1), then \(x_{j}=\left\{ \begin{array}{c} \frac{2x_{1}}{3^{j-1}}\text { if }j\in \left\{ k_{n}:n\in \mathbb {N}\right\} \\ \frac{x_{1}}{3^{j-1}}\text { if }j\notin \left\{ k_{n}:n\in \mathbb {N}\right\} \end{array} .\right. \)

We will now show that the implication from Corollary 4.4 can be conversed. Namely, every increasing sequence \(\left( k_{n}\right) _{n\in \mathbb {N}}\) of natural numbers, for which \(k_{1}>1\) and the set \(\mathbb {N} {\setminus } \left\{ k_{n}:n\in \mathbb {N}\right\} \) is infinite, generates a fast convergent series \(\sum _{j=1}^{\infty }x_{j}\) and the corresponding sequence \(\lambda \) satisfying the assumptions of Theorem 3.2 (for \( k_{0}=0\)). Therefore, this theorem provides us infinitely many new examples of central Cantor sets \(C(\lambda )\) such that \(C(\lambda )-C(\lambda )\) is a Cantorval.

Theorem 4.5

Let \(\left( k_{n}\right) _{n\in \mathbb {N}}\) be an increasing sequence of natural numbers such that \(k_{1}>1\) and the set \(\mathbb {N} \setminus \left\{ k_{n}:n\in \mathbb {N}\right\} \) is infinite. Put

$$\begin{aligned} x_{j}:=\left\{ \begin{array}{ccc} \frac{2}{3^{j-1}} &{} \text {if} &{} j\in \left\{ k_{n}:n\in \mathbb {N}\right\} \\ \frac{1}{3^{j-1}} &{} \text {if} &{} j\notin \left\{ k_{n}:n\in \mathbb {N}\right\} \end{array} \right. , \end{aligned}$$

\(S:=\sum _{j=1}^{\infty }x_{j}\), \(r_{n}:=\sum _{j=n+1}^{\infty }x_{j}\), and \( \lambda _{n}:=\frac{r_{n}}{r_{n-1}}\) for \(n\in \mathbb {N}\). The following conditions hold.

  1. (1)

    The sequence \(\lambda \) is the only sequence satisfying the assumptions of Theorem 3.2 for \(k_{0}=0\). It means that \(\left( \lambda _{j} \right) \in \left( 0,\frac{1}{2}\right) ^{\mathbb N} \), \(\lambda _{1}>\frac{1}{3}\), \(\lambda _{k_{n}}<\frac{1}{3}\), \(\lambda _{j}\ge \frac{1}{3}\) if \(j\notin \left\{ k_{n}:n\in \mathbb {N}\right\} \), and there exists a sequence \(\left( \delta _{n}\right) \) satisfying condition (3.1).

  2. (2)

    The sets \(E\left( x\right) -E\left( x\right) \) and \(E(x)+E(x)\) are Cantorvals, and \( E\left( x\right) =S\cdot C\left( \lambda \right) . \)

  3. (3)

    The set \(E(x) + E(x) + E(x) + E(x)\) is a closed interval.

Proof

We have \(\frac{3}{2}<S<3\) and

$$\begin{aligned} \frac{1}{2\cdot 3^{n-1}}=\sum _{j=n+1}^{\infty }\frac{1}{3^{j-1}}<r_{n}<\sum _{j=n+1}^{\infty }\frac{2}{3^{j-1}}=\frac{1}{3^{n-1}}\le x_{n}. \end{aligned}$$
(4.2)

Thus, the series \(\sum _{j=1}^{\infty }x_{j}\) is fast convergent and from Proposition 4.1 it follows that \(E\left( x\right) =S\cdot C\left( \lambda \right) \) (in particular, \(\left( \lambda _{j}\right) \in \left( 0,\frac{1}{2} \right) ^{\mathbb N} \)). If \(j\in \left\{ k_{n}:n\in \mathbb {N}\right\} \), then \(x_{j}= \frac{2}{3^{j-1}}\), and consequently

$$\begin{aligned} \lambda _{j}=\frac{r_{j}}{r_{j-1}}=\frac{r_{j-1}-x_{j}}{r_{j-1}}=1-\frac{ x_{j}}{r_{j-1}}<1-\frac{x_{j}}{\frac{1}{3^{j-2}}}=\frac{1}{3}. \end{aligned}$$

However, if \(j\notin \left\{ k_{n}:n\in \mathbb {N}\right\} \), then \(x_{j}= \frac{1}{3^{j-1}}\), which yields

$$\begin{aligned} \lambda _{j}=1-\frac{x_{j}}{r_{j-1}}>1-\frac{x_{j}}{\frac{1}{2\cdot 3^{j-2}}} =\frac{1}{3}. \end{aligned}$$

Since \(k_{1}>1\), we have \(\lambda _{1}>\frac{1}{3}\). We will prove that condition (3) from Proposition 3.3 holds. If \(\lambda _{j},\lambda _{j+1}\ge \frac{1}{3}\) or \(\lambda _{j},\lambda _{j+1}<\frac{1}{3}\), then \( x_{j+1}=\frac{1}{3}x_{j}\), and, in consequence,

$$\begin{aligned} 3\lambda _{j}\lambda _{j+1}-4\lambda _{j}+1=\frac{3r_{j+1}}{r_{j-1}}-\frac{ 4r_{j}}{r_{j-1}}+1=\frac{3r_{j+1}-4r_{j}+r_{j-1}}{r_{j-1}}=\frac{ x_{j}-3x_{j+1}}{r_{j-1}}=0. \end{aligned}$$

If \(\lambda _{j}\ge \frac{1}{3}\) and \(\lambda _{j+1}<\frac{1}{3}\), then \( x_{j+1}=\frac{2}{3}x_{j}\), which gives

$$\begin{aligned} 3\lambda _{j}\lambda _{j+1}-5\lambda _{j}+2=\frac{3r_{j+1}-5r_{j}+2r_{j-1}}{ r_{j-1}}=\frac{2x_{j}-3x_{j+1}}{r_{j-1}}=0. \end{aligned}$$

If \(\lambda _{j}<\frac{1}{3}\) and \(\lambda _{j+1}\ge \frac{1}{3}\), then \( x_{j+1}=\frac{1}{6}x_{j}\), and consequently

$$\begin{aligned} 6\lambda _{j}\lambda _{j+1}-7\lambda _{j}+1=\frac{6r_{j+1}-7r_{j}+r_{j-1}}{ r_{j-1}}=\frac{x_{j}-6x_{j+1}}{r_{j-1}}=0. \end{aligned}$$

By Proposition 3.3, there is a sequence \(\left( \delta _{n}\right) \) satisfying condition (3.1). The explicitness of \(\left( \delta _{n}\right) \) follows from Remark 1. Theorem 3.2 implies that \( C\left( \lambda \right) -C\left( \lambda \right) \) is a Cantorval, and so \(E(x)-E(x)\) and \(E(x)+E(x)\) are Cantorvals too.

It is easy to see that \(E(x) + E(x) + E(x) + E(x) = E(y),\) where

$$\begin{aligned} y=(y_n) = (x_1,x_1,x_1,x_1,x_2,x_2,x_2,x_2,x_3,\dots ). \end{aligned}$$

Observe that the sequence y is slowly convergent, that is, \(y_n \le R_n\) for any n, where \(R_n = \sum _{i=n+1}^\infty y_i\). For n which is not divisible by 4 we have \(y_n = y_{n+1} \le R_n\). For \(n=4j\), using (4.2), we get

$$\begin{aligned} R_{4j} = 4r_j \ge \frac{4}{2\cdot 3^{j-1}} = \frac{2}{3^{j-1}} \ge x_{j} = y_{4j}. \end{aligned}$$

By Theorem 4.2, we obtain the assertion. \(\square \)

Remark 2

From the above theorem, we obtain that algebraic sums of the same central Cantor set C satisfying the assumptions of Theorem 3.2 transit through all three stages of their possible structures: C is a central Cantor set, \(C+C\) is a Cantorval and \(C+C+C+C\) is a closed interval.

We can also observe that, if \(x_{j}=\frac{1}{3^{j-1}}\) for all \(j\in \mathbb {N}\), then \(E\left( x\right) \) is the Cantor ternary set (in the interval \(\left[ 0,\frac{3}{2} \right] \)). It is also easy to check that, if \(x_{j}=\frac{1}{3^{j-1}}\) for sufficiently large j’s and \(x_{j}=\frac{2}{3^{j-1}}\) for the remaining ones, then \( E\left( x\right) \) is a finite union of the Cantor ternary sets. Consequently, \(E\left( x\right) -E\left( x\right) \) is a finite union of closed intervals. We get an analogous result if \(x_{j}=\frac{2}{3^{j-1}}\) for sufficiently large j’s and \(x_{j}=\frac{1}{3^{j-1}}\) for the remaining ones.

Using Theorem 3.2, we can calculate the measure of Cantorvals \(E\left( x\right) -E\left( x\right) \) considered in Theorem 4.5.

Theorem 4.6

Let \(\left( k_{n}\right) _{n\in \mathbb {N}}\) be an increasing sequence of natural numbers such that \(k_{1}>1\) and the set \(\mathbb {N} \setminus \left\{ k_{n}:n\in \mathbb {N}\right\} \) is infinite. Put

$$\begin{aligned} x_{j}:=\left\{ \begin{array}{ccc} \frac{2}{3^{j-1}} &{} \text {if} &{} j\in \left\{ k_{n}:n\in \mathbb {N}\right\} \\ \frac{1}{3^{j-1}} &{} \text {if} &{} j\notin \left\{ k_{n}:n\in \mathbb {N}\right\} \end{array} \right. . \end{aligned}$$

Then \(\left| E\left( x\right) +E\left( x\right) \right| =\left| E\left( x\right) -E\left( x\right) \right| =3\).

Proof

Let \(S:=\sum _{n=1}^{\infty }x_{n}\) and \(y_{n}:=\sum _{k_{n}<j<k_{n+1}}x_{j}\) ( \(y_{n}:=0\) if \(k_{n+1}=k_{n}+1\)). Then

$$\begin{aligned} y_{n}=\sum _{j=k_{n}+1}^{k_{n+1}-1}\frac{1}{3^{j}}=\frac{1}{2}\left( \frac{1}{ 3^{k_{n}}}-\frac{1}{3^{k_{n+1}-1}}\right) \end{aligned}$$

and for \(n\in \mathbb {N}\) we have

$$\begin{aligned}{} & {} 2\left( y_{n}+3y_{n+1}+3^{2}y_{n+2}+3^{3}y_{n+3}+\ldots \right) \\{} & {} \quad =\left( \frac{1}{3^{k_{n}}}-\frac{1}{3^{k_{n+1}-1}}\right) +\left( \frac{3}{ 3^{k_{n+1}}}-\frac{3}{3^{k_{n+2}-1}}\right) +\left( \frac{3^{2}}{3^{k_{n+2}}} -\frac{3^{2}}{3^{k_{n+3}-1}}\right) +\ldots =\frac{1}{3^{k_{n}}}. \end{aligned}$$

Hence

$$\begin{aligned}{} & {} S\cdot \sum _{n=1}^{\infty }3^{n-1}\left( d_{k_{n}-1}-3d_{k_{n}}\right) =S\cdot \sum _{n=1}^{\infty }3^{n-1}\left( \frac{r_{k_{n}-1}}{S}-3\frac{ r_{k_{n}}}{S}\right) =\sum _{n=1}^{\infty }3^{n-1}\left( r_{k_{n}-1}-3r_{k_{n}}\right) \\{} & {} \quad =\sum _{n=1}^{\infty }3^{n-1}\left( x_{k_{n}}-2r_{k_{n}}\right) =\sum _{n=1}^{\infty }3^{n-1}\left[ x_{k_{n}}-2\left( x_{k_{n}+1}+x_{k_{n}+2}+\ldots \right) \right] \\{} & {} \quad =\sum _{n=1}^{\infty }3^{n-1}\left[ x_{k_{n}}-2\left( y_{n}+x_{k_{n+1}}+y_{n+1}+x_{k_{n+2}}+y_{n+2}+\ldots \right) \right] \\{} & {} \quad =\sum _{n=1}^{\infty }3^{n-1}\left[ x_{k_{n}}-2\left( x_{k_{n+1}}+x_{k_{n+2}}+\ldots \right) \right] -2\sum _{n=1}^{\infty }3^{n-1}\left( y_{n}+y_{n+1}+y_{n+2}+\ldots \right) \\{} & {} \quad =\left[ x_{k_{1}}+\left( -2+3\right) x_{k_{2}}+\left( -2-6+9\right) x_{k_{3}}+\ldots +\right] \\{} & {} \qquad -2\left[ \left( y_{1}+3y_{2}+9y_{3}+\ldots \right) +\left( y_{2}+3y_{3}+9y_{4}+\ldots \right) +\left( y_{3}+3y_{4}+9y_{5}+\ldots \right) +\ldots \right] \\{} & {} \quad =\sum _{n=1}^{\infty }x_{k_{n}}-\sum _{n=1}^{\infty }\frac{1}{3^{k_{n}}}=\frac{ 1}{2}\sum _{n=1}^{\infty }x_{k_{n}}. \end{aligned}$$

Consequently,

$$\begin{aligned} \left| E\left( x\right) -E\left( x\right) \right|= & {} S\cdot \left| C\left( \lambda \right) -C\left( \lambda \right) \right| =2S-2S\cdot \sum _{n=1}^{\infty }3^{n-1}\left( d_{k_{n}-1}-3d_{k_{n}}\right) \\= & {} 2S-\sum _{n=1}^{\infty }x_{k_{n}}=2\left( \sum _{n=1}^{\infty }\frac{1}{ 3^{n-1}}+\sum _{n=1}^{\infty }\frac{1}{3^{k_{n}}}\right) -\sum _{n=1}^{\infty } \frac{2}{3^{k_{n}}}=2\sum _{n=1}^{\infty }\frac{1}{3^{n-1}}=3. \end{aligned}$$

\(\square \)

Corollary 4.7

If a sequence \(\lambda \) satisfies the assumptions of Theorem 3.2 for \( k_{0}=0\), then \(\left| C\left( \lambda \right) -C\left( \lambda \right) \right| =\frac{3}{S}\), where \(S=\sum _{n=1}^{\infty }x_{n}\) and x is the sequence given by formula (4.1).

Let \(n\in \mathbb {N}\), \(x_{1},x_{2},\dots ,x_{n}\in \mathbb {R}\) and \(q\in (0,1)\). The sequence

$$\begin{aligned} \left( x_{1},x_{2},\dots ,x_{n},x_{1}q,x_{2}q,\dots ,x_{n}q,x_{1}q^{2},x_{2}q^{2},\ldots ,x_{n}q^{2},\dots \right) \end{aligned}$$

is called a multigeometric sequence with the ratio q and is denoted by \(\left( x_{1},x_{2},\dots ,x_{n};q\right) \).

We will show that, if a sequence \(\left( k_{n}\right) \) can be decomposed into arithmetical sequences with the same difference, then the sequence x generated by \( \left( k_{n}\right) \) is multigeometric with the ratio of the form \(\frac{1}{ 3^{m}}\).

Proposition 4.8

Assume that \(p,m\in \mathbb {N}\), \(1<s_{1}<\ldots <s_{p}\le m\) and \(k_{\left( n-1\right) p+j}=\left( n-1\right) m+s_{j}\) for \(n\in \mathbb {N }\), \(j\in \left\{ 1,\ldots ,p\right\} \), i.e.

$$\begin{aligned} k=\left( s_{1},\ldots ,s_{p},m+s_{1},\ldots ,m+s_{p},2m+s_{1},\ldots \right) . \end{aligned}$$

Moreover, assume that x and \(\lambda \) are the sequences defined as in Theorem 4.5, that is,

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ccc} \frac{2}{3^{j-1}} &{} \text {if} &{} j\in \left\{ k_{n}:n\in \mathbb {N}\right\} \\ \frac{1}{3^{j-1}} &{} \text {if} &{} j\notin \left\{ k_{n}:n\in \mathbb {N}\right\} \end{array} \right. \quad \text {and}\quad \lambda _{j}=\frac{r_{j}}{r_{j-1}}. \end{aligned}$$

Then the sequence x is multigeometric,

$$\begin{aligned} x=\left( \varepsilon _{1},\frac{\varepsilon _{2}}{3^{1}},\ldots ,\frac{ \varepsilon _{m}}{3^{m-1}};\frac{1}{3^{m}}\right) \text {, where }\varepsilon _{j}=\left\{ \begin{array}{ccc} 2 &{} \text {if} &{} j\in \left\{ s_{1},\ldots ,s_{p}\right\} \\ 1 &{} \text {if} &{} j\notin \left\{ s_{1},\ldots ,s_{p}\right\} \end{array} \right. \end{aligned}$$

and \(\left| C\left( \lambda \right) -C\left( \lambda \right) \right| =\frac{3^{m}-1}{3^{m-1}\left( x_{1}+\ldots +x_{m}\right) }\).

Proof

Since \(\left\{ k_{n}:n\in \mathbb {N}\right\} =\left\{ s_{1},\ldots ,s_{p},m+s_{1},\ldots ,m+s_{p},\ldots \right\} \), the equality \(x_{j}=\frac{ \varepsilon _{j}}{3^{j-1}}\) is obvious for \(j\in \left\{ 1,\ldots ,m\right\} \). Observe that for any \(j\in \mathbb {N}\) we have \(j\in \left\{ k_{n}:n\in \mathbb {N}\right\} \) if and only if \(j+m\in \left\{ k_{n}:n\in \mathbb {N} \right\} \). Consequently, \(\frac{x_{j+m}}{x_{j}}=\frac{3^{1-j-m}}{3^{1-j}}= \frac{1}{3^{m}}\) for \(j\in \mathbb {N}\), which finishes the proof that \( x=\left( \varepsilon _{1},\frac{\varepsilon _{2}}{3^{1}},\ldots ,\frac{ \varepsilon _{m}}{3^{m-1}};\frac{1}{3^{m}}\right) \). Hence

$$\begin{aligned} S=\sum _{k=1}^{\infty }\frac{x_{1}+\ldots +x_{m}}{\left( 3^{m}\right) ^{k}} =3^{m}\cdot \frac{x_{1}+\ldots +x_{m}}{3^{m}-1}. \end{aligned}$$

Using Theorem 4.6 we obtain \(\left| C\left( \lambda \right) -C\left( \lambda \right) \right| =\frac{3}{S}=\frac{3^{m}-1}{ 3^{m-1}\left( x_{1}+\ldots +x_{m}\right) }\). \(\square \)

Example 3

  1. (1)

    Assume that \(k_{n}=2n\) and the sequences x and \(\lambda \) are defined as in Theorem 4.5. Writing \(m=2\) and \(p=1\), from Proposition 4.8, we obtain \(x=\frac{1}{3}\cdot \left( 3,2;\frac{1}{9}\right) \). This example was considered in [9]. Observe that \(r_{2n}= \sum _{j=2n+1}^{\infty }x_{j}=\frac{15}{8\cdot 9^{n}}\) and \( r_{2n+1}=\sum _{j=2n+2}^{\infty }x_{j}=\frac{7}{8\cdot 9^{n}}\). Hence \( \lambda _{2n-1}=\frac{r_{2n-1}}{r_{2n-2}}=\frac{7}{15}\), \(\lambda _{2n}= \frac{r_{2n}}{r_{2n-1}}=\frac{5}{21}\), and \(\left| C\left( \lambda \right) -C\left( \lambda \right) \right| =\frac{3^{2}-1}{3\left( x_{1}+x_{2}\right) }=\frac{8}{3+2}=\frac{8}{5}\).

  2. (2)

    If \(k_{n}=3n\), then for \(m=3\) and \(p=1\) we get \(x=\frac{1}{9}\cdot \left( 9,3,2;\frac{1}{27}\right) \), \(r_{3n-2}=\frac{8}{13\cdot 27^{n-1}}\), \( r_{3n-1}=\frac{99}{13\cdot 27^{n}}\), and \(r_{3n}=\frac{21}{13\cdot 27^{n}}\). Hence \(\lambda _{3n-2}=\frac{r_{3n-2}}{r_{3n-3}}=\frac{8}{21}\), \(\lambda _{3n-1}=\frac{r_{3n-1}}{r_{3n-2}}=\frac{11}{24}\), \(\lambda _{3n}=\frac{r_{3n} }{r_{3n-1}}=\frac{7}{33}\), and \(\left| C\left( \lambda \right) -C\left( \lambda \right) \right| =\frac{3^{3}-1}{9+3+2}=\frac{13}{7}\).

  3. (3)

    If \(k=\left( 2,3,5,6,8,9,\ldots \right) \), that is, \(k_{2n-1}=3n-1\) and \(k_{2n}=3n\), then for \(m=3\) and \(p=2\) we get \(x=\frac{1}{9}\cdot \left( 9,6,2;\frac{1}{27}\right) \). Hence \(\lambda _{3n-2}=\frac{25}{51}\), \(\lambda _{3n-1}=\frac{23}{75}\), \(\lambda _{3n}=\frac{17}{69}\), and \(\left| C\left( \lambda \right) -C\left( \lambda \right) \right| =\frac{3^{3}-1}{ 9+6+2}=\frac{26}{17}\).

5 The Proofs of Main Theorems

In this section, we give the detailed proofs of Theorems 3.1 and 3.2. The following lemma presents basic properties of families \(\mathcal G_t\) defined in Sect. 3.

Lemma 5.1

Assume that \(\lambda =\left( \lambda _{j}\right) _{j\in \mathbb {N }}\in \left( 0,\frac{1}{2}\right) ^{\mathbb {N}}\) is a sequence such that: \( \lambda _{n}<\frac{1}{3}\) for infinitely many terms, \(\lambda _{n}\ge \frac{1}{3}\) for infinitely many terms, and \(k_{0}\in \mathbb {N}\cup \left\{ 0\right\} \) is such that \(\lambda _{k_{0}+1}>\frac{1}{3}\). Let \( k\ge k_{0}\), \(t\in \left\{ 0,1,2\right\} ^{k}\), and \(m\in \mathbb {N}\) be such that \(k_{m-1}\le k<k_{m}\). The following statements hold.

  1. (1)

    The sequence \(r\left( G_{p\left( n\right) }^{0}\right) \) is nondecreasing, the sequence \(l\left( G_{q\left( n\right) }^{1}\right) \) is nonincreasing,

    $$\begin{aligned} \lim _{n\rightarrow \infty }r\left( G_{p\left( n\right) }^{0}\right) <\lim _{n\rightarrow \infty }l\left( G_{q\left( n\right) }^{1}\right) , \end{aligned}$$

    and for any \(n\ge m\), we have

    $$\begin{aligned} r\left( G_{p\left( n\right) }^{0}\right) =l\left( J_{t}\right) +\sum _{l=m}^{n}\left( d_{k_{l}-1}-d_{k_{l}}\right) \quad \text {and}\quad l\left( G_{q\left( n\right) }^{1}\right) =r\left( J_{t}\right) -\sum _{l=m}^{n}\left( d_{k_{l}-1}-d_{k_{l}}\right) . \end{aligned}$$
  2. (2)

    If \(n\ge m\) and \(G\in \mathcal {G}_{t}\left( n\right) \), then

    $$\begin{aligned} r\left( G\right) \le r\left( G_{p\left( n\right) }^{0}\right) \quad \text {or}\quad l\left( G\right) \ge l\left( G_{q\left( n\right) }^{1}\right) . \end{aligned}$$
  3. (3)

    If \(n\ge M>m\), \(k_{M-1}\le r<k_{M}\), \(w\in \left\{ 0,1,2\right\} ^{r}\), and \(t\prec w\), then

    $$\begin{aligned} \mathcal {G}_{t}\left( n\right) \cap \left\{ G_{s}^{i}:s\in \left\{ 0,1,2\right\} ^{k_{n}-1},w\prec s,i\in \left\{ 0,1\right\} \right\} \subset \mathcal {G}_{w}\left( n\right) . \end{aligned}$$
  4. (4)

    If \(k=k_{0}=0\), \(t=\emptyset \), \(n\in \mathbb N\), \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \(i\in \left\{ 0,1\right\} \), and \(G_{s}^{i}\in \mathcal {G}_{t}\), then

    $$\begin{aligned} \left. G_{s}^{i}\cap J_{v}=\emptyset \right. \text { if }v\in \left\{ 0,1,2\right\} ^{k_{n}-1},v\ne s, \\ \left. G_{s}^{i}\cap G_{u}^{j}=\emptyset \right. \text { if }G_{u}^{j}\in \mathcal {G}_{t},\left( u,j\right) \ne \left( s,i\right) . \end{aligned}$$

Proof

(1) From Proposition 2.1(4) we have

and therefore . Hence the sequence \(r\left( G_{p\left( n\right) }^{0}\right) \) is nondecreasing. Similarly, we prove that \(l\left( G_{q\left( n\right) }^{1}\right) =r\left( J_{t}\right) -\sum _{l=m}^{n}\left( d_{k_{l}-1}-d_{k_{l}}\right) \) and the sequence \(l\left( G_{q\left( n\right) }^{1}\right) \) is nonincreasing. Since the set \(\mathbb {N}\setminus \left\{ k_{n}:n\in \mathbb {N}\right\} \) is infinite, we have

$$\begin{aligned} \lim _{n\rightarrow \infty }l\left( G_{q\left( n\right) }^{1}\right) -\lim _{n\rightarrow \infty }r\left( G_{p\left( n\right) }^{0}\right)= & {} r\left( J_{t}\right) -l\left( J_{t}\right) -2\sum _{l=m}^{\infty }\left( d_{k_{l}-1}-d_{k_{l}}\right) \\> & {} \left| J_{t}\right| -2\sum _{r=k}^{\infty }\left( d_{r}-d_{r+1}\right) =\left| J_{t}\right| -2d_{k}=0. \end{aligned}$$

(2) We prove it inductively. Observe that , , and \(\mathcal {G}_{t}\left( m\right) =\left\{ G_{p\left( m\right) }^{0},G_{q\left( m\right) }^{1}\right\} \). Thus, condition (2) holds for \(n=m\). Assume that \(n\ge m\) and for any \( l\in \left\{ m,\ldots ,n\right\} \) and \(G\in \mathcal {G}_{t}\left( l\right) \) we have \(r\left( G\right) \le r\left( G_{p\left( l\right) }^{0}\right) \ \) or \(l\left( G\right) \ge l\left( G_{q\left( l\right) }^{1}\right) \). Let \( G\in \mathcal {G}_{t}\left( n+1\right) \). We will prove that \(r\left( G\right) \le r\left( G_{p\left( n+1\right) }^{0}\right) \ \)or \(l\left( G\right) \ge l\left( G_{q\left( n+1\right) }^{1}\right) \). Let us consider the cases.

1 or .

The inequalities and are obvious.

2, where \(l\in \left\{ m,\ldots ,n\right\} \), \( i\in \left\{ 0,1\right\} \), and \(G_{s}^{i}\in \mathcal {G}_{t}\left( l\right) \). By the inductive hypothesis and (1) we get \(r\left( G_{s}^{i}\right) \le r\left( G_{p\left( l\right) }^{0}\right) \le r\left( G_{p\left( n\right) }^{0}\right) \) or \(l\left( G_{s}^{i}\right) \ge l\left( G_{q\left( l\right) }^{1}\right) \ge l\left( G_{q\left( n\right) }^{1}\right) \). In the first case, we have

and in the second case,

3, \( i\in \left\{ 0,1\right\} \), and \(G_{s}^{i}\in \mathcal {G}_{t}\left( l\right) \). The proof is analogous to the proof in the previous case.

(3) Fix M, r, w such that \(M>m\), \(k_{M-1}\le r<k_{M}\), \(w\in \left\{ 0,1,2\right\} ^{r}\), \(t\prec w\). Put

$$\begin{aligned} \mathcal {H}\left( n\right) :=\mathcal {G}_{t}\left( n\right) \cap \left\{ G_{s}^{i}:s\in \left\{ 0,1,2\right\} ^{k_{n}-1},w\prec s,i\in \left\{ 0,1\right\} \right\} . \end{aligned}$$

We will prove inductively that \(\mathcal {H}\left( n\right) \subset \mathcal {G }_{w}\left( n\right) \) for \(n\ge M\). First, we will show that \(\mathcal {H} \left( M\right) \subset \mathcal {G}_{w}\left( M\right) \). Let \(G\in \mathcal { H}\left( M\right) \), that is, \(G=G_{s}^{i}\in \mathcal {G}_{t}\left( M\right) \), where \(s\in \left\{ 0,1,2\right\} ^{k_{M}-1}\), \(w\prec s\), \(i\in \left\{ 0,1\right\} \). Let us consider the cases.

1\(^{\text {o}}\) \(G=G_{s}^{0}\), where or \(G=G_{s}^{1}\), where .In the former case, , so , and in the other case, , so .

2\(^{\text {o}}\) \(G=G_{s}^{0}\), where , \(i\in \left\{ 0,1\right\} \), \(m\le l<M \), \(v\in \left\{ 0,1,2\right\} ^{k_{l}-1}\), \(G_{v}^{i}\in \mathcal {G} _{t}\left( l\right) \).Since \(k_{l}\le k_{M-1}\le r\) and \(w\prec s\), we have , and so .

3\(^{\text {o}}\) \(G=G_{s}^{1}\), where , \(i\in \left\{ 0,1\right\} \), \(m\le l<M\), \(v\in \left\{ 0,1,2\right\} ^{k_{l}-1}\), \(G_{v}^{i}\in \mathcal {G}_{t}\left( l\right) \).As above we get , so . This completes the proof of the inclusion \(\mathcal {H}\left( M\right) \subset \mathcal {G}_{w}\left( M\right) \).

Assume now that \(n\ge M\) and \(\mathcal {H}\left( l\right) \subset \mathcal {G} _{w}\left( l\right) \) for \(l\in \left\{ M,\ldots ,n\right\} \). Let \(G\in \mathcal {H}\left( n+1\right) \), that is, \(G=G_{s}^{i}\in \mathcal {G} _{t}\left( n+1\right) \), where \(s\in \left\{ 0,1,2\right\} ^{k_{n+1}-1}\), \( w\prec s\), \(i\in \left\{ 0,1\right\} \). We will prove that \(G\in \mathcal {G} _{w}\left( n+1\right) \). Let us consider the cases.

1\(^{\text {o}}\) \(G=G_{s}^{0}\), where or \(G=G_{s}^{1}\), where .In the first case, , so , and in the second case, , so .

2\(^{\text {o}}\) \(G=G_{s}^{0}\), where , \(i\in \left\{ 0,1\right\} \), \(m\le l\le n\), \(v\in \left\{ 0,1,2\right\} ^{k_{l}-1}\), \(G_{v}^{i}\in \mathcal {G} _{t}\left( l\right) \).If \(k_{l}\le r\), then , because \(w\prec s\). Hence . If \(k_{l}>r\), then \(w\prec v\), and therefore \(G_{v}^{i}\in \mathcal {H}\left( l\right) \). From the inductive hypothesis it follows that \(G_{v}^{i}{\in } \mathcal {G}_{w}\left( l\right) \), and consequently .

3\(^{\text {o}}\) \(G=G_{s}^{1}\), where , \(i\in \left\{ 0,1\right\} \), \(m\le l\le n\), \( v\in \left\{ 0,1,2\right\} ^{k_{l}-1}\), \(G_{v}^{i}\in \mathcal {G}_{t}\left( l\right) \).Similarly as in the previous case, we show that \(G\in \mathcal {G}_{w}\left( n+1\right) \), which finishes the proof of (3).

(4) Assume that \(k=k_{0}=0\), \(t=\emptyset \) and set \(\mathcal { G}:=\mathcal {G}_{\emptyset }\). Let \(n \in \mathbb N\), \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \(i\in \left\{ 0,1\right\} \) and \(G_{s}^{i}\in \mathcal {G}_{t}\). We first prove that for any \(v\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \(v\ne s \) we have \(G_{s}^{i}\cap J_{v}=\emptyset \). Let us consider the cases.

1\(^{\text {o}}\) There is \(l<n\) such that \(s_{j}=v_{j}\) for \(j=1,\ldots ,k_{l}-1\) and \(s_{k_{l}}\ne v_{k_{l}}\). Writing \(p:=s|\left( k_{l}-1\right) \), we get and . Since \(\lambda _{k_{l}}<\frac{1}{3}\), the intervals are disjoint. Hence \(G_{s}^{i}\cap J_{v}=\emptyset \).

2\(^{\text {o}}\) There is \(r\le k_{n}-1\) such that \(s_{j}=v_{j}\) for \( j=1,\ldots ,r-1\) and \(\left| s_{r}-v_{r}\right| =2\).

Taking \(p:=s|\left( r-1\right) \), we obtain and . Since \(\lambda _{r}<\frac{1}{2}\), the intervals and are disjoint. Therefore, \(G_{s}^{i}\cap J_{v}=\emptyset .\)

3\(^{\text {o}}\) There are l, r such that \(l\le n\), \(k_{l-1}<r<k_{l}\), \( s_{j}=v_{j}\) for \(j=1,\ldots ,r-1\) and \(v_{r}=s_{r}+1\).Put \(p:=s|\left( r-1\right) \) and

From (3) it follows that \(G_{s}^{i}\in \mathcal {G}_{p}\left( n\right) \). Consequently, (2) shows that \(r\left( G_{s}^{i}\right) \le r\left( G_{\overline{p}}^{0}\right) \) or \(l\left( G_{s}^{i}\right) \ge l\left( G_{\overline{q}}^{1}\right) \). Since \(s_{r}<2\), by the definition of \(\mathcal {G}\) we get \(s_{r}=\ldots =s_{k_{l}-1}=0\). Thus,

and therefore \(r\left( G_{s}^{i}\right) \le r\left( G_{\overline{p} }^{0}\right) \). On the other hand, from (1) it follows that

Hence \(r\left( G_{s}^{i}\right) <l\left( J_{v}\right) \), and so \( G_{s}^{i}\cap J_{v}=\emptyset \).

4\(^{\text {o}}\) There are l, r such that \(l\le n\), \(k_{l-1}<r<k_{l}\), \( s_{j}=v_{j}\) for \(j=1,\ldots ,r-1\) and \(v_{r}=s_{r}-1\). The reasoning is analogous to that in the previous case. This finishes the proof of the first condition in (4).

Assume now that \(G_{u}^{j}\in \mathcal {G}_{t}\), where \(u\in \left\{ 0,1,2\right\} ^{l}\), \(j\in \left\{ 0,1\right\} \), and \(\left( u,j\right) \ne \left( s,i\right) \). If \(s=u\) and \(i\ne j\), then the condition \( G_{s}^{i}\cap G_{u}^{j}=\emptyset \) is obvious. Suppose that \(s\ne u\). Without loss of generality we can assume that \(n<l\). Thus, we have \( G_{u}^{j}\subset J_{u}\subset J_{u|k_{n}}\subset J_{u|\left( k_{n}-1\right) } \). If \(s=u|\left( k_{n}-1\right) \), then , and therefore \(G_{s}^{i}\cap G_{u}^{j}=\emptyset \). If \(s\ne u|\left( k_{n}-1\right) \), then from the first condition we get \(G_{s}^{i}\cap J_{u|\left( k_{n}-1\right) }=\emptyset \), which gives \(G_{s}^{i}\cap G_{u}^{j}=\emptyset \). \(\square \)

Now, let us present the proof of Theorem 3.1.

Proof

Put \(J:=\left( \lim \nolimits _{n\rightarrow \infty }r\left( G_{p\left( n\right) }^{0}\right) ,\lim \nolimits _{n\rightarrow \infty }l\left( G_{q\left( n\right) }^{1}\right) \right) \). From Lemma 5.1 it follows that \(J\subset J_{t} \), \(\left| J\right| >0\), and for any interval \(G\in \mathcal {G} _{t}\) we have \(r\left( G\right) \le \lim \nolimits _{n\rightarrow \infty }r\left( G_{p\left( n\right) }^{0}\right) =l\left( J\right) \) or \(l\left( G\right) \ge \lim \nolimits _{n\rightarrow \infty }l\left( G_{q\left( n\right) }^{1}\right) =r\left( J\right) \). Hence \(G\cap J=\emptyset \) and, in consequence, \(J\cap \bigcup \mathcal {G}_{t}=\emptyset \), which completes the proof of (1).

Write \(\mathcal {G}:=\mathcal {G}_{\emptyset }\). On the contrary, suppose that the set \(\left( C\left( \lambda \right) -C\left( \lambda \right) \right) \cap \bigcup \mathcal {G}\) is nonempty, that is, \(G_{s}^{i}\cap \left( C\left( \lambda \right) -C\left( \lambda \right) \right) \ne \emptyset \) for some \(n\in \mathbb {N}\), \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\) and \(i\in \left\{ 0,1\right\} \) such that \(G_{s}^{i}\in \mathcal {G}\). Hence we obtain \( G_{s}^{i}\cap \left( C_{k_{n}}\left( \lambda \right) -C_{k_{n}}\left( \lambda \right) \right) \ne \emptyset \), and consequently there is a sequence \(v\in \left\{ 0,1,2\right\} ^{k_{n}}\) such that \(G_{s}^{i}\cap J_{v}\ne \emptyset \). If \(s\prec v\), then , where \(h\in \left\{ 0,1,2\right\} \), and therefore , a contradiction. However, if \(s\ne v|\left( k_{n}-1\right) \), then from Lemma 5.1 we get \(G_{s}^{i}\cap J_{v}\subset G_{s}^{i}\cap J_{v|\left( k_{n}-1\right) }=\emptyset \), a contradiction. This finishes the proof of the inclusion \(C\left( \lambda \right) -C\left( \lambda \right) \subset \left[ -1,1\right] {\setminus } \bigcup \mathcal {G}\).

Let \(a_{n}\) denote the number of elements of the set \(\mathcal {G}\left( n\right) \). From Lemma 5.1 it follows that \(G_{s}^{i}\ne G_{u}^{j}\) for any \(G_{s}^{i},G_{u}^{j}\in \mathcal {G}\) such that \(\left( s,i\right) \ne \left( u,j\right) \). Hence \(a_{1}=2\) and \(a_{n+1}=2+2 \sum _{i=1}^{n}a_{i} \). It is easy to check that the sequence \(a_{n}=2\cdot 3^{n-1}\) is a solution of this recurrence equation. Since the intervals in \( \mathcal {G}\) are pairwise disjoint and the length of each interval from \( \mathcal {G}\left( n\right) \) is equal to \(d_{k_{n}-1}-3d_{k_{n}}\), we have that

$$\begin{aligned} \left| \bigcup \mathcal {G}\right| =\sum _{n=1}^{\infty }\sum _{G\in \mathcal {G}\left( n\right) }\left| G\right| =\sum _{n=1}^{\infty }2\cdot 3^{n-1}\left( d_{k_{n}-1}-3d_{k_{n}}\right) . \end{aligned}$$

\(\square \)

Finally, we give the proof of Theorem 3.2.

Proof

If \(n\in \mathbb {N}\), \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \(i\in \left\{ 0,1\right\} \), \(u\in \left\{ 0,1,2\right\} ^{k_{n}}\), and \(c\left( G_{s}^{i}\right) =c\left( J_{u}\right) \), then we write \(G_{s}^{i}\subset _{*}J_{u}\). Of course, \(G_{s}^{i}\subset _{*}J_{u}\) implies \( G_{s}^{i}\subset J_{u}\). From Proposition 2.1 and (3.1) it follows that

$$\begin{aligned} \left| J_{u}\right| -\left| G_{s}^{i}\right| =2d_{k_{n}}-\left( d_{k_{n}-1}-3d_{k_{n}}\right) =\left( \delta _{n}-\left( d_{k_{n}-1}-d_{k_{n}}\right) \right) +\left( 4d_{k_{n}}-\delta _{n}\right) =2\delta _{n+1}. \end{aligned}$$

Thus, the condition \(G_{s}^{i}\subset _{*}J_{u}\) is equivalent to the condition

$$\begin{aligned} l\left( G_{s}^{i}\right) -l\left( J_{u}\right) =\delta _{n+1}\quad \text {or}\quad r\left( J_{u}\right) -r\left( G_{s}^{i}\right) =\delta _{n+1}. \end{aligned}$$

We first prove (1). The basic idea of the proof is to show (under additional assumptions) that any gap \(G_{s}^{i}\), where \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \(t\prec s\) and \(i\in \left\{ 0,1\right\} \), is covered by an interval \(J_{u}\), where \(u\in \left\{ 0,1,2\right\} ^{k_{n}}\) and \(t\prec u\), that is, the following condition holds

figure a

The proof is divided into a few steps. Let \(m \in \mathbb N\) be such that \(k_{m-1} \le k < k_m\). Fix \(n\ge m\).

Claim 1. If \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \( t\prec s\), and \(i\in \left\{ 0,1\right\} \), then

$$\begin{aligned} \left( \exists _{l\in \left\{ m-1,\ldots ,n-1\right\} }\ \max \left( k,k_{l}\right)<N\left( s,i\right) <k_{l+1}\right) \Rightarrow \left( \alpha _{n}\right) . \end{aligned}$$

Let us write \(N:=N\left( s,i\right) \) and consider two cases.

1\(^{\text {o}}\) \(i=0\). Then, \(N=\max \left\{ j:s_{j}>0\right\} \), \(s_{N}\in \left\{ 1,2\right\} \), and , where \(p\in \left\{ 0,1,2\right\} ^{N-1}\). Define a sequence \(u\in \left\{ 0,1,2\right\} ^{k_{n}}\) in the following way:

$$\begin{aligned} u_{j}:=\left\{ \begin{array}{lll} s_{j} &{}\quad \text {if} &{} j\le N-1 \\ s_{N}-1 &{}\quad \text {if} &{} j=N \\ 1 &{}\quad \text {if} &{} j\in \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \\ 2 &{}\quad \text {if} &{} j>N,j\notin \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \end{array} \right. . \end{aligned}$$

Since \(k<N\), we have \(t\prec s|\left( N-1\right) \prec u\). Moreover, \( G_{s}^{0}\subset _{*}J_{u}\) because from (3.1) and Proposition 2.1 it follows that

2\(^{\text {o}}\) \(i=1\). Then, \(N=\max \left\{ j:s_{j}<2\right\} \), \(s_{N}\in \left\{ 0,1\right\} \), and , where \(p\in \left\{ 0,1,2\right\} ^{N-1}\). Let us define a sequence \(u\in \left\{ 0,1,2\right\} ^{k_{n}}\) in the following way:

$$\begin{aligned} u_{j}:=\left\{ \begin{array}{lll} s_{j} &{}\quad \text {if} &{} j\le N-1 \\ s_{N}+1 &{}\quad \text {if} &{} j=N \\ 1 &{}\quad \text {if} &{} j\in \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \\ 0 &{}\quad \text {if} &{} j>N,j\notin \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \end{array} \right. . \end{aligned}$$

Then, \(t\prec u\) and \(G_{s}^{1}\subset _{*}J_{u}\) because

This finishes the proof of Claim 1.

Claim 2. If \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \( t\prec s\), \(i\in \left\{ 0,1\right\} \), and \(N:=N\left( s,i\right) \), then

$$\begin{aligned} \left( \exists _{l\in \left\{ m,\ldots ,n-1\right\} }\ \exists _{v\in \left\{ 0,1,2\right\} ^{k_{l}}}\ N=k_{l}\wedge t\prec v\wedge G_{s|\left( N-1\right) }^{s_{N}-1+i}\subset _{*}J_{v}\right) \Rightarrow \left( \alpha _{n}\right) . \end{aligned}$$

Let us consider two cases.

1\(^{\text {o}}\) \(i=0\). Then, \(N=\max \left\{ j:s_{j}>0\right\} \), \(s_{N}\in \left\{ 1,2\right\} \), and , where \(p=s|\left( N-1\right) \in \left\{ 0,1,2\right\} ^{N-1}\). Observe that \(l\left( J_{s}\right) =l\left( J_{s|N}\right) =r\left( G_{p}^{s_{N}-1}\right) \). By the assumption, \(G_{p}^{s_{N}-1}\subset _{*}J_{v}\). Define the sequence \(u\in \left\{ 0,1,2\right\} ^{k_{n}}\) in the following way:

$$\begin{aligned} u_{j}:=\left\{ \begin{array}{lll} v_{j} &{}\quad \text {if} &{} j\le k_{l} \\ 1 &{}\quad \text {if} &{} j\in \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \\ 2 &{}\quad \text {if} &{} j>k_{l},j\notin \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \end{array} \right. . \end{aligned}$$

Since \(k<k_{m}\le k_{l}=N\), we have that \(t\prec v|\left( N-1\right) \prec u\). Moreover, \(G_{s}^{0}\subset _{*}J_{u}\) because from (3.1 ) and Proposition 2.1 it follows that

$$\begin{aligned} l\left( G_{s}^{0}\right) -l\left( J_{u}\right)= & {} \left( l\left( J_{s}\right) +2d_{k_{n}}\right) -\left( r\left( J_{u}\right) -2d_{k_{n}}\right) \\= & {} 4d_{k_{n}}+\left( r\left( G_{p}^{s_{N}-1}\right) -r\left( J_{v}\right) \right) +\left( r\left( J_{v}\right) -r\left( J_{u}\right) \right) \\= & {} 4d_{k_{n}}-\delta _{l+1}+\sum _{r=l+1}^{n-1}\left( 2-1\right) \left( d_{k_{r}-1}-d_{k_{r}}\right) \\= & {} 4d_{k_{n}}-\delta _{l+1}+\sum _{r=l+1}^{n-1}\left( \delta _{r}-\delta _{r+1}\right) =4d_{k_{n}}-\delta _{n}=\delta _{n+1}. \end{aligned}$$

2\(^{\text {o}}\) \(i=1\). Then, \(N=\max \left\{ j:s_{j}<2\right\} \), \(s_{N}\in \left\{ 0,1\right\} \), and , where \(p=s|\left( N-1\right) \in \left\{ 0,1,2\right\} ^{N-1}\). Observe that \(r\left( J_{s}\right) =r\left( J_{s|N}\right) =l\left( G_{p}^{s_{N}}\right) \). By the assumption, \(G_{p}^{s_{N}}\subset _{*}J_{v}\). Let us define the sequence \(u\in \left\{ 0,1,2\right\} ^{k_{n}}\) in the following way:

$$\begin{aligned} u_{j}:=\left\{ \begin{array}{lll} v_{j} &{}\quad \text {if} &{} j\le k_{l} \\ 1 &{}\quad \text {if} &{} j\in \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \\ 0 &{}\quad \text {if} &{} j>k_{l},j\notin \left\{ k_{l+1},\ldots ,k_{n-1}\right\} \end{array} \right. . \end{aligned}$$

Similarly as in case 1\(^{\text {o}}\), we get \(t\prec u\) and \(r\left( J_{u}\right) -r\left( G_{s}^{1}\right) =\delta _{n+1}\), so \(G_{s}^{1}\subset _{*}J_{u}\). This completes the proof of Claim 2.

**

Claim 3. If \(n\ge m\), \(s\in \left\{ 0,1,2\right\} ^{k_{n}-1}\), \(t\prec s\), and \(i\in \left\{ 0,1\right\} \), then

$$\begin{aligned} G_{s}^{i}\in \mathcal {G}_{t}\left( n\right) \quad \text {or}\quad ( \alpha _{n}{} ) . \end{aligned}$$
(5.1)

We prove Claim 3 inductively. Let \(n=m\). If \(k=k_{m}-1\), then \(s=t\) and \( \mathcal {G}_{t}\left( m\right) =\left\{ G_{t}^{0},G_{t}^{1}\right\} \), so ( 5.1) holds. If \(k<k_{m}-1\) and , then \(N\left( s,i\right) >k\) and from Claim 1 we infer that (\(\alpha _{m}\)) holds. Hence in this case, condition (5.1 ) is also satisfied.

Assume now that \(n\ge m\) and for any \(l\in \left\{ m,\ldots ,n\right\} \), any \(s\in \left\{ 0,1,2\right\} ^{k_{l}-1}\) such that \(t\prec s\), and any \( i\in \left\{ 0,1\right\} \), \(G_{s}^{i}\in \mathcal {G}_{t}\left( l\right) \) or (\(\alpha _{l}\)) holds. Let \(s\in \left\{ 0,1,2\right\} ^{k_{n+1}-1}\), \( t\prec s\), \(i\in \left\{ 0,1\right\} \), and \(N:=N\left( s,i\right) \). We can assume that \(i=0\) (for \(i=1\), the proof is analogous). If \(N\le k\), then , and consequently \(G_{s}^{0}\in \mathcal {G}_{t}\left( n+1\right) \). Let us assume that \(N>k\) and consider two cases.

1\(^{\text {o}}\) There exists \(l\in \left\{ m-1,\ldots ,n\right\} \) such that \( k_{l}<N<k_{l+1}\). Then, from Claim 1 it follows that (\(\alpha _{n+1}\)) is satisfied, so condition (5.1) holds for \(n+1\).

2\(^{\text {o}}\) There exists \(l\in \left\{ m,\ldots ,n\right\} \) such that \( N=k_{l}\). If there is a sequence \(v\in \left\{ 0,1,2\right\} ^{k_{l}}\) such that \(t\prec v\ \)and \(G_{s|\left( N-1\right) }^{s_{N}-1}\subset _{*}J_{v} \), then Claim 2 implies (\(\alpha _{n+1}\)). In the other case, for the sequence \(s|\left( N-1\right) \) and \(i=s_{N}-1\), condition (\(\alpha _{l}\)) is not satisfied. Thus, the inductive hypothesis leads to \(G_{s|\left( N-1\right) }^{s_{N}-1}\in \mathcal {G}_{t}\left( l\right) \). If \(s_{N}=1\), then and \(G_{s|\left( N-1\right) }^{0}\in \mathcal {G} _{t}\left( l\right) \), while if \(s_{N}=2\), then and \( G_{s|\left( N-1\right) }^{1}\in \mathcal {G}_{t}\left( l\right) \). In both cases, \(G_{s}^{0}\in \mathcal {G}_{t}\left( n+1\right) \). This finishes the proof of (5.1) for \(n+1\).

Claim 4. Let \(x\in J_{t}{\setminus } \bigcup G_{t}\). For any \(n\ge m\), we have

$$\begin{aligned} \exists _{u\in \left\{ 0,1,2\right\} ^{k_{n}}}\left( t\prec u\wedge x\in J_{u}\right) . \end{aligned}$$
(5.2)

We prove Claim 4 inductively. Let \(n=m\). Since \(\lambda _{k+1},\ldots ,\lambda _{k_{m}-1}\ge \frac{1}{3}\), Proposition 2.1(8) implies that there exists a sequence \(s\in \left\{ 0,1,2\right\} ^{k_{m}-1}\) such that \(t\prec s\ \) and \(x\in J_{s}\) (if \(k=k_{m}-1\), we put \(s=t\)). Hence or \(x\in G_{s}^{0}\cup G_{s}^{1}\). In the first case, condition (5.2) is satisfied for . Let us assume that \(x\in G_{s}^{0}\cup G_{s}^{1}\). We may assume that \(x\in G_{s}^{0}\) (if \(x\in G_{s}^{1}\), the proof is analogous). Since \(x\notin \bigcup \mathcal {G}_{t}\), \( G_{s}^{0}\notin \mathcal {G}_{t}\left( m\right) \). Using Claim 3, we deduce that there is a sequence \(u\in \left\{ 0,1,2\right\} ^{k_{n}}\) such that \( t\prec u\) and \(G_{s}^{i}\subset _{*}J_{u}\). This completes the proof of (5.2) for \(n=m\).

Assume now that \(n\ge m\) and condition (5.2) holds for n, i.e. there is a sequence \(v\in \left\{ 0,1,2\right\} ^{k_{n}}\) such that \(t\prec v\ \) and \(x\in J_{v}\). Since \(\lambda _{k_{n}+1},\ldots ,\lambda _{k_{n+1}-1}\ge \frac{1}{3}\), Proposition 2.1(8) shows that there is a sequence \(s\in \left\{ 0,1,2\right\} ^{k_{n+1}-1}\) such that \(t\prec s\ \) and \(x\in J_{s}\). From Claim 3 and (\(\alpha _{n+1}\)) we infer the existence of a sequence \(u\in \left\{ 0,1,2\right\} ^{k_{n+1}}\) such that \(t\prec u\ \) and \(x\in J_{u}\), which finishes the proof of (5.2) for \(n+1\).

From Claim 4 it follows that \(J_{t}{\setminus } \bigcup \mathcal {G}_{t}\subset \bigcup _{u\in \left\{ 0,1,2\right\} ^{k_{n}},t\prec u}J_{u}\subset C_{k_{n}}\left( \lambda \right) -C_{k_{n}}\left( \lambda \right) \) for \( n\ge m\), and consequently

$$\begin{aligned} J_{t}\setminus \bigcup \mathcal {G}_{t}\subset \bigcap _{n=m}^{\infty }\left( C_{k_{n}}\left( \lambda \right) -C_{k_{n}}\left( \lambda \right) \right) =C\left( \lambda \right) -C\left( \lambda \right) , \end{aligned}$$

so (1) holds. From Theorem 3.1 we deduce that the set \( C\left( \lambda \right) -C\left( \lambda \right) \) has nonempty interior and, by Theorems 2.2 and 2.3, it is a Cantorval. If \(t=\emptyset \), then Theorem 3.1 implies \(C\left( \lambda \right) -C\left( \lambda \right) \subset \left[ -1,1\right] {\setminus } \bigcup \mathcal {G}_{t}\). Thus, \(C\left( \lambda \right) -C\left( \lambda \right) =\left[ -1,1\right] {\setminus } \bigcup \mathcal {G}_{t}\). Using once again Theorem 3.1, we get

$$\begin{aligned} \left| C\left( \lambda \right) -C\left( \lambda \right) \right| =2-\left| \bigcup \mathcal {G}_{t}\right| =2-2\sum _{n=1}^{\infty }3^{n-1}\left( d_{k_{n}-1}-3d_{k_{n}}\right) . \end{aligned}$$

\(\square \)