Hostname: page-component-857557d7f7-v48vw Total loading time: 0 Render date: 2025-12-08T12:01:20.821Z Has data issue: false hasContentIssue false

Distribution of integers with digit restrictions via Markov chains

Published online by Cambridge University Press:  01 December 2025

VICENTE SAAVEDRA-ARAYA*
Affiliation:
Mathematics Institute, University of Warwick , Coventry CV4 7AL, UK
Rights & Permissions [Opens in a new window]

Abstract

In this paper, we introduce a new technique to study the distribution in residue classes of sets of integers with digit and sum-of-digits restrictions. From our main theorem, we derive a necessary and sufficient condition for integers with missing digits to be uniformly distributed in arithmetic progressions, extending previous results going back to the work of Erdős, Mauduit and Sárközy. Our approach uses Markov chains and does not rely on Fourier analysis as many results of this nature do. Our results apply more generally to the class of multiplicatively invariant sets of integers. This class, defined by Glasscock, Moreira and Richter using symbolic dynamics, is an integer analogue to fractal sets and includes all missing digits sets. We address uniform distribution in this setting, partially answering an open question posed by the same authors.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press

1 Introduction

In this paper, we investigate the distribution of sets of integers formed by imposing restrictions on the digits in a given base. Throughout this paper, we denote by ${\mathbb N}_0$ the set of natural numbers including zero. For an integer $g\geq 2$ and a set of digits ${\mathcal {D}\subseteq \{0,\ldots ,g-1\}}$ , let

(1.1) $$ \begin{align} \mathcal{C}_{g,\mathcal{D}}:=\bigg\{\sum_{i=0}^m w_ig^i:\ m\in {\mathbb N}_0, \ w_i\in \mathcal{D} \bigg\} \end{align} $$

be the set of non-negative integers that can be written in base g only using digits of $\mathcal {D}$ . Such sets have been widely studied (see, for example, [Reference Erdős, Mauduit and Sárközy18, Reference Kempner29, Reference Mahler38, Reference Maynard41]), and we will refer to them as missing digits sets. A broader class of integers was introduced by Glasscock, Moreira and Richter in [Reference Glasscock, Moreira and Richter27].

Definition 1.1. Let $g\geq 2$ be an integer. The set $A\subseteq {\mathbb N}_0$ is said to be $\times g$ -invariant if for every $n\in A$ with base-g expansion given by $n=w_mg^m+\cdots +w_1g+w_0$ , where $m\in {\mathbb N}_0$ and $w_m\neq 0$ , it holds

$$ \begin{align*}w_{m-1}g^{m-1}+\cdots+w_1g+w_0\in A \quad \text{and}\quad w_{m}g^{m-1}+\cdots+w_{2}g+w_1\in A.\end{align*} $$

We say a set of integers is multiplicatively invariant if it is $\times g$ -invariant for some $g\geq 2$ .

Notice that the first condition in Definition 1.1 indicates that the set A is invariant under the operation of deleting the most significant digit in base g, while the second condition ensures that it is invariant under the operation of deleting the least significant digit. Clearly, integers with missing digits belong to this class, but so do many other sets described by broader digit restrictions (for example, by forbidding specific combinations of digits). Unlike missing digits sets, much less is known about multiplicatively invariant sets.

Motivated by the study of the distribution of integers with missing digits in arithmetic progressions by Erdős, Mauduit and Sárközy in [Reference Erdős, Mauduit and Sárközy18], and by an open question posed by Glasscock, Moreira and Richter in [Reference Glasscock, Moreira and Richter27, Question 5.6] concerning the interaction between multiplicatively invariant sets and arithmetic progressions, this paper investigates distribution properties of multiplicatively invariant sets. A central idea is to understand when a set of integers visits different congruence classes with the same frequency. In this sense, $A\subseteq {\mathbb N}_0$ is said to be uniformly distributed $\mathrm {mod}\ a$ (or in arithmetic progressions) if

$$ \begin{align*}\lim_{N\to \infty}\dfrac{|\{n\in A:\ n\equiv b\ \mathrm{mod}\ a\}\cap [0,N)|}{|A\cap [0,N)|}=\dfrac{1}{a}\end{align*} $$

for every $b\in {\mathbb Z}_a:={\mathbb Z}/a{\mathbb Z}$ . To explore this idea in more generality, we use the notion of g-additive functions (first considered by Bellman and Shapiro in [Reference Bellman and Shapiro7]). We say $f:{\mathbb N}_0\to {\mathbb Z}$ is g-additive if

$$ \begin{align*}f\bigg(\sum_{i=0}^m w_ig^i\bigg)=\sum_{i=0}^m f(w_ig^i)\end{align*} $$

for every $w_0,\ldots ,w_m\in \{0,\ldots ,g-1\}.$ Let $A\subseteq {\mathbb N}_0$ be $\times g$ -invariant and $r\in {\mathbb N}$ . For all $i\in \{1,\ldots ,r\}$ , let $f_i$ be a g-additive function, $a_i\in {\mathbb N}$ and $b_i\in {\mathbb Z}_{a_i}$ . The main objective in this work is to study the limiting behaviour of

(1.2) $$ \begin{align} \frac{|\{n\in A:\ f_i(n)\equiv b_i\ \mathrm{mod}\ a_i \text{ for } i=1,\ldots,r\}\cap [0,N)|}{|A\cap [0,N)|}\end{align} $$

when $N\to \infty $ , and determine conditions to guarantee the limit equals to $1/(a_1\cdot a_2\cdots a_r)$ for all $b_i\in {\mathbb Z}_{a_i}$ . When this happens, we will say that A is uniformly distributed $\mathbf {f}\ \mathrm {mod}\ \mathbf {a}$ , where $\mathbf {f}=(f_1,\ldots ,f_r)$ and $\mathbf {a}=(a_1,\ldots ,a_r)$ . Our main idea lies in the construction of suitable Markov chains that capture the behaviour of (1.2), and then study it using classical convergence results for Markov chains. Before stating our main results, we will briefly review some previous results and introduce the context of the problem to be investigated.

1.1 History and context

The study of the distribution of sets of integers with digit restrictions dates back to the works of Fine [Reference Fine20] and Gelfond [Reference Gelfond25]. For an integer $g\geq 2$ , they considered the function sum-of-digits in base g, denoted by $S_g$ and defined as follows. If $w_0,\ldots ,w_{m}\in \{0,\ldots ,g-1\}$ ,

(1.3) $$ \begin{align}S_g\bigg(\sum_{i=0}^m w_ig^i\bigg)=w_0+\cdots+w_m.\end{align} $$

In this context, Gelfond studied the interplay between n and $S_g(n)$ for positive integers in terms of their distribution in residue classes, providing sufficient conditions for uniform distribution. A straightforward consequence of [Reference Gelfond25, Theorem 1] is presented as the following corollary.

Corollary 1.2. Let $a,a'\in {\mathbb N}$ such that $\gcd (g-1,a')=1$ . Then,

(1.4) $$ \begin{align} \lim_{N\to \infty}\dfrac{|\{n\leq N:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}|}{N}=\dfrac{1}{aa'} \end{align} $$

for any $b\in {\mathbb Z}_a$ and $b'\in {\mathbb Z}_{a'}$ .

It is worth mentioning that Gelfond’s result also gives quantitative information about the convergence. Corollary 1.2 shows that the sequences $n\ \mathrm {mod}\ a$ and $S_g(n)\ \mathrm {mod}\ a'$ are independent; in other words, integers with a fixed sum of digits $ \mathrm {mod}\ a'$ are uniformly distributed in arithmetic progressions (a related result can be found in [Reference Mauduit and Sárközy40]). As part of our work, we provide an equivalent condition to the uniform distribution exhibited in (1.4), thereby extending previous works. Results concerning the independence between sum-of-digits functions in different bases can be found in [Reference Bésineau8, Reference Kim30]. For an overview of results of this type, see [Reference Sándor and Crstici46, §4.3].

In a related direction, the distribution of missing digits sets in residue classes was initially studied by Erdős, Mauduit and Sárközy. Let $\mathcal {D}\subset \{0,\ldots ,g-1\}$ be a subset of digits (with at least two elements). Regarding the set $\mathcal {C}_{g,\mathcal {D}}$ defined in (1.1), they showed the following result in [Reference Erdős, Mauduit and Sárközy18, Theorem 1].

Theorem 1.3. Assume $\gcd (g(g-1),a)=1$ , $0\in \mathcal {D}$ and $\gcd \{d\in \mathcal {D}:\ d\neq 0\}=1.$ Then, there exists $c_1,c_2$ and $c_3$ (all dependent only on g and $|\mathcal {D}|)$ such that

$$ \begin{align*}\bigg|\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a\}\cap [0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap[0,N)|}-\dfrac{1}{a}\bigg|\leq \dfrac{c_2}{m}\exp \bigg(-c_3\dfrac{\log(N)}{\log(a)}\bigg)\end{align*} $$

for any $a<\exp (c_1(\log (N))^{1/2})$ and $b\in {\mathbb Z}_a$ .

Further generalization of Theorem 1.3 was provided by Konyagin [Reference Konyagin31, Corollary 1] and Aloui [Reference Aloui2, Corollary 2.2], with the latter also generalizing Corollary 1.2 to the case of missing digits sets. A qualitative version of Theorem 1.3 can be presented as the following corollary.

Corollary 1.4. Assume $\gcd (g(g-1),a)=1$ , $0\in \mathcal {D}$ and $\gcd \{d\in \mathcal {D}:\ d\neq 0\}=1.$ Then, $\mathcal {C}_{g,\mathcal {D}}$ is uniformly distributed $\mathrm {mod}\ a$ .

As a consequence of our work, we strengthen Corollary 1.4, providing an equivalent condition to the uniform distribution when $\gcd (g,a)=1$ .

The study of arithmetic properties for sets with digit restrictions has been an active area in number theory and is not limited to the problems covered in this paper. Different directions that have been explored include, for instance, studies on the number of prime factors for elements of sets with digit restrictions [Reference Dartyge and Mauduit12, Reference Dartyge and Mauduit13, Reference Erdős, Mauduit and Sárközy19, Reference Konyagin, Mauduit and Sárközy32], as well as properties of divisibility [Reference Banks and Shparlinski6, Reference Col11]. It is also worth mentioning the breakthrough work of Mauduit and Rivat [Reference Mauduit and Rivat39] about the distribution of the function sum-of-digits for primes in residue classes and the works of Maynard [Reference Maynard41, Reference Maynard42] about primes with missing digits, showing the existence of infinitely many primes with one missing digit. Additional references include [Reference Aloui, Mauduit and Mkaouar3, Reference Banks, Conflitti and Shparlinski5, Reference Dartyge, Mauduit and Sárközy14Reference Drmota, Mauduit and Rivat17, Reference Moshchevitin and Shkredov43, Reference Swaenepoel49Reference Walker and Walker51, Reference Yu54].

However, a famous conjecture in fractal geometry and dynamical systems was posed by Furstenberg in [Reference Furstenberg23], which stated that $\times p \mod 1$ and $\times q\mod 1$ invariant sets of $[0,1]$ are transverse when $\log (p)/\log (q)\notin \mathbb {Q}$ . (For a given notion of dimension, the sets $A,B\subseteq [0,1]$ are said to be transverse if $\dim (A\cap B)\leq \max \{0,\dim (A)+\dim (B)-1\}$ .) This conjecture was independently proven by Shmerkin [Reference Shmerkin47] and Wu [Reference Wu53] (see [Reference Austin4] for an alternative proof). Motivated by an integer version of this conjecture, Glasscock, Moreira and Richter introduced multiplicatively invariant sets of integers (Definition 1.1), proving in [Reference Glasscock, Moreira and Richter27, Theorem B] an analogous result to Furstenberg’s conjecture in the setting of integer fractals. Seeking a better understanding of invariant sets and their interaction with other sets from a fractal point of view, they raised the following question [Reference Glasscock, Moreira and Richter27, Question 5.6].

Open question 1.5. Let $A\subseteq {\mathbb N}_0$ be a multiplicatively invariant set and P be an arithmetic progression. Is it true that $\dim (A\cap P)$ is either 0 or $\dim (A)$ ?

Particularly, they used the notion of mass dimension (see Definition 2.11). The answer to this question is only known for certain missing digits sets (those covered by previous results about uniform distribution), but has not been explored in generality. In this paper, we provide a negative answer to this question in the general case and describe a class of sets where the answer is affirmative. Finally, we propose a conjecture identifying the precise class of multiplicatively invariant sets that satisfy this property.

1.2 Overview of main results

The main contribution of this paper lies in the introduction of a new approach to study the distribution of certain sets of integers via Markov chains. From this technique, we can retrieve several results, some of which are presented below.

In the direction of the works of Fine [Reference Fine20], Gelfond [Reference Gelfond25], and Erdős, Mauduit and Sárközy [Reference Erdős, Mauduit and Sárközy18], we study the distribution in residue classes of set of integers with digits restrictions. A first consequence of Theorem 4.9, our main technical result, establishes conditions for a set with missing digits to be uniformly distributed in residue classes. In contrast to Corollary 1.4 and Aloui’s result [Reference Aloui2, Theorem 2.9], which provide only sufficient conditions, our result offers conditions that are both necessary and sufficient for uniform distribution.

Theorem A. Let $g\geq 2$ be an integer and $a,a'\in {\mathbb N}$ such that $\gcd (g,a)=\gcd (a,a')=1$ . Let $\mathcal {D}=\{d_1,\ldots ,d_t\}\subseteq \{0,\ldots ,g-1\}$ be a subset of digits (where $d_1<\cdots <d_t$ ) and $\mathcal {C}_{g,\mathcal {D}}$ be the missing digits set defined in (1.1). Then,

$$ \begin{align*}\lim_{N\to\infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}\cap [0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,N)|}=\dfrac{1}{aa'} \end{align*} $$

for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ if and only if $\gcd (aa',d_2-d_1,\ldots ,d_t-d_1)=1.$

Indeed, we provide a comprehensive description of the limiting distribution even when $\gcd (aa',d_2-d_1,\ldots ,d_t-d_1)\neq 1$ (Theorem 5.4) and offer insight into the rate of convergence. In Proposition 5.7, we also present an equivalent condition without the assumption $\gcd (a,a')=1$ .

By setting $a'=1$ , we generalize Corollary 1.4 by providing an equivalent condition. Furthermore, we are able to recover the same convergence speed as that obtained by Erdős, Mauduit and Sárközy, albeit with a difference in the constants involved.

Corollary A. Let $g\geq 2$ be an integer and $a\in {\mathbb N}$ such that $\gcd (g,a)=1$ . Let $\mathcal {D}=\{d_1,\ldots ,d_t\}\subseteq \{0,\ldots ,g-1\}$ be a subset of digits, where $d_1<\cdots <d_t.$ Then, $\mathcal {C}_{g,\mathcal {D}}$ is uniformly distributed $\ \mathrm {mod}\ a$ if and only if $\gcd (a,d_2-d_1,\ldots ,d_t-d_1)=1.$

For a full description of the distribution $\mathrm {mod}\ a$ , see Corollary 5.5. Our results are not limited to the distribution of integers with missing digits, but more general digit restrictions are allowed. In §§5.3 and 5.4, we address more general restrictions and provide examples of sets with missing combinations of digits that exhibit uniform distribution. Additionally, our method allows us to revisit the result of Gelfond, yielding an equivalent condition to the uniform distribution exhibited in (1.4). In particular, this shows that the sufficient condition $\gcd (g-1,a')=1$ provided in Corollary 1.2 is not necessary.

Theorem B. Let $g\geq 2$ be an integer and $a,a'\in {\mathbb N}$ . Then,

$$ \begin{align*} \lim_{N\to\infty}\dfrac{|\{n\leq N:\ n\equiv b\ \mathrm{mod}\ a, \ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}|}{N}=\dfrac{1}{aa'} \end{align*} $$

for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ if and only if there exists $n\in {\mathbb N}$ such that $n\equiv 0\ \mathrm {mod}\ a$ and $S_g(n)\equiv 1\ \mathrm {mod}\ a'.$

Notice that the existence of $n\in {\mathbb N}$ that satisfies $n\equiv 0\ \mathrm {mod}\ a$ and $S_g(n)\equiv 1 \mathrm {mod}\ a'$ can be established from an elementary construction under the condition $\gcd (g-1,a')=1$ . (The author is grateful for the useful construction provided in https://mathoverflow.net/q/482398.)

Finally, we provide a negative answer in the general case to the open question posed by Glasscock, Moreira and Richter [Reference Glasscock, Moreira and Richter27, Question 5.6], and we provide a description using symbolic dynamics of sets of integers satisfying affirmatively the statement. An important idea is that every multiplicatively invariant set of integers can be characterized by a dynamical structure known as a subshift (see Proposition 2.13). Two important classes of subshifts are sofic subshifts and transitive subshifts (see §2.2 for details). Using these notions, we establish the following partial answer to the Open question 1.5.

Theorem C. Let $A\subseteq {\mathbb N}_0$ be a $\times g$ -invariant set that can be represented by a transitive sofic subshift. Then, for every infinite arithmetic progression P, $\dim _{\mathrm {{M}}}(A\cap P)$ is either 0 or $\dim _{\mathrm {{M}}}(A)$ . Moreover, if the subshift is only transitive, or only sofic, the result is not always true.

Refer to Theorem 6.7 for a more general version of this result. Furthermore, we show that the sofic and transitive setting is not optimal, as the affirmative answer can be extended to more general classes of subshifts. Thus, using the notion of topological entropy (see Definitions 2.3 and 6.10), we propose the following conjecture.

Conjecture 1.6. Let $A\subseteq {\mathbb N}_0$ be a $\times g$ -invariant set. There exists an entropy minimal subshift that represents A if and only if, for every arithmetic progression P, $\dim _{\mathrm {{M}}}(A\cap P)$ is either 0 or $\dim _{\mathrm {{M}}}(A)$ .

1.3 Outline of the proof

We present an outline of the proof of Corollary A. Despite being a consequence of more general results, the proof contains the key ideas of this paper while avoiding some obstructions that arise when dealing with additional digit restrictions.

Consider an integer $g\geq 2$ , an integer $a\in {\mathbb N}$ coprime with g and a set of digits $\mathcal {D}=\{d_1,\ldots ,d_t\}\subseteq \{0,\ldots ,g-1\}$ . We aim to construct Markov chains that describe the behaviour of

(1.5) $$ \begin{align} \dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b \ \mathrm{mod}\ a\}\cap [0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,N)|} \end{align} $$

when $N\to \infty $ . For a finite sequence of digits $w=w_0w_1\cdots w_m$ (we call it a word of length $m+1$ ), we denote

$$ \begin{align*}(w)_g:=w_mg^m+\cdots+w_1g+w_0. \end{align*} $$

We identify $\mathcal {D}^i$ with the set of words of length i and we say $w\in \mathcal {D}^i$ represents $n\in {\mathbb N}_0$ if $(w)_g=n$ . Clearly,

$$ \begin{align*}\mathcal{C}_{g,\mathcal{D}}=\{(w)_g:\ w\in \mathcal{D}^n \text{ for } n\in {\mathbb N}_0\}, \end{align*} $$

so equivalently, we can study the behaviour of (1.5) in terms of words. For every i, we define the measure $\mu _{i}$ on ${\mathbb Z}_a$ as

$$ \begin{align*}\mu_{i}(\{b\}):=\dfrac{|\{w\in \mathcal{D}^{i}:\ (w)_g\equiv b\ \mathrm{mod}\ a\}|}{|\mathcal{D}|^{i}}. \end{align*} $$

For simplicity, we will denote $\mu _i(b)=\mu _i(\{b\})$ . This measure represents the distribution in ${\mathbb Z}_a$ of elements in $\mathcal {C}_{g,\mathcal {D}}$ that can be expressed using i digits of $\mathcal {D}$ in base g. Our goal is to understand the evolution of $\mu _i$ , and to do this, we will study how a word of length i is extended. (We say $x'=x^{\prime }_0\cdots x^{\prime }_k$ is an extension of $x=x_0\cdots x_m$ if $k>m$ and ${x^{\prime }_j=x_j}$ for all $j\leq m$ .) For this purpose, we consider $p\in {\mathbb N}$ such that $g^p\equiv 1\ \mathrm {mod}\ a(g-1)$ (whose existence is guaranteed by the condition $\gcd (g,a)=1$ ). Let us define the sets $E_{i}$ for $i\in {\mathbb N}$  as

(1.6) $$ \begin{align}E_{i}(b):=\{w\in \mathcal{D}^{p}:\ g^i(w)_g\equiv b\ \mathrm{mod}\ a\}, \end{align} $$

and we also define the matrix on ${\mathbb Z}_a\times {\mathbb Z}_a$ given by

$$ \begin{align*}M_{i}(b,b'):=\dfrac{|E_{i}(b'-b)|}{|\mathcal{D}|^p}.\end{align*} $$

It is easy to see that $M_i$ is a double stochastic matrix. Let $n\in {\mathbb N}$ and let $x\in \mathcal {D}^{i+np}$ such that $(x)_g\equiv b\ \mathrm {mod}\ a$ . We can ask the following question. For $b'\in {\mathbb Z}_a$ , how many extensions $x'\in \mathcal {D}^{i+(n+1)p}$ of x satisfy $(x')_g\equiv b'\ \mathrm {mod}\ a$ ? The answer is the cardinality of ${E_{i+np}(b'-b)}$ and we can observe that $E_{i}(b-b')=E_{i+np}(b-b')$ since $g^{np}\equiv 1\mod a$ . From this, we can obtain the relation

$$ \begin{align*}\mu_{i+np}=\mu_{i}M_{i}^n. \end{align*} $$

If $X^i$ is a Markov chain with initial distribution $\mu _{i}$ and transition matrix $M_{i}$ , it holds that

$$ \begin{align*}\mathbb{P}(X_n^i=b)=\mu_{i+np}(b). \end{align*} $$

Moreover, if $X^i$ is irreducible and aperiodic, the Markov chain converges to its invariant distribution, and hence,

(1.7) $$ \begin{align} \lim_{n\to \infty}\mathbb{P}(X^{i}_n=b)=\lim_{n\to \infty}\dfrac{|\{w\in \mathcal{D}^{i+np}:\ (w)_g\equiv b\mod a\}|}{|\mathcal{D}|^{i+np}}=\dfrac{1}{a}. \end{align} $$

If $0\notin \mathcal {D}$ , there is a one-to-one correspondence between elements of $\mathcal {C}_{g,\mathcal {D}}$ and words. However, since $(w0\cdots 0)_g=(w)_g$ , every element of $\mathcal {C}_{g,\mathcal {D}}$ can be represented by infinitely many words when $0\in \mathcal {D}$ . By making this distinction and under the assumption that $X^1,\ldots ,X^{p}$ are irreducible and aperiodic, we can elucidate (1.7) in terms of the set of integers with missing digits.

  • If $0\in \mathcal {D}$ ,

    $$ \begin{align*}\lim_{N\to \infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a\}\cap [0,g^N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,g^N)|}=\dfrac{1}{a}.\end{align*} $$
  • If $0\notin \mathcal {D}$ ,

    $$ \begin{align*}\lim_{N\to \infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a\}\cap [g^{N-1},g^N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [g^{N-1},g^N)|}=\dfrac{1}{a}.\end{align*} $$

For an arbitrary set of integers, this does not guarantee the existence of the limit when considering intervals of the form $[0,N)$ . However, as we will prove in §4, in this case, it happens. Therefore, we can show that

(1.8) $$ \begin{align}\lim_{N\to \infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a\}\cap [0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,N)|}=\dfrac{1}{a} \end{align} $$

for every $b\in {\mathbb Z}_a$ . Certainly, we must still ensure that each Markov chain $X^i$ converges to the equilibrium. This property will hold if we choose p as above and $\gcd (a,d_2-d_1,\ldots ,d_t-d_1)=1$ , where $d_1$ is the smallest digit of $\mathcal {D}$ .

Alternatively, if $\gcd (a,d_2-d_1,\ldots ,d_t-d_1)\neq 1$ , it is possible to show that there exist $b\in {\mathbb Z}_a$ and $j\in \{1,\ldots ,p\}$ such that

$$ \begin{align*}\mathbb{P}(X_n^j=b)=0\end{align*} $$

for every $n\in {\mathbb N}$ . From this fact, we will conclude that (1.8) does not hold for such a b.

Some difficulties arise when dealing with additional constraints on the digits, but we will extend the construction presented above to more general cases by leveraging ideas from symbolic dynamics. We are going to discuss this in detail in the following sections.

2 Preliminaries

In this section, we introduce some concepts of Markov chains, symbolic dynamics and integer fractals that will be used throughout this paper.

2.1 Markov chains

Let $\mathcal {S}$ be a finite set and let M be a square matrix indexed by $\mathcal {S}\times \mathcal {S}$ with entries in $[0,1]$ . The matrix M is called stochastic if the sum of each row is 1, that is, for every $s\in \mathcal {S}$ ,

$$ \begin{align*} \sum_{s'\in \mathcal{S}} M(s,s')=1.\end{align*} $$

Given a stochastic matrix M and a probability measure $\mu $ on $\mathcal {S}$ , a discrete-time Markov chain with state space $\mathcal {S}$ , transition matrix M and initial distribution $\mu $ is a sequence of random variables $(X_n)_{n\in {\mathbb N}_0}$ on a probability space (with probability $\mathbb {P}$ ) such that $\mathbb {P}(X_0=s)=\mu (\{s\})=:\mu (s)$ , and

$$ \begin{align*}\mathbb{P}(X_{n+1}=s_{n+1}|X_n=s_n,\ldots,X_0=s_0)=\mathbb{P}(X_1=s_{n+1}|X_0=s_n)=M(s_n,s_{n+1}) \end{align*} $$

for every $n\in {\mathbb N}_0$ and $s_0,\ldots ,s_{n+1}\in \mathcal {S}$ . In this case,

$$ \begin{align*}\mathbb{P}(X_n=s')=\mu \cdot M^n(\cdot,s')=\sum_{s\in\mathcal{S}}\mu(s)M^n(s,s'). \end{align*} $$

For $s,s'\in \mathcal {S}$ , we say that $s'$ is accessible from s if $M^n(s,s')>0$ for some $n\in {\mathbb N}$ . The matrix M is called irreducible if for every $s,s'\in \mathcal {S}$ , there exists $n\in {\mathbb N}$ such that $M^n(s,s')>0$ (that is, all states are accessible from each other). We define the period of the state s as

$$ \begin{align*}\mathrm{Per}(s):=\gcd \{n\in {\mathbb N}: M^n(s,s)>0\}. \end{align*} $$

If every state has period 1, we say M is aperiodic. When M is irreducible, all states share the same period, so aperiodicity can be checked by finding one state with period 1.

The following classical result on the convergence of Markov chains will be a key tool in this paper.

Theorem 2.1. [Reference Levin and Peres35, Theorem 4.9]

Let X be a Markov chain with state space $\mathcal {S}$ (not necessarily finite), transition matrix M and initial distribution $\mu $ . Suppose M is irreducible and aperiodic, and there exists an invariant distribution $\unicode{x3bb} $ for M (that is, $\unicode{x3bb} =\unicode{x3bb} M$ ). Then, there exist $\rho \in (0,1)$ and $C>0$ such that

$$ \begin{align*}|\mathbb{P}(X_n=s)-\unicode{x3bb}(s)|\leq C\rho^n \end{align*} $$

for every $n\in {\mathbb N}$ and $s\in \mathcal {S}$ .

Notice that the invariant distribution for an irreducible and aperiodic transition matrix with a finite state space always exists (and it is unique) as a consequence of the Perron–Frobenius theorem. In addition, Theorem 2.1 is only dependent on the transition matrix, so that $\unicode{x3bb} $ , C and $\rho $ are independent of the initial distribution. A particularly interesting case occurs when the sum of each column of M is also 1, in which case, M is called doubly stochastic. In this case, the distribution $\unicode{x3bb} (s) = 1/|\mathcal {S}|$ is invariant for M. For further discussion on the convergence of Markov chains, see [Reference Norris44, §1.8] and [Reference Rosenthal45, §3].

2.2 Elements of symbolic dynamics

Let $\mathcal {D}$ be a finite set (in this paper, we assume $\mathcal {D}\subseteq \{0,\ldots ,g-1\}$ for some $g\in {\mathbb N}$ ) and consider the left-shift operator $\sigma $ over $\mathcal {D}^{{\mathbb N}_0}$ , defined by

$$ \begin{align*}\sigma: (w_n)_{n\in {\mathbb N}_0}\mapsto (w_{n+1})_{n\in {\mathbb N}_0}. \end{align*} $$

Endowing $\mathcal {D}$ with the discrete topology and considering the product topology on $\mathcal {D}^{{\mathbb N}_0}$ , $\sigma $ is a continuous function, and the topological system $(\mathcal {D}^{{\mathbb N}_0},\sigma )$ is called a full shift. If $\Sigma \subseteq \mathcal {D}^{{\mathbb N}_0}$ is closed and $\sigma (\Sigma )\subseteq \Sigma $ , the dynamical system $(\Sigma ,\sigma )$ is called a subshift. Although a subshift is a set of infinite sequences of symbols, it can be fully characterized by the finite sequences that appear in $\Sigma $ , referred to as words.

We define the language of $\Sigma $ , denoted by $\mathcal {L}(\Sigma )$ , as the set of all the words in $\Sigma $ ,

$$ \begin{align*} \mathcal{L}(\Sigma):= & \{w_0\cdots w_{n-1}:\ n\in {\mathbb N}_0, \\ & \quad \text{there exists } x\in \Sigma \text{ such that } x_0=w_0, \ x_1=w_1,\ldots,\ x_{n-1}=w_{n-1} \}.\end{align*} $$

When there is no confusion, we will simply denote the language by $\mathcal {L}$ . For any word $w=w_0\cdots w_{n-1}\in \mathcal {L}(\Sigma )$ , we say w has length n (and we denote the length by $|w|$ ). The set $\mathcal {L}^n(\Sigma )$ denotes all words in the language of length n. Also, we will commonly use the notions of concatenation of words and subwords. For $u=u_0\cdots u_{m-1}$ and ${v=v_0\cdots v_{n-1}}$ , the concatenation of u with v is written as $uv=u_0\cdots u_{m-1}v_0\cdots v_{n-1}$ and we say that $uv$ is an extension of u. For a given word u and $k\in {\mathbb N}$ , we also denote by $u^k=u\cdots u$ the concatenation k-times of u. We say w is a subword of x if the sequence of x contains w.

A subshift is a particular case of a topological dynamical system and some classical notions of topological dynamics have a special characterization in the context of symbolic systems.

Definition 2.2. The topological dynamical system $(\Sigma ,\sigma )$ is said to be transitive (or irreducible) if for every $u,v\in \mathcal {L}(\Sigma )$ , there exists $w\in \mathcal {L}(\Sigma )$ such that $uwv\in \mathcal {L}(\Sigma ).$ Also, the system is said to be mixing if for every $u,v$ in the language, there exists $n\in {\mathbb N}$ such that for every $m\geq n$ , there exists $w\in \mathcal {L}^m(\Sigma )$ such that $uwv\in \mathcal {L}(\Sigma )$ .

However, the notion of topological entropy is a measure of the complexity of a dynamical system. In symbolic systems, it quantifies the complexity of the language.

Definition 2.3. The (topological) entropy of the subshift $\Sigma $ is defined as

$$ \begin{align*}h(\Sigma):=\lim_{N\to\infty}\dfrac{\log |\mathcal{L}^N(\Sigma)|}{N}.\end{align*} $$

See [Reference Lind and Marcus36, Ch. 4] for further discussion. Regarding the classification of subshifts, we will consider two important classes, shifts of finite type and sofic shifts.

Definition 2.4. Consider the full shift $X=\mathcal {D}^{{\mathbb N}_0}$ and let $\mathscr {F}\subseteq \mathcal {L}(X)$ be a finite set of forbidden words. We define the subshift

$$ \begin{align*}X_{\mathscr{F}}:=\{x\in X:\ x \text{ does not contain any } w\in \mathscr{F} \text{ as a subword} \}.\end{align*} $$

We say that $\Sigma \subseteq X$ is a shift of finite type (SFT for short) if there exists a finite set $\mathscr {F}$ such that $\Sigma =X_{\mathscr {F}}$ .

If the longest forbidden word has length $M+1$ , we say that $X_{\mathscr {F}}$ is an M-step shift of finite type. In a $1$ -step SFT, all forbidden words have length $2$ , so it can be described by a matrix indexed by $\mathcal {D}\times \mathcal {D}$ with values in $\{0,1\}$ . In this sense, $\Sigma $ is a $1$ -step SFT if and only if there exists a matrix T such that

$$ \begin{align*}\Sigma=\{x\in \mathcal{D}^{{\mathbb N}_0}:\ T(x_i,x_{i+1})=1 \text{ for all }i\}.\end{align*} $$

A more general way to construct subshifts is by reading infinite sequences in a labelled directed multi-graph. A labelled multi-graph is a triple $G=(V,E,\unicode{x3bb} )$ , where V is a finite set of nodes, E is a set of edges and $\unicode{x3bb} :E\to \mathcal {A}$ is a labelling function for some finite alphabet $\mathcal {A}$ . Each edge $e\in E$ has an associated starting node $s(e)\in V$ and a terminal node $t(e)\in V$ . A sequence of edges $\pi =e_0\cdots e_{n}$ is called a path in G if $t(e_i)=s(e_{i+1})$ for every $i\in \{0,\ldots ,n-1\}$ , and we say that $\pi $ has length $|\pi |:=n+1$ . Note that multiple edges may share the same starting and terminal nodes while having different labels.

Definition 2.5. Let $G=(V,E,\unicode{x3bb} )$ be a labelled directed multi-graph. If $\mathcal {D}$ is the finite alphabet associated with the labelling function, we define the subshift $\Sigma _G\subset \mathcal {D}^{\mathbb {N}_0}$ as

$$ \begin{align*} \Sigma_G=\{(\unicode{x3bb}(e_j))_{j\in \mathbb{N}_0}\in \mathcal{D}^{\mathbb{N}_0}: \ s(e_{j+1})= t(e_j) \ \text{ for all } j\in \mathbb{N}_0 \}. \end{align*} $$

Thus, $\Sigma _G$ are all infinite sequences that we can read in some infinite path of G. It is well known that $\Sigma _G$ is a subshift.

Definition 2.6. The subshift $\Sigma \subseteq \mathcal {D}^{{\mathbb N}_0}$ is said to be sofic if there exists a labelled directed multi-graph such that $\Sigma =\Sigma _G$ . The graph G is called a cover of $\Sigma $ .

Note that the cover of a sofic shift is not unique. Additionally, every shift of finite type is sofic.

Remark 2.7. Let $\Sigma \subseteq \mathcal {D}^{{\mathbb N}_0}$ be a 1-step shift of finite type, and consider a matrix T that represents $\Sigma $ , that is, $T(d,d')=1$ if and only if $dd'\in \mathcal {L}(\Sigma )$ . We create a node $V(d)$ for every $d\in \mathcal {D}$ , and place an edge from $V(d)$ to $V(d')$ labelled by $d'$ if and only if ${T(d,d')=1}$ . The resulting labelled graph is a cover for $\Sigma $ and we denote it by $\mathcal {G}_T$ .

To construct a cover for a sofic shift, we can rely on the notion of follower sets [Reference Lind and Marcus36, Ch. 3].

Definition 2.8. Let $\Sigma $ be a subshift of $\mathcal {D}^{{\mathbb N}_0}$ . For any $w\in \mathcal {L}(\Sigma )$ , the follower set of w, denoted $F_\Sigma (w)$ , is the set of all words that can extend w, that is,

$$ \begin{align*}F_\Sigma(w):=\{v\in \mathcal{L}(\Sigma):\ wv\in \mathcal{L}(\Sigma)\}.\end{align*} $$

We denote by $\mathcal {F}_\Sigma :=\{F_\Sigma (w): \ w\in \mathcal {L}(\Sigma )\}$ the collection of all follower sets. When the underlying subshift $\Sigma $ is clear from the context, we will simply write $F(w)$ and $\mathcal {F}$ .

While each word has its own follower set, a folklore result states that $\Sigma $ is sofic if and only if there are finitely many distinct follower sets [Reference Lind and Marcus36, Theorem 3.2.10], that is, ${|\mathcal {F}_\Sigma |<\infty} $ . If $d\in F(u)=F(v)$ , it follows that $F(ud)=F(vd)$ . Using these ideas, a cover can be constructed for $\Sigma $ .

Definition 2.9. Let $\Sigma \subseteq \mathcal {D}^{{\mathbb N}_0}$ be a sofic shift. Consider the finite set of nodes $V=\mathcal {F}_\Sigma $ , and place an edge labelled by $d\in \mathcal {D}$ from $F\in \mathcal {F}_\Sigma $ to $F'\in \mathcal {F}_\Sigma $ if $d\in F$ , and $F(wd)=F'$ for any word w such that $F=F(w).$ The labelled multi-graph generated is called the follower set graph of $\Sigma $ .

The follower set graph is a cover of $\Sigma $ [Reference Lind and Marcus36, Proposition 3.2.9]. Notice that the follower set graph is right-resolving, meaning that for any node, all the edges going out have different labels. When the sofic shift is transitive, we would expect the cover to be an irreducible graph (that is, there is a path between each pair of vertices), but this is not always true for the follower set graph. To address this problem, a subgraph can be extracted, which remains a cover and is irreducible.

Definition 2.10. A word $w\in \mathcal {L}(\Sigma )$ is said to be synchronizing if for every $u,v\in \mathcal {L}(\Sigma )$ , the condition that both $uv$ and $wv$ are in the language implies that $uwv\in \mathcal {L}(\Sigma )$ .

While not every subshift has synchronizing words, it is well known that transitive sofic shifts do. Moreover, every word can be extended to be synchronizing and any extension of a synchronizing word is also synchronizing. In the case of an M-step SFT, every word with length at least $M+1$ is synchronizing.

An important result due to Fischer [Reference Fischer21, Reference Fischer22] establishes the existence and uniqueness (up to isomorphism) of a minimal (in terms of the number of nodes), right-resolving and irreducible cover for a transitive sofic shift. This unique representation is known as the Fischer cover and plays an important role in this paper. The following outlines the construction of this cover.

2.3 Construction of the Fischer cover

Let $\Sigma \subseteq \mathcal {D}^{{\mathbb N}_0}$ be a transitive sofic shift. For each follower set $F\in \mathcal {F}_\Sigma $ , we create a node associated to F if there exists a synchronizing word w such that $F(w)=F$ ; in other words, we consider the set of nodes

$$ \begin{align*}\mathcal{V}_\Sigma:=\{F(w):\ w\in \mathcal{L}(\Sigma) \text{ is synchronizing}\}\subseteq \mathcal{F}_\Sigma.\end{align*} $$

Let $F,F'\in \mathcal {V}_\Sigma $ and $d\in \mathcal {D}$ . Then, there exists $w\in \mathcal {L}(\Sigma )$ such that $F=F(w)$ . We create an edge with starting node F, terminal node $F'$ and labelled by d if and only if ${F'=F(wd)}$ . The resulting graph, denoted by $\mathcal {G}_\Sigma =(\mathcal {V}_\Sigma ,\mathcal {E}_\Sigma ,\unicode{x3bb} _\Sigma )$ , is the Fischer cover for $\Sigma $ (see [Reference Lind and Marcus36, Ch. 3] and [Reference Spandl48, Lemma 6.11] for more details).

Thus, the Fischer cover is a subgraph of the follower set graph, constructed by considering only the nodes corresponding to follower sets of synchronizing words. Notice that for any synchronizing word $w \in \mathcal {L}(\Sigma )$ , every path in $\mathcal {G}_\Sigma $ labelled by w must end at the node associated with $F(w)$ . In the case where $\Sigma $ is a mixing sofic subshift, it is possible to find $n\in {\mathbb N}$ such that for every pair of nodes $F,F'\in \mathcal {V}$ and $m\geq n$ , there exists a path of length m from F to $F'$ . In such a case, for every pair of words u and v in the language, there exists $w\in \mathcal {L}^m(\Sigma )$ such that $uwv\in \mathcal {L}(\Sigma )$ .

2.4 Fractal sets of integers

In [Reference Glasscock, Moreira and Richter27], Glasscock, Moreira and Richter introduced the notion of multiplicatively invariant sets of integers (recall Definition 1.1), and studied them from a fractal perspective. Here, we focus on the notion of mass dimension, which is analogous to the box dimension in fractal geometry, but adapted to the setting of integers.

Definition 2.11. Let $A\subseteq {\mathbb N}_0$ be non-empty. We define the lower mass dimension and the upper mass dimension of A as

$$ \begin{align*} &\underline{\dim}_{\mathrm{{M}}}(A):=\liminf_{N\to \infty} \dfrac{\log |A\cap [0,N) |}{\log N}=\sup \bigg\{\gamma\geq 0: \ \liminf_{N\to \infty}\dfrac{|A\cap [0,N)|}{N^\gamma}>0 \bigg\},\\ &\overline{\dim}_{\mathrm{{M}}}(A):=\limsup_{N\to \infty} \dfrac{\log |A\cap [0,N) |}{\log N}=\sup \bigg\{\gamma\geq 0: \ \limsup_{N\to \infty}\dfrac{|A\cap [0,N)|}{N^\gamma}>0 \bigg\}. \end{align*} $$

If $\underline {\dim }_{\mathrm {{M}}}(A)=\overline {\dim }_{\mathrm {{M}}}(A)$ , we denote this value by $\dim _{\mathrm {{M}}}(A)$ and say that the mass dimension of A exists.

From [Reference Glasscock, Moreira and Richter27, Proposition 3.6], the mass dimension exists for any multiplicatively invariant set of integers. A natural way to generate $\times g$ -invariant sets is by considering subshifts of $X=\{0,\ldots ,g-1\}^{{\mathbb N}_0}$ .

Definition 2.12. The g-language set associated with a subshift $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ is the set $A_\Sigma \subseteq {\mathbb N}_0$ defined by

(2.1) $$ \begin{align} A_\Sigma:=\{(w)_g:=w_0+w_1g+\cdots+w_{n-1}g^{n-1}\ : \ w=w_0\cdots w_{n-1}\in \mathcal{L}(\Sigma) \}. \end{align} $$

In general, the expansion of a number in a certain base is read from left to right, where the leftmost digit represents the most significant digit. For a given word w, in this paper, we will consider the rightmost digit to be the most significant digit of the integer $(w)_g$ , this to be consistent with the theory of subshifts. However, when it comes to applications, this does not make a major distinction.

From the definition of $\times g$ -invariant sets and the shift-invariance of $\Sigma $ , it is evident that $A_\Sigma $ is $\times g$ -invariant. It is also possible to see that every multiplicatively invariant set can be written as $ A_\Sigma $ for some subshift $\Sigma $ and the mass dimension is related to the entropy of the subshift. This is summarized in the following proposition (see [Reference Glasscock, Moreira and Richter27, Proposition 3.10]).

Proposition 2.13. The g-language set $A_\Sigma \subseteq {\mathbb N}_0$ corresponding to any non-empty subshift $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ is a $\times g$ -invariant set and the mass dimension of $A_\Sigma $ is equal to the normalized topological entropy of the subshift $(\Sigma ,\sigma )$ , that is,

(2.2) $$ \begin{align} \dim_{\mathrm{{M}}}(A_\Sigma)=h(\Sigma)/\log(g). \end{align} $$

Moreover, for any $\times g$ -invariant set $A\subseteq {\mathbb N}_0$ , there exists a subshift $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ such that $A=A_\Sigma $ . In such a case, we say that A is represented by $\Sigma $ .

Corollary 2.14. Let $g\geq 2$ be an integer and let $\mathcal {D}\subseteq \{0,\ldots ,g-1\}$ . If we consider the full shift $\Sigma =\mathcal {D}^{{\mathbb N}_0}$ , $\mathcal {C}_{g,\mathcal {D}}=A_\Sigma $ . In addition,

$$ \begin{align*}\dim_{\mathrm{{M}}}(\mathcal{C}_{g,\mathcal{D}})=\log(|\mathcal{D}|)/\log(g).\end{align*} $$

Finally, the following result allows us to simplify the calculation of the dimension to simpler intervals.

Lemma 2.15. [Reference Glasscock, Moreira and Richter27, Lemma 3.2. (IV)].

For $r\in \mathbb {N}$ , $r\geq 2$ ,

(2.3) $$ \begin{align} \overline{\dim}_{\mathrm{{M}}}(A)=\limsup_{N\to \infty}\dfrac{\log |A\cap [0,r^N) |}{N\log r}.\end{align} $$

Analogously, we can compute $\underline {\dim }_{\mathrm {{M}}}(A)$ by using $\liminf $ instead of $\limsup $ in (2.3).

3 Construction of Markov chains

In §1.3, we provided an overview of the construction of Markov chains in the context of integers with missing digits and their distribution in residue classes, but now we extend this approach to a more general framework. Let $f_1,\ldots ,f_r$ be g-additive functions, $a_1,\ldots ,a_r\in {\mathbb N}$ and $A\subseteq {\mathbb N}_0$ a $\times g$ -invariant set. We aim to find conditions to ensure

(3.1) $$ \begin{align}\lim_{N\to \infty}\dfrac{|\{n\in A: f_i(n)\equiv b_i\ \mathrm{mod}\ a_i \text{ for } i=1,\ldots,r\}\cap [0,N)|}{|A\cap [0,N)|}=\dfrac{1}{\Pi_{i=1}^r a_i} \end{align} $$

for any $(b_1,\ldots ,b_r)\in {\mathbb Z}_{a_1}\times \cdots \times {\mathbb Z}_{a_r}.$

Notation. Throughout this paper, we denote $\mathbf {a} := (a_1, \ldots , a_r)$ , $|\mathbf {a}|:=|{\mathbb Z}_{a_1}\times \cdots \times {\mathbb Z}_{a_r}|=\Pi _{i=1}^r a_i$ and $\mathbf {f} := (f_1, \ldots , f_r)$ . For any $\mathbf {b} \in \mathbb {Z}_{\mathbf {a}} := \mathbb {Z}_{a_1} \times \cdots \times \mathbb {Z}_{a_r}$ and $n \in \mathbb {N}_0$ , we will write $\mathbf {f}(n) \equiv \mathbf {b}\ \mathrm {mod}\ \mathbf {a}$ if $f_j(n) \equiv b_j\ \mathrm {mod}\ a_j$ for every $j \in \{1, \ldots , r\}$ .

From Proposition 2.13, there exists a subshift $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ such that

$$ \begin{align*}A=A_\Sigma=\{(w)_g:\ w\in \mathcal{L}(\Sigma)\}.\end{align*} $$

Therefore, we will focus on studying the distribution of words of a certain length and then extend the result to the set of integers A. Similarly to §1.3, we need to find an analogue to the value p for periodicity and properly understand the concatenation of words in the language.

Definition 3.1. Let $f_1,\ldots ,f_r$ be g-additive functions and $\mathbf {a}\in {\mathbb N}^{r}$ . We say $\mathbf {f}$ is eventually periodic with respect to $\mathbf {a}$ if there exists $\ell \in {\mathbb N}_0$ and $p\in {\mathbb N}$ such that

$$ \begin{align*}\mathbf{f}(dg^{i+np})\equiv \mathbf{f}(dg^i)\ \mathrm{mod}\ \mathbf{a}\end{align*} $$

for every $d\in \{0,\ldots ,g-1\}$ , $n\in {\mathbb N}$ and $i\geq \ell $ . Any pair $(p,\ell )$ satisfying this condition is called an eventual period.

When $\ell '\geq \ell $ and $p\mid p'$ , the pair $(p',\ell ')$ is also an eventual period. Notice that $\mathbf {f}$ is eventually periodic if each $f_i$ is eventually periodic. Clearly, the function sum-of-digits in base g satisfies this condition with $p=1$ and $\ell =0$ . Also, the identity is always g-invariant and eventually periodic.

Proposition 3.2. For any $a,g\in {\mathbb N}$ , there exist $p\in {\mathbb N}$ and $\ell \leq a-1$ such that

$$ \begin{align*}dg^{i}\equiv dg^{i+np}\ \mathrm{mod}\ a\end{align*} $$

for every $d\in \{0,\ldots ,g-1\}$ , $n\in {\mathbb N}$ and $i\geq \ell $ .

Proof. At least two elements of $\{g^j\ \mathrm {mod}\ a:\ j\in \{0,\ldots ,a\}\}$ agree. Then, there exist $j_0<j_1\leq a$ such that $g^{j_0}\equiv g^{j_1}\ \mathrm {mod}\ a$ . We conclude by considering $\ell =j_0$ and ${p=j_1-j_0}$ .

If A is a missing digits set, then $A=A_\Sigma $ for $\Sigma =\mathcal {D}^{{\mathbb N}_0}$ , where $\mathcal {D}$ is the respective set of digits. In this context, the concatenation of two words is in $\mathcal {L}(\Sigma )$ if and only if both words are in $\mathcal {L}(\Sigma )$ . Unlike full shifts, this property generally does not hold. Nevertheless, it is possible to adapt the construction when concatenation is governed by a suitable rule, as occurs in transitive sofic shifts through the notions of follower sets and the Fischer cover.

As discussed in §2.2, we can identify the nodes of the Fischer cover $\mathcal {G}_{\Sigma }=(\mathcal {V}_\Sigma ,\mathcal {E}_{\Sigma },\unicode{x3bb} _{\Sigma })$ with the collection of follower sets associated to synchronizing words of the language. Thus, we can identify

$$ \begin{align*}\mathcal{V}_{\Sigma}=\{F_1,F_2,\ldots,F_q\}=\{F(w):\ w\in \mathcal{L}(\Sigma)\text{ is a synchronizing word}\}.\end{align*} $$

The concatenation of words can be understood from $\mathcal {G}_\Sigma $ . For $x,y\in \mathcal {L}(\Sigma )$ ,

$$ \begin{align*}xy\in \mathcal{L}(\Sigma)\iff y\in F(x) \iff \text{there exists a path of } \mathcal{G}_\Sigma \text{ labelled by } xy.\end{align*} $$

When $F(x)\in \mathcal {V}_{\Sigma }$ , it is also equivalent to the existence of a path $\pi $ in the Fischer cover starting at the node associated to $F(x)$ and it is labelled by y.

Notation. For a word $w\in \mathcal {L}(\Sigma )$ and $F,F'\in \mathcal {V}_\Sigma $ , we write $F\overset {w}{\to } F'$ if there is a path $\pi $ in $\mathcal {G}_\Sigma $ from F to $F'$ labelled by w. Since $\mathcal {G}_\Sigma $ is right-resolving, any other path from F to $F'$ has a different label.

Notice that $F\overset {w}{\to } F'$ if and only if $w\in F$ , and for every word u such that $F=F(u)$ , $F(uw)=F'$ .

Remark 3.3. For the rest of this paper, we will consider a base $g\geq 2$ , $r\in {\mathbb N}$ , $\mathbf {a}\in {\mathbb N}^{r}$ , a collection of g-additive functions $\mathbf {f}=(f_1,\ldots ,f_r)$ eventually periodic with respect to $\mathbf {a}$ , and an eventual period $(p,\ell )$ . In addition, we consider a transitive sofic subshift ${\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}}$ , and $\mathcal {G}_{\Sigma }=(\mathcal {V}_\Sigma ,\mathcal {E}_{\Sigma },\unicode{x3bb} _{\Sigma })$ its Fischer cover (if there is no confusion, we omit the subscript). For technical reasons, we will assume that $\ell $ is large enough such that there exists some synchronizing word of length equal to $\ell $ .

3.1 Transition matrix

To define the transition matrix, we will group the elements of $\mathcal {L}(\Sigma )$ according to how they extend other words. Recalling that $(w_0\cdots w_n)_g:=w_0+w_1g+\cdots +w_ng^n$ , we introduce the following subsets of $\mathcal {L}^p(\Sigma )$ .

Definition 3.4. Let $i\in {\mathbb N}$ . For any $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}={\mathbb Z}_{a_1}\times \cdots \times {\mathbb Z}_{a_r}$ and $F,F'\in \mathcal {V}$ , we define the set

$$ \begin{align*}E_{i}(\mathbf{b},F,F'):=\{w\in \mathcal{L}^p(\Sigma): \mathbf{f}(g^i(w)_g)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a},\ F\overset{w}{\to}F'\}.\end{align*} $$

Notice that $E_i$ depends on g, $\mathbf {f}$ , $\mathbf {a}$ , $\Sigma $ and p, but as in Remark 3.3, we set these elements, but we will not make the dependency explicit to lighten the notation. The following lemma clarifies the motivation for defining these sets.

Lemma 3.5. Let $x\in \mathcal {L}^i(\Sigma )$ and $w\in E_i(\mathbf {b},F(x),F')$ . Then, $xw\in \mathcal {L}(\Sigma )$ , $F(xw)=F'$ and $\mathbf {f}((xw)_g)\equiv \mathbf {f}((x)_g)+\mathbf {b}\ \mathrm {mod}\ \mathbf {a}.$ If $i\geq \ell $ , it also holds that $E_{i}=E_{i+np}$ for all $n\in {\mathbb N}$ .

Proof. Since $F(x)\overset {w}{\to }F'$ , $xw\in \mathcal {L}(\Sigma )$ and $F(xw)=F'$ . Also,

$$ \begin{align*}\mathbf{f}((xw)_g)=\mathbf{f}\bigg(\sum_{j=0}^{i-1}x_jg^j+\sum_{j=i}^{i+p-1}w_jg^j\bigg)=\mathbf{f}((x)_g)+\mathbf{f}(g^i(w)_g)\equiv \mathbf{f}((x)_g)+\mathbf{b}\ \mathrm{mod}\ \mathbf{a}.\end{align*} $$

If $i\geq \ell $ , $\mathbf {f}(g^i(y)_g)=\mathbf {f}(g^{i+np}(y)_g)$ for every $n\in {\mathbb N}$ and $y\in \mathcal {L}^p(\Sigma )$ , concluding that ${E_i=E_{i+np}.}$

Despite that the collection of sets $E_{i}$ is not a partition of $\mathcal {L}^p$ (since a word might be read along different paths in $\mathcal {G}$ ), we still can understand it as a partition of the paths of length p in $\mathcal {G}$ .

Proposition 3.6. Let $i\in {\mathbb N}$ . For every $F \in \mathcal {V}$ ,

(3.2) $$ \begin{align} \sum_{(\mathbf{b},F')\in {\mathbb Z}_{\mathbf{a}}\times \mathcal{V}}|E_{i}(\mathbf{b},F,F')|=|\{\pi=(\pi_0\cdots\pi_{p-1}) \text{ is a path of } \mathcal{G} \text{ and } s(\pi)=F\}|.\end{align} $$

Similarly, for every $F'\in \mathcal {V}$ ,

(3.3) $$ \begin{align} \sum_{(\mathbf{b},F)\in {\mathbb Z}_{\mathbf{a}}\times \mathcal{V}}|E_{i}(\mathbf{b},F,F')|=|\{\pi=(\pi_0\cdots\pi_{p-1}) \text{ is a path of } \mathcal{G} \text{ and } t(\pi)=F'\}|.\end{align} $$

Proof. Let $F,F'\in \mathcal {V}$ . Notice that the sets $E_{i}(\mathbf {b},F,F')$ and $E_{i}(\mathbf {b}',F,F')$ are disjoint when $\mathbf {b}\neq \mathbf {b}'\in {\mathbb Z}_{\mathbf {a}}$ . For any $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}$ , if $w\in E_{i}(\mathbf {b},F,F')$ , there exists a path $\pi $ in $\mathcal {G}$ of length p such that $\unicode{x3bb} (\pi )=w$ from F to $F'$ . However, any path $\pi $ of length p from F to $F'$ represents a word $x:=\unicode{x3bb} (\pi )$ of $E_{i}(\mathbf {b},F,F')$ , where $\mathbf {b}:=\mathbf {f}(g^i(x)_g)$ . Since F and $F'$ are fixed, each of these paths represents a different word. Then,

$$ \begin{align*} |\{\pi=(\pi_0\cdots\pi_{p-1}) \text{ is a path in } \mathcal{G} \text{ from } F \text{ to } F'|&=\bigg|\bigcup_{\mathbf{b}\in {\mathbb Z}_{\mathbf{a}}}E_{i}(\mathbf{b},F,F')\bigg|\\ &=\sum_{\mathbf{b}\in {\mathbb Z}_{\mathbf{a}}} |E_{i}(\mathbf{b},F,F')|. \end{align*} $$

By summing over $F'$ , the equality (3.2) is obtained and similarly, (3.3) follows by summing over F.

Usually, (3.2) and (3.3) do not agree. For this work, we require an extra regularity of $\mathcal {G}$ to ensure that the number of paths of length p starting at some $F\in \mathcal {V}$ is equal to the number of paths of length p with terminal node $F'\in \mathcal {V}$ . From graph theory, a directed multi-graph is said to be k-regular if each vertex has k edges going in and k edges going out (two edges are different if they differ in the starting node, terminal node or label). We can pose this definition in subshifts.

Definition 3.7. We say a transitive sofic shift is k-regular if the graph representation given by the Fischer cover is a k-regular graph. We say that a transitive sofic shift is regular if it is k-regular for some $k\geq 2$ .

If a graph is $1$ -regular, it must represent a full shift in one symbol. Thus, we are interested in the case $k\geq 2$ , so we include it directly in the definition. Trivially, any full shift satisfies this condition, with k being the number of symbols. When $\Sigma $ is k-regular and $F \in \mathcal {V}$ , there are $k^p$ paths of length p starting from F and $k^p$ paths of length p ending at F. From this idea, we can define a transition matrix for the Markov chains.

Definition 3.8. In the framework of Remark 3.3 and assuming $\Sigma $ is k-regular, we define the state space $\mathcal {S}:={\mathbb Z}_{\mathbf {a}}\times \mathcal {V}$ and the matrix $M_{i}$ indexed by $\mathcal {S}\times \mathcal {S}$ as

$$ \begin{align*}M_{i}((\mathbf{b},F),(\mathbf{b}',F')):=k^{-p}\cdot |E_{i}(\mathbf{b}'-\mathbf{b},F,F')|\end{align*} $$

for any $(\mathbf {b},F), (\mathbf {b}',F')\in \mathcal {S}.$

Clearly, the matrix $M_i$ depends on several elements, including the choice of p, but we will not make the dependence explicit. The regularity condition allows us to show that this matrix $M_i$ is suitable for defining a Markov chain.

Proposition 3.9. For any $i\in {\mathbb N}$ , the matrix $M_{i}$ is a doubly stochastic matrix.

Proof. Let $(\mathbf {b},F)\in \mathcal {S}$ . From (3.2),

$$ \begin{align*} \sum_{s\in \mathcal{S}} M_{i}((\mathbf{b},F),s)&=k^{-p}\sum_{(\mathbf{b}',F')\in \mathcal{S}}|E_{i}(\mathbf{b}'-\mathbf{b},F,F')| \\ &=k^{-p} \sum_{(\hat{\mathbf{b}},F')\in \mathcal{S}} |E_{i}(\hat{\mathbf{b}},F,F')|\\ &=k^{-p}|\{\pi=(\pi_0\pi_1\cdots\pi_{p-1}) \text{ is a path in } \mathcal{G} \text{ and } s(\pi)=F\}|.\end{align*} $$

We conclude that $ \sum _{s\in \mathcal {S}} M_{i}((\mathbf {b},F),s)=1$ from k-regularity. Analogously, from (3.3), we obtain $\sum _{s\in \mathcal {S}} M_{i}(s,(\mathbf {b},F))=1.$

Note that the regularity is important to ensure that the normalization factor to make the matrix stochastic is the same for all rows. Without this, while a stochastic matrix could still be defined, the link between $M_i$ and the distribution of integers becomes unclear, and our method no longer seems to work.

3.2 Initial distribution

In our attempt to study $A_\Sigma $ , the idea is to extend all the $\ell $ -long words that have a follower set in $\mathcal {V}$ , as we can fully describe those extensions using the Fischer cover. However, for some $w\in \mathcal {L}^{\ell }$ , it might be that $F(w)\notin \mathcal {V}$ . This leads to the following definition.

Definition 3.10. Let $\Sigma $ be a transitive sofic shift. We define the $\ell $ -restricted language of $\Sigma $ as all words of $\mathcal {L}(\Sigma )$ that are extensions of a word of length $\ell $ with follower set in $\mathcal {V}$ ,

$$ \begin{align*}\mathcal{L}_{\mathcal{V},\ell}(\Sigma):=\{w\in \mathcal{L}(\Sigma): |w|\geq \ell \text{ and } F(w_0\cdots w_{\ell-1})\in \mathcal{V}\}.\end{align*} $$

For every $i\geq \ell $ , we also define $\mathcal {L}_{\mathcal {V},\ell }^i(\Sigma ):=\{w\in \mathcal {L}_{\mathcal {V},\ell }(\Sigma ):\ |w|=i\}$ .

The reason for considering $\ell $ large enough in Remark 3.3 is to ensure that this set is not empty. If $\Sigma $ is an M-step shift of finite type, any word w such that $|w|\geq M+1$ is synchronizing; therefore, $\mathcal {L}_{\mathcal {V},\ell }^{i}(\Sigma )=\mathcal {L}^i(\Sigma )$ for all $i\geq M+1$ . Under the condition of regularity, it is easy to describe the cardinality of $\mathcal {L}_{\mathcal {V},\ell }^i$ . For the upcoming results, if $w = w_0 \cdots w_n$ is a word, we will identify it with a pair of words $(x, y)$ such that $w = xy$ .

Proposition 3.11. Let $\Sigma $ be a transitive sofic shift and k-regular. Then,

$$ \begin{align*}|\mathcal{L}^i_{\mathcal{V},\ell}(\Sigma)|=|\mathcal{L}^{\ell}_{\mathcal{V},\ell}(\Sigma)|\cdot k^{i-\ell}\end{align*} $$

for every $i\geq \ell $ .

Proof. Notice $x\in \mathcal {L}^i_{\mathcal {V},\ell }$ if and only if $F:=F(x_0\cdots x_{\ell -1})\in \mathcal {V}$ and there is a path $\pi $ in the Fischer cover of length $i-\ell $ from the vertex associated to F, and $\pi $ is labelled by $x_\ell \cdots x_{i-1}$ . Using the identification,

(3.4) $$ \begin{align} \mathcal{L}^i_{\mathcal{V},\ell}=\bigcup_{F\in \mathcal{V}}\{w\in \mathcal{L}^\ell_{\mathcal{V},\ell}: F(w)=F\}\times \{\unicode{x3bb}(\pi):\ \pi=\pi_0\cdots \pi_{i-\ell-1}\in \mathcal{G},\ s(\pi)=F \}. \end{align} $$

Since the Fischer cover is right-resolving, all paths in $\{ \pi =\pi _0\cdots \pi _{i-\ell -1}\in \mathcal {G}, s(\pi )=F \}$ have different labels. Then, the conclusion follows by using the k-regularity in (3.4).

We introduce a probability measure on $\mathcal {S}$ .

Definition 3.12. For every $i\geq \ell $ , the distribution $\mu _{i}$ on $\mathcal {S}={\mathbb Z}_{\mathbf {a}}\times \mathcal {V}$ is defined as

$$ \begin{align*}\mu_{i}(\{(\mathbf{b},F)\}):=\dfrac{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{i}(\Sigma):\ \mathbf{f}((w)_g)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a},\ F(w)=F\}|}{|\mathcal{L}_{\mathcal{V},\ell}^{i}(\Sigma)|}\end{align*} $$

for any $(\mathbf {b},F)\in \mathcal {S}$ .

We will denote $\mu _{i}(\mathbf {b},F):=\mu _{i}(\{(\mathbf {b},F)\})$ . By understanding the powers of the matrix $M_i$ , we can describe the evolution of the measure $\mu _{i+np}$ with respect to $n\in {\mathbb N}$ .

Proposition 3.13. For any $i,n\in {\mathbb N}$ and $s=(\mathbf {b}, F),s'=(\mathbf {b}',F')\in \mathcal {S}$ ,

(3.5) $$ \begin{align} M_{i}^n(s,s')=k^{-pn}|\{w\in \mathcal{L}^{pn}(\Sigma):\ \mathbf{f}(g^{i}(w)_g)\equiv \textbf{b}'-\textbf{b}\ \mathrm{mod}\ \textbf{a}, \ F\overset{w}{\to} F'\}|. \end{align} $$

Moreover, for every $i\geq \ell $ and $n\in {\mathbb N}$ ,

(3.6) $$ \begin{align} \mu_{i+np}=\mu_{i} M_{i}^n. \end{align} $$

Proof. We proceed by induction to show (3.5). Let $s=(\mathbf {b}, F), s'=(\mathbf {b}',F')\in \mathcal {S}$ . The case $n=1$ holds by definition. Suppose that the result holds for some $n\in {\mathbb N}$ , so we have to prove the result for $n+1$ . Since

$$ \begin{align*}M_i^{n+1}(s,s')=\sum_{\tilde{s}\in \mathcal{S}}M_i^{n}(s,\tilde{s})M_i(\tilde{s},s'),\end{align*} $$

from the induction hypotheses, it will be sufficient to prove that

(3.7) $$ \begin{align} \begin{aligned} &\{w\in \mathcal{L}^{p(n+1)}(\Sigma):\ \mathbf{f}(g^{i}(w)_g)\equiv \textbf{b}'-\textbf{b}\ \mathrm{mod}\ \textbf{a}, \ F\overset{w}{\to} F'\}\\& \quad =\bigcup_{(\tilde{\mathbf{b}},\tilde{F})\in \mathcal{S}} ( \{x\in \mathcal{L}^{pn}(\Sigma):\ \mathbf{f}(g^{i}(x)_g)\equiv \tilde{\textbf{b}}-\textbf{b}\ \mathrm{mod}\ \textbf{a}, \ F\overset{x}{\to} \tilde{F}\}\\ &\hspace{2cm}\times\{y\in \mathcal{L}^{p}(\Sigma):\ \mathbf{f}(g^{i}(w)_g)\equiv \textbf{b}'-\tilde{\textbf{b}}\ \mathrm{mod}\ \textbf{a}, \ \tilde{F}\overset{y}{\to} F'\}). \end{aligned} \end{align} $$

Let $w\in \mathcal {L}^{p(n+1)}$ in the left-hand side of (3.7) and consider the decomposition $w=(x,y)$ , where $x=w_0\cdots w_{pn-1}$ and $y=w_{pn}\cdots w_{n(p+1)-1}$ . Since $\mathbf {f}(g^i(w)_g)=\mathbf {f}(g^i(x)_g)+\mathbf {f}(g^{i+pn}(y)_g),$ the eventual periodicity leads to

$$ \begin{align*} \mathbf{f}(g^i(w)_g)\equiv_{\mathbf{a}}\mathbf{b}'-\mathbf{b} \text{ if and only if }\mathbf{f}(g^i(x)_g)\equiv_{\mathbf{a}}\tilde{\mathbf{b}}-\mathbf{b}\text{ and }\mathbf{f}(g^i(y)_g)\equiv_{\mathbf{a}}\mathbf{b}'-\tilde{\mathbf{b}}, \end{align*} $$

where $\tilde {\mathbf {b}}:=\mathbf {f}(g^i(x)_g)+\mathbf {b}\ \mathrm {mod}\ \mathbf {a}$ . In addition, $F\overset {w}{\to }F'$ is equivalent to the existence of a path $\pi $ in $\mathcal {G}$ of length $(n+1)p$ from F to $F'$ labelled by w. If we denote by $\tilde {F}$ the terminal node for the subpath $\pi _0\cdots \pi _{np-1}$ , $F\overset {w}{\to }F' \text { if and only if }F\overset {x}{\to }\tilde {F}\text { and }\tilde {F}\overset {y}{\to }F'$ . Thus, we conclude (3.7). However,

$$ \begin{align*}(\mu_iM^n_i)(s)=\sum_{s'\in \mathcal{S}}\mu_i(s')M_i^n(s',s).\end{align*} $$

By Proposition 3.11, $k^{pn}|\mathcal {L}^i_{\mathcal {V},\ell }(\Sigma )|=|\mathcal {L}^{i+np}_{\mathcal {V},\ell }(\Sigma )|$ . Hence, using (3.5), we can conclude (3.6) by showing that

(3.8) $$ \begin{align} \begin{aligned} &\{w\in \mathcal{L}_{\mathcal{V},\ell}^{i+(n+1)p}(\Sigma):\ \mathbf{f}((w)_g)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a},\ F(w)=F\}\\& \quad =\bigcup_{s'\in \mathcal{S}}(\{x\in \mathcal{L}_{\mathcal{V},\ell}^{i}(\Sigma):\ \mathbf{f}((w)_g)\equiv \mathbf{b}'\ \mathrm{mod}\ \mathbf{a},\ F(w)=F'\}\\ &\hspace{1cm}\times \{y\in \mathcal{L}^{pn}(\Sigma):\ \mathbf{f}(g^{i}(y)_g)\equiv \textbf{b}-\textbf{b}'\ \mathrm{mod}\ \textbf{a}, \ F'\overset{y}{\to} F\}). \end{aligned} \end{align} $$

If $w\in \mathcal {L}_{\mathcal {V},\ell }^{i+(n+1)p}(\Sigma )$ , it is straightforward that $w_0\cdots w_{i-1}\in \mathcal {L}^i_{\mathcal {V},\ell }(\Sigma )$ . The rest of the proof follows by replicating the argument used to prove (3.7).

From the previous results, we can characterize the distribution using Markov chains.

Definition 3.14. Let $g, \mathbf {a}, \mathbf {f}, p, \ell $ and $\Sigma $ be as defined in Remark 3.3, and assume that the subshift $\Sigma $ is k-regular (where $k\geq 2$ ). For $i\geq \ell $ , we denote by $X^i=(X^{i}_n)_{n\in {\mathbb N}_0}$ a Markov chain on the state space $\mathcal {S}$ with transition matrix $M_{i}$ (Definition 3.8) and initial distribution $\mu _{i}$ (Definition 3.12). We denote by $\mathbb {P}$ the probability measure associated to the process. Notice that $X^i= X^i(g, \mathbf {a}, \mathbf {f}, p, \ell ,\Sigma )$ , but we omit this dependency in the notation for simplicity.

Remark 3.15. Let $\Sigma \subseteq \mathcal {D}^{{\mathbb N}_0}$ be a 1-step shift of finite type. For any $w=w_0\cdots w_n\in \mathcal {L}(\Sigma )$ , $F(w)=F(w_n)$ . Thus, $\mathcal {V}_\Sigma =\{F(d): d\in \mathcal {D}\}.$ Note that the cover presented in Remark 2.7 is the Fischer cover for $\Sigma $ , except if there exist $d\neq d'\in \mathcal {D}$ such that ${F(d)=F(d')}$ . In such a case, the symbols d and $d'$ are associated to the same node in the Fischer cover.

If the graph of Remark 2.7 is irreducible and regular, we can use this cover to make the construction of the Markov chains instead of the Fischer cover. The only distinction is that different symbols are forced to be associated with different nodes, but the rest of the construction follows immediately. It is easy to see that the results that we will present in §4 also hold when using this cover.

4 From Markov chains to uniform distribution

Throughout this section, we will work within the framework outlined in Remark 3.3 and assume that $\Sigma $ is a k-regular subshift for some $k\geq 2$ . The connection between the Markov chains introduced in Definition 3.14 and the distribution of words in the $\ell $ -restricted language $\mathcal {L}_{\mathcal {V},\ell }(\Sigma )$ is straightforward from Proposition 3.13.

Corollary 4.1. For any $i\geq \ell $ , $(\mathbf {b},F)\in \mathcal {S}$ and $n\in {\mathbb N}$ ,

$$ \begin{align*}\mathbb{P}(X^{i}_n=(\mathbf{b},F))=\dfrac{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{i+np}(\Sigma): \ \mathbf{f}((w)_g)\equiv\mathbf{b}\ \mathrm{mod}\ \mathbf{a}, \ F(w)=F\}|}{|\mathcal{L}_{\mathcal{V},\ell}^{i+np}(\Sigma)|}.\end{align*} $$

Proof. Given the Markov chain $X^i$ with initial distribution $\mu _i$ and transition matrix $M_i$ , for every $(\mathbf {b},F)\in \mathcal {S}$ and $n\in {\mathbb N}$ ,

$$ \begin{align*}\mathbb{P}(X^i_n=(\mathbf{b},F))=\sum_{s\in \mathcal{S}}\mu_i(s)M_i(s, (\mathbf{b},F)).\end{align*} $$

The conclusion follows from Definition 3.12 and (3.6) of Proposition 3.13.

Since we are restricted to words in $\mathcal {L}_{\mathcal {V},\ell }(\Sigma )\subseteq \mathcal {L}(\Sigma )$ , it is natural to consider the subset of $A_\Sigma $ defined by

$$ \begin{align*}A_{\Sigma,\ell}:=\bigg\{\sum_{i=0}^n w_ig^i:\ n\geq \ell-1, \ w_0\cdots w_n\in \mathcal{L}_{\mathcal{V},\ell}(\Sigma)\bigg\}.\end{align*} $$

Through $X_n^{i}$ , the distribution of integers represented by words in $\mathcal {L}_{\mathcal {V},\ell }^{i+np}$ can be understood. By running different Markov chains for $i=\ell ,\ell +1,\ldots ,\ell +(p-1)$ , we can recover the distribution in residue classes for $A_{\Sigma ,\ell }$ . Furthermore, as $\ell $ increases, the set difference ${A_{\Sigma }\setminus A_{\Sigma ,\ell }}$ becomes negligible in terms of relative density, allowing us to recover the distribution for $A_\Sigma $ .

To ensure the convergence of the Markov chains, we introduce the following definition.

Definition 4.2. Let $g, \mathbf {a}, \mathbf {f}, p, \ell $ and $\Sigma $ be as defined in Remark 3.3, and assume that the subshift $\Sigma $ is regular. We say that the Markov condition holds if $M_i$ (Definition 3.8) is irreducible and aperiodic for every $i\geq \ell $ .

If $i\geq \ell $ , $M_i=M_{i+np}$ for all $n\in {\mathbb N}$ , so the Markov condition it is equivalent to shows that $M_i$ is irreducible and aperiodic for $i\in \{\ell ,\ldots ,\ell +(p-1)\}$ . Notice that the Markov condition implicitly assumes that $\Sigma $ is mixing (while the construction only requires transitivity). Assuming the convergence of the Markov chains and using Corollary 4.1, we devote the rest of the section to obtain the uniform distribution $\mathbf {f}\ \mathrm {mod}\ \mathbf {a}$ for the $\times g$ -invariant set $A_\Sigma $ .

Lemma 4.3. If the Markov condition holds, there exist $C>0$ and $\rho \in (0,1)$ such that

(4.1) $$ \begin{align} \bigg|\dfrac{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): \ \mathbf{f}((w)_g)\equiv\mathbf{b}\ \mathrm{mod}\ \mathbf{a},\ F(w)=F\}|}{|\mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma)|}-\dfrac{1}{ |\mathcal{S}|}\bigg|\leq C\rho^n \end{align} $$

for every $n\geq \ell $ and $(\mathbf {b},F)\in \mathcal {S}$ . In addition,

(4.2) $$ \begin{align} \bigg|\dfrac{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): \ \mathbf{f}((w)_g)\equiv\mathbf{b}\ \mathrm{mod}\ \mathbf{a},\ F(w)=F\}|}{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma):\ F(w)=F\}|}-\dfrac{1}{ |\mathbf{a}|}\bigg|\leq C\rho^n. \end{align} $$

Proof. Notice that the uniform measure $1/|\mathcal {S}|$ is invariant for $M_i$ by Proposition 3.9. From Theorem 2.1, for every $i\in \{\ell ,\ldots ,\ell +p-1\}$ , there exist $C_i>0$ and $\rho _i\in (0,1)$ such that

(4.3) $$ \begin{align} \bigg|\mathbb{P}(X_n^{i}=(\mathbf{b},F))-\dfrac{1}{|\mathcal{S}|}\bigg|\leq C_i \rho_i^n \end{align} $$

for every $(\mathbf {b},F)\in \mathcal {S}$ and $n\in {\mathbb N}.$ By choosing $C':=\max _{i}\{C_i\rho _i^{-i/p }\}$ and $\rho :=\max _i\{\rho _i^{1/p}\}$ ,

(4.4) $$ \begin{align} \bigg|\mathbb{P}(X_n^{i}=(\mathbf{b},F))-\dfrac{1}{|\mathcal{S}|}\bigg|\leq C' \rho^{np+i} \end{align} $$

for every $i\in \{\ell ,\ldots ,\ell +(p-1)\}$ . From Corollary 4.1, we can write

$$ \begin{align*} \bigg|\dfrac{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{np+i}(\Sigma): \ \mathbf{f}((w)_g)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a};\ F(w)=F\}|}{|\mathcal{L}_{\mathcal{V},\ell}^{np+i}(\Sigma)|}-\dfrac{1}{|\mathcal{S}|}\bigg|\leq C'\rho^{np+i}. \end{align*} $$

Since it holds for every $i\in \{\ell ,\ldots ,\ell +(p-1)\}$ and $n\in {\mathbb N}$ , (4.1) is obtained. Equivalently, for every $n\in {\mathbb N}$ ,

(4.5) $$ \begin{align} |\mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma)|\bigg(\dfrac{1}{|\mathcal{S}|}-C'\rho^n\bigg) &\leq |\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): \ \mathbf{f}((w)_g)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a};\ F(w)=F\}|\nonumber\\ &\leq |\mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma)|\bigg(\dfrac{1}{|\mathcal{S}|}+C'\rho^n\bigg). \end{align} $$

By summing (4.5) over all $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}$ , we obtain

(4.6) $$ \begin{align}|\mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma)|\bigg(\dfrac{1}{|\mathcal{V}|}-C'|\mathbf{a}|\rho^n\bigg) \leq |\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): F(w)=F\}|.\end{align} $$

Let $n_0\in {\mathbb N}$ be large enough such that $1-C'|\mathcal {S}|\rho ^{n_0}>1/2$ . Combining (4.5) and (4.6),

(4.7) $$ \begin{align} &|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): \ \mathbf{f}((w)_g)\equiv\mathbf{b}\ \mathrm{mod}\ \mathbf{a};\ F(w)=F\}|\nonumber\\& \quad \leq \bigg(\dfrac{1}{|\mathcal{S}|}+C'\rho^{n}\bigg) \bigg(\dfrac{1}{|\mathcal{V}|}-C'|\mathbf{a}|\rho^n\bigg)^{-1} |\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): F(w)=F\}| \end{align} $$

for every $n\geq n_0$ . A quick computation leads to

$$ \begin{align*}\bigg(\dfrac{1}{|\mathcal{S}|}+C'\rho^{n}\bigg) \bigg(\dfrac{1}{|\mathcal{V}|}-C'|\mathbf{a}|\rho^n\bigg)^{-1}=\dfrac{1}{|\mathbf{a}|}+2C'|\mathcal{V}|\dfrac{\rho^n}{1-C'|\mathcal{S}|\rho^n}\leq \dfrac{1}{|\mathbf{a}|}+4C'|\mathcal{V}| \rho^n.\end{align*} $$

Using the previous estimation in (4.7),

$$ \begin{align*} \dfrac{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): \ \mathbf{f}((w)_g)\equiv_{\mathbf{a}} \mathbf{b};\ F(w)=F\}|}{ |\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): F(w)=F\}|}\leq \dfrac{1}{|\mathbf{a}|}+4C'|\mathcal{V}|\rho^n \end{align*} $$

for every $n\geq n_0$ . With the obvious modifications, we can obtain in an analogous way that

$$ \begin{align*} \dfrac{|\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): \ \mathbf{f}((w)_g)\equiv_{\mathbf{a}} \mathbf{b};\ F(w)=F\}|}{ |\{w\in \mathcal{L}_{\mathcal{V},\ell}^{n}(\Sigma): F(w)=F\}|}\geq \dfrac{1}{|\mathbf{a}|}-\dfrac{2C'|\mathcal{V}|\rho^n}{1+C'|\mathcal{S}|\rho^n}\geq \dfrac{1}{|\mathbf{a}|}-4C'|\mathcal{V}|\rho^n. \end{align*} $$

The conclusion follows by choosing $C>0$ large enough.

When $0\notin \mathcal {L}(\Sigma )$ , each element of $A_{\Sigma ,\ell }$ has a unique representation in the language, which is no longer true if $0\in \mathcal {L}(\Sigma )$ . This lack of uniqueness can introduce complications when analysing the distribution of integers, as multiple representations may correspond to the same integer. We deal with this situation in the following result by using follower sets and the estimation (4.2).

Lemma 4.4. If the Markov condition holds, there exist $C>0$ and $\rho \in (0,1)$ such that

$$ \begin{align*} \bigg|\dfrac{|\{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a} \}\cap [0,g^m)|}{|A_{\Sigma,\ell}\cap [0,g^m)|}-\dfrac{1}{|\mathbf{a}|}\bigg|\leq C\rho^m \end{align*} $$

for every $m\geq \ell $ and $(\mathbf {b},F)\in \mathcal {S}$ .

Proof. For $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}$ , $F\in \mathcal {V}$ and $t\geq \ell $ , we denote

$$ \begin{align*} \mathcal{L}_{\mathcal{V},\ell}^t(\mathbf{b},F)&:=\{w\in \mathcal{L}_{\mathcal{V},\ell}^{t}(\Sigma): \ \mathbf{f}((w)_g)\equiv\mathbf{b}\ \mathrm{mod}\ \mathbf{a},\ F(w)=F\},\\ \mathcal{L}_{\mathcal{V},\ell}^t(\mathbf{b})&:=\{w\in \mathcal{L}_{\mathcal{V},\ell}^{t}(\Sigma): \ \mathbf{f}((w)_g)\equiv\mathbf{b}\ \mathrm{mod}\ \mathbf{a}\} \text{ and } \\ \mathcal{L}_{\mathcal{V},\ell}^t(F)&:=\{w\in \mathcal{L}_{\mathcal{V},\ell}^{t}(\Sigma): \ F(w)=F\}. \end{align*} $$

If two different words represent the same integer, they must have different lengths. Additionally, any word of length t ending with the digit $0$ represents an integer that can also be represented by a word of length $t-1$ . Therefore,

(4.8) $$ \begin{align} &|\{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a} \}\cap [0,g^m)| \nonumber\\ & \quad =|\mathcal{L}_{\mathcal{V},\ell}^{\ell}(\mathbf{b})|+\sum_{t=\ell+1}^{m}|\{w\in \mathcal{L}_{\mathcal{V},\ell}^t:\ \mathbf{f}((w)_g)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a},\ w_{t-1}\neq 0\}|. \end{align} $$

Any word of length t that ends at $0$ must be an extension by $0$ of a word w of length $t-1$ . Recalling that $\mathbf {f}(0)=0$ , and since $0$ can extend w if and only if $0\in F(w)$ , it follows that

(4.9)

Let $C>0$ and $\rho \in (0,1)$ be given by Lemma 4.3. From (4.1),

(4.10) $$ \begin{align} |\mathcal{L}_{\mathcal{V},\ell}^t(\mathbf{b})|\leq |\mathcal{L}^t_{\mathcal{V},\ell}|\bigg(\dfrac{1}{|\mathbf{a}|}+C|\mathcal{V}|\rho^n\bigg). \end{align} $$

From (4.9), (4.10) and the estimation provided by (4.2) of Lemma 4.3 for $|\mathcal {L}_{\mathcal {V},\ell }^{t-1}(\mathbf {b},F)|$ ,

for some constant $C'>C$ . Using the previous estimation and (4.10) in (4.8),

(4.11) $$ \begin{align} &|\{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a} \}\cap [0,g^m)| \nonumber\\& \quad \leq \dfrac{1}{|\mathbf{a}|}\bigg(|\mathcal{L}_{\mathcal{V},\ell}^\ell|+\sum_{t=\ell+1}^m|\{w\in \mathcal{L}_{\mathcal{V},\ell}^t:\ w_{t-1}\neq 0\}|\bigg)+C\rho^\ell|\mathcal{L}^\ell_{\mathcal{V},\ell}|+C'\sum_{t=\ell+1}^m\rho^t|\mathcal{L}_{\mathcal{V},\ell}^t| \nonumber\\& \quad =\dfrac{1}{|\mathbf{a}|}|A_{\Sigma,\ell}\cap [0,g^m)|+C'\sum_{t=\ell}^m\rho^t|\mathcal{L}_{\mathcal{V},\ell}^t|. \end{align} $$

Since $|A_{\Sigma ,\ell }\cap [0,g^m)|\geq |\mathcal {L}_{\mathcal {V},\ell }^m|$ , Proposition 3.11 leads to

$$ \begin{align*}|A_{\Sigma,\ell}\cap [0,g^m)|^{-1}\sum_{t=\ell}^m\rho^t|\mathcal{L}_{\mathcal{V},\ell}^t|\leq \sum_{t=\ell}^m \rho^t\dfrac{|\mathcal{L}_{\mathcal{V},\ell}^t|}{|\mathcal{L}_{\mathcal{V},\ell}^m|} \leq \sum_{t=\ell}^m\rho^t k^{-(m-t)}\leq m\rho^m,\end{align*} $$

where in the last inequality, we assumed that $k^{-1}\leq \rho $ (otherwise, we change $\rho $ by $k^{-1}$ ). Hence, it follows from (4.11) that

$$ \begin{align*}\dfrac{|\{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a} \}\cap [0,g^m)|}{|A_{\Sigma,\ell}\cap [0,g^m)|}-\dfrac{1}{|\mathbf{a}|}\leq C'm\rho^m.\end{align*} $$

Following the same approach, the analogue lower inequality can be obtained. If $r=\rho ^{1/2}$ and $C">0$ is large enough, it holds that $C'm\rho ^m\leq C" r^m$ for all $m\in {\mathbb N}$ , concluding the result.

Let $N\in {\mathbb N}$ and consider its expansion in base g, $N=d_0+d_1g+\cdots +w_mg^m$ , where $w_m\neq 0$ . We can write $[0,N)=[0,g^m)\cup [g^m,N)$ and using Lemma 4.4, the distribution can be recovered when restricted to the interval $[0,g^m)$ . The next lemma focuses on addressing the distribution in the interval $[g^m,N)$ .

Lemma 4.5. If the Markov condition holds, there exist $C>0$ and $\rho \in (0,1)$ such that for all $t,m\in {\mathbb N}$ (with $t<m$ ) and for any sequence of digits $d_t,d_{t+1},\ldots ,d_m \in \{0,\ldots ,g-1\}$ where $d_m\neq 0$ , defining $M:=d_mg^m+\cdots +d_{t+1}g^{t+1}$ and assuming $A_{\Sigma ,\ell }\cap [M,M+d_tg^t)\neq \emptyset $ , the following estimation holds for every $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}:$

$$ \begin{align*} \bigg|\dfrac{ | \{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [M,M+d_tg^{t})| }{|A_{\Sigma,\ell}\cap [M,M+d_tg^t)|}-\dfrac{1}{|\mathbf{a}|}\bigg| \leq C\rho^t. \end{align*} $$

Proof. Let C and $\rho $ be as given by Lemma 4.3, and let $d\in \{0,\ldots ,g-1\}$ . Let

(4.12) $$ \begin{align} x\in \{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv\mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [M+dg^{t},M+(d+1)g^{t}). \end{align} $$

Since $x\in [M+dg^{t},M+(d+1)g^{t})$ , the representation of x can be written as $x=(x_0\cdots x_{m})_g$ , where $x_{t}=d$ and $x_{t+1}\cdots x_m=d_{t+1}\cdots d_m$ . Therefore, using the g-additivity, we can see that $\mathbf {f}(x)\equiv \mathbf {b}\ \mathrm {mod}\ \mathbf {a}$ is equivalent to

$$ \begin{align*}\mathbf{f}((x_0\cdots x_{t-1})_g)\equiv\mathbf{b}-\mathbf{f}(dg^t+d_{t+1}g^{t+1}+\cdots+d_mg^m)\ \mathrm{mod}\ \mathbf{a}=:\tilde{\mathbf{b}}(d).\end{align*} $$

Additionally, as $d_m\neq 0$ , $x=(x_0\cdots x_{t-1}dd_{t+1}\cdots d_m)_g\in A_{\Sigma ,\ell }$ is equivalent to

$$ \begin{align*}x_0\cdots x_{t-1}\in \mathcal{L}_{\mathcal{V},\ell}(\Sigma)\quad \text{and}\quad dd_{t+1}\cdots d_m\in F(x_0\cdots x_{t-1}).\end{align*} $$

Therefore, (4.12) is equivalent to

$$ \begin{align*}&x_0\cdots x_{t-1}\in \{w\in \mathcal{L}_{\mathcal{V},\ell}^t(\Sigma):\ \mathbf{f}((w)_g)\equiv\tilde{\mathbf{b}}(d)\ \mathrm{mod}\ \mathbf{a}\}\quad \text{and}\\ & dd_{t+1}\cdots d_m\in F(x_0\cdots x_{t-1}). \end{align*} $$

Using this equivalence and the estimation (4.2) of Lemma 4.5,

(4.13)

With an analogous argument as above, we can obtain that

From the assumption $A_{\Sigma ,\ell }\cap [M,M+d_tg^t)\neq \emptyset $ , it is clear that $d_t\geq 1$ . Thus, we can use the previous identity in (4.13), and then sum from $d=0$ to $d_t-1$ , obtaining

$$ \begin{align*} | \{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv_{\mathbf{a}}\mathbf{b}\}\cap [M,M+d_tg^{t})|\leq \bigg(\dfrac{1}{|\mathbf{a}|}+C\rho^t\bigg)|A_{\Sigma,\ell}\cap [M,M+d_tg^t)|. \end{align*} $$

With a similar argument, the lower inequality can be obtained, concluding the result.

Putting the previous results together, the distribution for the set $A_{\Sigma ,\ell }$ can be estimated for an arbitrary interval $[0,N)$ .

Proposition 4.6. Let $g\geq 2$ , $\mathbf {a}\in {\mathbb N}^r$ and $\mathbf {f}=(f_1,\ldots ,f_r)$ be a collection of g-additive functions eventually periodic with respect to $\mathbf {a}$ . Let $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ be a mixing, sofic and regular subshift, and $(p,\ell )$ be an eventual period such that $\ell $ is at least the length of the shortest synchronizing word.

If the Markov condition holds, there exists $\gamma>0$ such that

$$ \begin{align*} \dfrac{| \{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [0,N)|}{|A_{\Sigma,\ell}\cap [0,N)|}=\frac{1}{a_1\cdot a_2\cdots a_r}+O(N^{-\gamma}) \end{align*} $$

for every $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}$ .

Proof. Since the Markov condition holds, we can apply Lemma 4.4 and Lemma 4.5 with constants $C>0$ and $\rho \in (0,1)$ . Let $N\in {\mathbb N}$ and its base-g expansion $N=d_mg^m+\cdots +d_1g+d_0,$ where $d_m\neq 0$ . For every $t\in \{0,\ldots ,m\}$ , we define $N(t):=d_mg^m+\cdots +d_tg^t$ . Noting

(4.14) $$ \begin{align} [0,N)=[0,g^m)\cup [g^m,d_mg^m)\cup \bigg(\bigcup_{t=0}^{m-1} [N(t+1),N(t))\bigg), \end{align} $$

we aim to estimate $|\{n\in A_{\Sigma ,\ell }:\ \mathbf {f}(n)\equiv \mathbf {b}\ \mathrm {mod}\ \mathbf {a}\}\cap I|$ for each interval I in the previous decomposition of $[0,N)$ . The interval $[0,g^m)$ can be estimated from Lemma 4.4 and $[N(t+1),N(t))$ from Lemma 4.5 as $N(t)=N(t+1)+d_tg^t$ . However, the interval $[g^m,d_mg^m)$ can be handled in the same way as Lemma 4.5 by writing $[g^m, g^m+(d_m-1)g^m)$ . Putting these estimates together, we can obtain the upper bound

(4.15) $$ \begin{align} \begin{aligned} &\dfrac{| \{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [0,N)|}{|A_{\Sigma,\ell}\cap [0,N)|} \leq \dfrac{1}{|\mathbf{a}|}+C R(m), \end{aligned} \end{align} $$

where

$$ \begin{align*} R(m)& := \rho^m\dfrac{|A_{\Sigma,\ell}\cap [0,g^m)|}{|A_{\Sigma,\ell}\cap [0,N)|}+\rho^m\dfrac{|A_{\Sigma,\ell}\cap [g^m,d_mg^m)|}{|A_{\Sigma,\ell}\cap [0,N)|} \\ &\quad +\sum_{t=0}^{m-1}\rho^t\dfrac{|A_{\Sigma,\ell}\cap [N(t+1),N(t))|}{|A_{\Sigma,\ell}\cap [0,N)|}. \end{align*} $$

If $A_{\Sigma ,\ell }\cap [N(t+1),N(t))\neq \emptyset $ (in particular, $d_t\neq 0$ ), each element of $A_{\Sigma ,\ell }\cap [N(t+1), N(t))$ has a base-g expansion of length $m+1$ , where the $(m-t)$ most significant digits are $d_{t+1}\cdots d_m$ . Then, they may differ only in the $(t+1)$ least significant digits. Therefore,

$$ \begin{align*}|A_{\Sigma,\ell}\cap [N(t+1),N(t))|\leq |\mathcal{L}^{t+1}_{\mathcal{V},\ell}(\Sigma)|.\end{align*} $$

Let $k\in {\mathbb N}$ be the regularity of $\Sigma $ . Since $|A_{\Sigma ,\ell }\cap [0,N)|\geq |\mathcal {L}^{m}_{\mathcal {V},\ell }(\Sigma )|$ , we can get from the above estimation and Proposition 3.11 that

$$ \begin{align*}\dfrac{|A_{\Sigma,\ell}\cap [N(t+1),N(t))|}{|A_{\Sigma,\ell}\cap [0,N)|}\leq \dfrac{|\mathcal{L}_{\mathcal{V},\ell}^{\ell}(\Sigma)|k^{t+1-\ell}}{|\mathcal{L}_{\mathcal{V},\ell}^{\ell}(\Sigma)|k^{m-\ell}}=k^{t+1-m}\leq \rho^{m-t-1},\end{align*} $$

where we assumed that $k^{-1}\leq \rho $ (otherwise, replace $\rho $ by $k^{-1}$ ). Therefore, using the previous estimation in (4.15),

$$ \begin{align*}\dfrac{| \{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [0,N)|}{|A_{\Sigma,\ell}\cap [0,N)|} -\dfrac{1}{|\textbf{a}|}\leq C(2+\rho^{-1}m)\rho^m.\end{align*} $$

The lower inequality can be obtained following the same argument. Considering $r=\rho ^{1/2}$ and $C'$ large enough, $C'r^m>C(2+\rho ^{-1}m)\rho ^m$ for all $m\in {\mathbb N}$ . The conclusion follows as $m\log (g)\leq \log (N)\leq (m+1)\log (g).$

Remark 4.7. When $\Sigma $ is a shift of finite type, $|A_\Sigma \setminus A_{\Sigma ,\ell }|$ is finite for all $\ell $ large enough. In such a case, we can replace $A_{\Sigma ,\ell }$ by $A_\Sigma $ in Proposition 4.6. Moreover, while the choice of the initial distribution for the Markov chains is important to recover $A_{\Sigma ,\ell }$ in Proposition 4.6, the convergence of the Markov chains remains independent of this choice. Therefore, different sets of integers can be considered by adjusting the initial distribution.

The next step is to transfer the distribution from $A_{\Sigma ,\ell }$ to the multiplicatively invariant set $A_\Sigma $ . To achieve this, it suffices to show that the difference between these two sets becomes asymptotically negligible in size. The main ingredient to conclude that is the following proposition.

Proposition 4.8. Let $\Sigma $ be a transitive, sofic and regular subshift. Then,

(4.16) $$ \begin{align} \lim_{\ell\to \infty} \dfrac{|\mathcal{L}^\ell(\Sigma)\setminus\mathcal{L}^\ell_{\mathcal{V},\ell}(\Sigma)|}{|\mathcal{L}^\ell_{\mathcal{V},\ell}(\Sigma)|}=0. \end{align} $$

Proof. Let $k\geq 2$ be the regularity of $\Sigma $ . For any $y\in \mathcal {L}(\Sigma )$ such that $F(y)\in \mathcal {V}$ , every extension $\tilde {y}\in \mathcal {L}(\Sigma )$ of y satisfies $F(\tilde {y})\in \mathcal {V}$ . Then, for every $\ell \in {\mathbb N}$ and $i\geq \ell $ , $\mathcal {L}^{i}_{\mathcal {V},\ell }\subseteq \mathcal {L}^i_{\mathcal {V},i}$ . From Proposition 3.11, it follows that

(4.17) $$ \begin{align} |\mathcal{L}^i_{\mathcal{V},i}|\geq |\mathcal{L}^{i}_{\mathcal{V},\ell}|=|\mathcal{L}^{\ell}_{\mathcal{V},\ell}|k^{i-\ell}. \end{align} $$

Since $\Sigma $ is transitive, the Fischer cover is an irreducible graph, so we can find $q\in {\mathbb N}$ large enough such that, for every node $F\in \mathcal {V}$ , there is a path $\pi $ of length q starting at F, where $\unicode{x3bb} (\pi )$ is a synchronizing word. To see this, notice that every word can be extended to a synchronizing word and we can choose a q common for every node as any extension of a synchronizing word is synchronizing.

Let $n\in {\mathbb N}$ and $x\in \mathcal {L}^{\ell +nq}\setminus \mathcal {L}_{\mathcal {V},\ell +nq}^{\ell +nq}$ . Then, x is in the language, but $F(x)\notin \mathcal {V}$ . In particular, $F(x_0\cdots x_{\ell -1})\notin \mathcal {V}$ and the word $x_{\ell }\cdots x_{\ell +nq-1}$ is not synchronizing. Thus,

(4.18) $$ \begin{align} |\mathcal{L}^{\ell+nq}\setminus\mathcal{L}_{\mathcal{V},\ell+nq}^{\ell+nq}|\leq |\mathcal{L}^{\ell}\setminus\mathcal{L}_{\mathcal{V},\ell}^{\ell}|\times |\{w\in \mathcal{L}^{nq}(\Sigma):\ w \text{ is not synchronizing}\}|. \end{align} $$

For each node $F\in \mathcal {V}$ , there are $k^{qn}$ paths of length $qn$ in $\mathcal {G}$ starting at F. From those paths, there are at most $(k^{q}-1)^n$ paths labelled by non-synchronizing words, as for every node F, we can find at least one path starting at F of length q that represents a synchronizing word. From this idea and (4.18),

(4.19) $$ \begin{align} |\mathcal{L}^{\ell+nq}\setminus\mathcal{L}_{\mathcal{V},\ell+nq}^{\ell+nq}|\leq |\mathcal{L}^{\ell}\setminus\mathcal{L}_{\mathcal{V},\ell}^{\ell}|\times |\mathcal{V}|(k^q-1)^n.\end{align} $$

By defining

$$ \begin{align*}C:=|\mathcal{V}|\max_{j=\ell,\ldots,\ell+(q-1)}\dfrac{|\mathcal{L}^{j}\setminus\mathcal{L}_{\mathcal{V},j}^{j}|}{|\mathcal{L}^j_{\mathcal{V},j}|}\end{align*} $$

and combining (4.17) with (4.19),

$$ \begin{align*}\dfrac{|\mathcal{L}^i\setminus\mathcal{L}^i_{\mathcal{V},i}|}{|\mathcal{L}^i_{\mathcal{V},i}|}\leq C\dfrac{(k^q-1)^{ \lfloor{i/q} \rfloor}}{k^{q{ \lfloor{i/q} \rfloor}}}.\end{align*} $$

The result follows by taking $i\to \infty $ .

We can now state the main result of this section.

Theorem 4.9. Let $g\geq 2$ , $\mathbf {a}=(a_1,\ldots ,a_r)\in {\mathbb N}^r$ and $\mathbf {f}=(f_1,\ldots ,f_r)$ be a collection of g-additive functions eventually periodic with respect to $\mathbf {a}$ . Let $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ be a mixing, sofic and regular subshift, and p be an eventual period. If the Markov condition holds,

$$ \begin{align*}\lim_{N\to\infty}\dfrac{| \{n\in A_{\Sigma}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [0,N)|}{|A_{\Sigma}\cap [0,N)|}=\frac{1}{a_1\cdot a_2\cdots a_r}\end{align*} $$

for every $\mathbf {b}=(b_1,\ldots ,b_r)\in {\mathbb Z}_{\mathbf {a}}$ .

Proof. Let $(p,\ell )$ be an eventual period and $N\in {\mathbb N}$ . For every $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}$ , define

$$ \begin{align*} \alpha(\ell,N) & :=\dfrac{|(A_\Sigma\setminus A_{\Sigma,\ell})\cap [0,N)|}{|A_{\Sigma,\ell}\cap [0,N)|},\ L(\mathbf{b},\ell,N) \\ & :=\dfrac{| \{n\in A_{\Sigma,\ell}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [0,N)|}{|A_{\Sigma,\ell}\cap [0,N)|}.\end{align*} $$

A simple computation leads to the following inequality:

$$ \begin{align*}\dfrac{1}{1+\alpha(\ell,N)}L(\mathbf{b},\ell,N)\leq \dfrac{| \{n\in A_{\Sigma}:\ \mathbf{f}(n)\equiv \mathbf{b}\ \mathrm{mod}\ \mathbf{a}\}\cap [0,N)|}{|A_\Sigma\cap [0,N)|}\leq L(\mathbf{b},\ell,N)+\alpha(\ell,N).\end{align*} $$

Proposition 4.6 gives that $L(\mathbf {b},\ell ,N)\to 1/|\mathbf {a}|$ when $N\to \infty $ . Therefore, to conclude the theorem, it will be enough to show that

(4.20) $$ \begin{align} \lim_{\ell\to\infty}\limsup_{N\to \infty} \alpha(\ell,N)=0. \end{align} $$

For this purpose, we will estimate $|(A_\Sigma \setminus A_{\Sigma ,\ell })\cap [0,N)|$ . For $N\in {\mathbb N}$ , let m be such that $g^m\leq N<g^{m+1}$ . If $n\in (A_\Sigma \setminus A_{\Sigma ,\ell })\cap [g^t,g^{t+1})$ for some $\ell \leq t\leq m$ , n can be represented by a word in $\mathcal {L}^{t+1}(\Sigma )\setminus \mathcal {L}^{t+1}_{\mathcal {V},\ell }(\Sigma ).$ Thus, we can estimate

(4.21) $$ \begin{align} \dfrac{|(A_\Sigma\setminus A_{\Sigma,\ell})\cap [g^\ell,g^{m+1})|}{|A_{\Sigma,\ell}\cap [g^\ell,g^m)|}\leq \dfrac{\sum_{i=\ell}^{m+1}|\mathcal{L}^i\setminus\mathcal{L}^{i}_{\mathcal{V},\ell}|}{|\mathcal{L}^m_{\mathcal{V},\ell}|}. \end{align} $$

It is easy to see that each word in $\mathcal {L}^i\setminus \mathcal {L}^{i}_{\mathcal {V},\ell }$ is an extension of a word in $\mathcal {L}^\ell \setminus \mathcal {L}^\ell _{\mathcal {V},\ell }$ . Let $w\in \mathcal {L}^\ell \setminus \mathcal {L}^\ell _{\mathcal {V},\ell }$ . Despite $F(w)\notin \mathcal {V}$ , $F(w)$ is union of elements in $\mathcal {V}$ . To see this, just consider the union of all $F\in \mathcal {V}$ such that the word w can be read in some path of the Fischer cover ending at F. Since the subshift is k-regular for some $k\geq 2$ , from the Fischer cover, we can deduce that there are at most $|\mathcal {V}|k^{i-\ell }$ words of length i that are extensions of w. In particular, each of those extensions is in $\mathcal {L}^i\setminus \mathcal {L}^i_{\mathcal {V},\ell }$ . Therefore, each word in $\mathcal {L}^\ell \setminus \mathcal {L}^\ell _{\mathcal {V},\ell }$ is extended to at most $|\mathcal {V}|k^{i-\ell }$ words of length i, concluding from (4.21) that

$$ \begin{align*}\dfrac{|(A_\Sigma\setminus A_{\Sigma,\ell})\cap [g^\ell,g^{m+1})|}{|A_{\Sigma,\ell}\cap [g^\ell,g^m)|}\leq \dfrac{|\mathcal{V}||\mathcal{L}^\ell\setminus\mathcal{L}^\ell_{\mathcal{V},\ell}|\sum_{i=\ell}^{m+1}k^{i-\ell}}{|\mathcal{L}^\ell_{\mathcal{V},\ell}|k^{m-\ell}}\leq |\mathcal{V}|\sum_{i=-1}^{\infty}k^{-i} \dfrac{|\mathcal{L}^\ell\setminus\mathcal{L}^\ell_{\mathcal{V},\ell}|}{|\mathcal{L}^\ell_{\mathcal{V},\ell}|}.\end{align*} $$

Therefore,

$$ \begin{align*} 0\leq\limsup_{N\to \infty}\alpha(\ell,N) & \leq\limsup_{N\to\infty}\dfrac{g^\ell+|(A_\Sigma\setminus A_{\Sigma,\ell})\cap [g^\ell,g^{m+1})|}{|A_{\Sigma,\ell}\cap [g^\ell,g^m)|}\\ & \leq \dfrac{|\mathcal{L}^\ell\setminus\mathcal{L}^\ell_{\mathcal{V},\ell}|}{|\mathcal{L}^\ell_{\mathcal{V},\ell}|} |\mathcal{V}|\sum_{i=-1}^{\infty}k^{-i}. \end{align*} $$

It follows that $ \lim _{\ell \to \infty }\limsup _{N\to \infty } \alpha (\ell ,N)=0$ from the previous inequality and Proposition 4.8, concluding the result.

Remark 4.10. Although we focus on subsets of integers, the nature of the construction allows some of the ideas presented in this paper to be immediately extended to more general contexts where elements can be uniquely represented on a certain basis (canonical numerical systems). Relevant references to these systems include [Reference Akiyama and Pethő1, Reference Kovács34, Reference Madritsch37]. A particular case are the Gaussian integers, where unique expansion of elements can be provided in certain bases (see [Reference Gittenberger and Thuswaldner26, Reference Kátai28, Reference Kovács33]).

5 Applications to the distribution of multiplicatively invariant sets of integers

Let A be a multiplicatively invariant set of integers that admits a representation $A=A_\Sigma $ , where $\Sigma $ is a mixing, sofic and regular subshift. From Theorem 4.9, uniform distribution is obtained if the Markov chains are irreducible and aperiodic, which might be challenging to verify. To check the Markov condition, we can conveniently choose the period p and study the matrices $M_i$ using the characterization provided by Proposition 3.13. For any $n\in {\mathbb N}$ and $s,s'\in \mathcal {S}$ ,

$$ \begin{align*}M_{i}^n(s,s')=k^{-pn}|\{w\in \mathcal{L}^{pn}(\Sigma):\ \mathbf{f}(g^{i}(w)_g)\equiv \textbf{b}'-\textbf{b}\ \mathrm{mod}\ \textbf{a}, \ F\overset{w}{\to} F'\}|.\end{align*} $$

For $M_i$ to be irreducible, we need to check that for all $\mathbf {b}\in {\mathbb Z}_{\mathbf {a}}$ and $F,F'\in \mathcal {V}$ ,

(5.1) $$ \begin{align} \text{there exists }w\in \mathcal{L}(\Sigma) \text{ such that }p\mid |w|,\ \mathbf{f}(g^i(w)_g)\equiv \mathbf{b} \ \mathrm{mod}\ \mathbf{a} \text{ and } F\overset{w}{\to} F'. \end{align} $$

Assuming that $M_i$ is irreducible, aperiodicity holds if there exists $F\in \mathcal {V}$ such that

(5.2) $$ \begin{align} \gcd \{n\in {\mathbb N}: \text{ there exists } w\in \mathcal{L}^{pn}(\Sigma) \text{ such that } \mathbf{f}(g^{i}(w)_g)\equiv 0\ \mathrm{mod}\ \mathbf{a} \text{ and }F\overset{w}{\to} F \}=1. \end{align} $$

In this section, we will study the function $\textbf {f}=(\operatorname {\mathrm {id}},S_g)$ , where $S_g$ denotes the function sum of digits in base g.

5.1 Uniform distribution of integers with missing digits

Let $g\geq 2$ be an integer and let $\mathcal {D}\subseteq \{0,\ldots ,g-1\}$ be a subset of digits with at least two elements. We will write $\mathcal {D}=\{d_1,\ldots ,d_t\}$ , where $d_1<d_2<\cdots <d_t$ . Recalling that $\mathcal {C}_{g,\mathcal {D}}=A_\Sigma $ for $\Sigma =\mathcal {D}^{{\mathbb N}_0}$ , it is easy to see that the Fischer cover for $\Sigma $ is the labelled graph with a unique node F and for each $d\in \mathcal {D}$ , there is a path from F to F labelled by d. Thus, $\Sigma $ is mixing, sofic and regular, so we can apply Theorem 4.9. Moreover, the existence of a single follower set allows us to obviate this notion in the following discussion.

Definition 5.1. Let $A\subseteq {\mathbb N}_0$ be a $\times g$ -invariant set and $a,a'\in {\mathbb N}$ . We say A is jointly uniformly distributed $\ \mathrm {mod}\ (a,a')$ if

$$ \begin{align*}\lim_{N\to\infty}\dfrac{|\{n\in A:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}\cap[0,N)|}{|A\cap [0,N)|}=\dfrac{1}{aa'}\end{align*} $$

for every $b\in {\mathbb Z}_a,b'\in {\mathbb Z}_{a'}$ .

From Proposition 3.2, we can find an eventual period of the form $(p,\ell )$ for $\mathbf {f}=(\operatorname {\mathrm {id}},S_g)$ . Thus, checking that $M_i$ is irreducible reduces to show that for all $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ ,

(5.3) $$ \begin{align} \text{there is } n\in {\mathbb N} \text{ and } w\in \mathcal{D}^{np} \text{ such that }g^i(w)_g\equiv b\ \mathrm{mod}\ a \text{ and }S_g(w)\equiv b'\ \mathrm{mod}\ a'. \end{align} $$

Similarly, $M_i$ is aperiodic if

(5.4) $$ \begin{align} \gcd \{n\kern1.4pt{\in}\kern1.4pt {\mathbb N}: \text{there exists } w\in \mathcal{D}^{pn} \text{ such that } (w)_g\equiv 0\ \mathrm{mod}\ a \text{ and } S_g(w)\equiv 0\ \mathrm{mod}\ a'\}\kern1.4pt{=}\kern1.4pt1. \end{align} $$

Aperiodicity in the case $\gcd (g,a)=1$ follows immediately from the following result.

Lemma 5.2. Let $g\geq 2$ be an integer and $a,a'\in {\mathbb N}$ such that $\gcd (g,a)=1$ . Let $p:=a'\phi (a(g-1))$ , where $\phi $ is the Euler’s totient function. Then, for every $n\in {\mathbb N}$ and $w=d\cdots d\in \mathcal {D}^{np}$ , $(w)_g\equiv 0\ \mathrm {mod}\ a$ and $S_g(w)\equiv 0\ \mathrm {mod}\ a'$ .

Proof. Let $n\in {\mathbb N}$ . Notice that $\gcd (g,a(g-1))=1$ , so the Euler’s theorem implies that $g^p\equiv 1\ \mathrm {mod}\ a(g-1)$ . If $w=d\cdots d\in \mathcal {D}^{np}$ ,

(5.5) $$ \begin{align} (w)_g=d+dg+\cdots+dg^{np-1}=d\dfrac{g^{np}-1}{g-1}. \end{align} $$

Since $g^{np}-1$ is divisible by $a(g-1)$ , $({g^{np}-1})/({g-1})\equiv 0\ \mathrm {mod}\ a$ , concluding that $(w)_g\equiv 0\ \mathrm {mod}\ a$ . However, $S_g(w)=npd=a'(n\phi (a(g-1))d)\equiv 0\ \mathrm {mod}\ a'$ .

The following application of Bézout’s identity is fundamental to check the irreducibility of $M_i$ .

Lemma 5.3. Let $g\geq 2$ be an integer and let $\mathcal {D}=\{d_1,\ldots ,d_t\}$ be a set of digits, where $d_1$ is the smallest digit. Consider $a,a'\in {\mathbb N}$ such that $\gcd (g,a)=1$ and define $p:=a'\phi (a(g-1))$ , where $\phi $ is the Euler’s totient function. Then, there exists a word $w\in \mathcal {L}(\mathcal {D}^{{\mathbb N}_0})$ such that

$$ \begin{align*}|w|\equiv 0\ \mathrm{mod}\ p, \quad (w)_g\equiv \delta\ \mathrm{mod}\ a\quad \text{and}\quad S_g(w)\equiv \delta\ \mathrm{mod}\ a',\end{align*} $$

where $\delta :=\gcd (aa',d_2-d_1,\ldots ,d_t-d_1).$

Proof. From Bézout’s identity, there exist $n_1,n_2,\ldots ,n_t\in {\mathbb Z}$ such that

$$ \begin{align*}\delta=n_1(aa')+n_2(d_2-d_1)+\cdots+n_t(d_t-d_1).\end{align*} $$

For all $j\in \{2,\ldots ,t\}$ , choose $k_j\in {\mathbb N}$ large enough such that $m_j:=k_j(aa')+n_j>0$ . Then,

(5.6) $$ \begin{align} m_2(d_2-d_1)+\cdots+m_t(d_t-d_1)\equiv \delta\ \mathrm{mod}\ aa'. \end{align} $$

Let us define the word $w(j):=d_jd_1\cdots d_1\in \mathcal {D}^p$ for $j\in \{2,\ldots ,t\}$ . From Lemma 5.2,

$$ \begin{align*}(w(j))_g=(d_j-d_1)+d_1+d_1g+\cdots+d_1g^{p-1}\equiv d_j-d_1\ \mathrm{mod}\ a.\end{align*} $$

Similarly, $S_g(w(j))=pd_1+(d_j-d_1)\equiv d_j-d_1 \ \mathrm {mod}\ a'$ . Let us define

$$ \begin{align*}w:=\underbrace{w(2)\cdots w(2)}_{m_2 \text{ times}}\cdots \underbrace{w(t)\cdots w(t)}_{m_t \text{ times}}.\end{align*} $$

Notice that $|w|=p(m_2+\cdots +m_t)$ . Also, the periodicity $g^p\equiv 1 \ \mathrm {mod}\ a$ and (5.6) imply that

$$ \begin{align*}(w)_g\equiv \sum_{j=2}^t(w(j))_gm_j\equiv \sum_{j=2}^t(d_j-d_1)m_j\equiv \delta\ \mathrm{mod}\ a.\end{align*} $$

Using (5.6) again, we can conclude

$$ \begin{align*}S_g(w)=\sum_{j=2}^t S_g(w(j))m_j\equiv \sum_{j=2}^t (d_j-d_1)m_j\equiv \delta\ \mathrm{mod}\ a'.\\[-47pt] \end{align*} $$

Leveraging Theorem 4.9 and Lemma 5.3, we can establish a complete description of the phenomenon of joint distribution (Definition 5.1) for missing digits sets when $\gcd (g,a)=\gcd (a,a')=1$ . In particular, this shows Theorem A.

Theorem 5.4. Let $g\geq 2$ be an integer and let $\mathcal {D}=\{d_1,\ldots ,d_t\}$ be a set of digits, where $d_1$ is the smallest digit. Suppose that $\gcd (g,a)=\gcd (a,a')=1$ and recall the missing digits set $\mathcal {C}_{g,\mathcal {D}}$ defined in (1.1). Defining $\delta :=\gcd (aa',d_2-d_1,\ldots ,d_t-d_1)$ , we get the following.

  1. (i) $\mathcal {C}_{g,\mathcal {D}}$ is jointly uniformly distributed $\ \mathrm {mod}\ (a,a')$ if and only if $\delta =1$ .

More generally, concerning the limit

(5.7) $$ \begin{align}L(b,b'):=\lim_{N\to\infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}\cap[0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,N)|},\end{align} $$

we have the following.

  1. (ii) Let $\delta _a:=\gcd (\delta ,a)$ and $\delta _{a'}:=\gcd (\delta ,a')$ . If $d_1\equiv 0\ \mathrm {mod}\ \delta _a$ and $d_1\equiv 0\ \mathrm {mod}\ \delta _{a'}$ , then $L(b,b')=\delta /aa'$ for every $(b,b')$ in the subgroup $\langle \delta _{a}\rangle \times \langle \delta _{a'}\rangle \subseteq {\mathbb Z}_a\times {\mathbb Z}_{a'}$ . However, if $(b,b')\notin \langle \delta _{a}\rangle \times \langle \delta _{a'}\rangle $ ,

    $$ \begin{align*}\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a, \ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}=\emptyset.\end{align*} $$
  2. (iii) In any other case, for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ , the limit $L(b,b')$ either equals zero or does not exist.

Proof. Let us define $p=a'\phi (a(g-1))$ , where $\phi $ is the Euler’s totient function, and note that $(p,1)$ is an eventual period for $\mathbf {f}=(\operatorname {\mathrm {id}},S_g)$ with respect to $\mathbf {a}=(a,a')$ . For $i\in {\mathbb N}$ , let $X^i$ be the Markov chain associated to $g, \mathbf {a}, \mathbf {f}, p, \ell $ and the subshift $\Sigma =\mathcal {D}^{{\mathbb N}_0}$ , as defined in Definition 3.14. We denote by $M_i$ its transition matrix and $\mu _i$ its initial distribution.

The aperiodicity of $M_i$ follows from Lemma 5.2 and (5.4).

Let us suppose $\delta =1$ . From Lemma 5.3, there exists a word w using symbols of $\mathcal {D}$ such that $|w|\equiv 0\ \mathrm {mod}\ p$ , $(w)_g\equiv 1\ \mathrm {mod}\ a$ and $S_g(w)\equiv 1\ \mathrm {mod}\ a'$ . Since $\gcd (a,a')=1$ , the element $(1,1)$ is a generator for ${\mathbb Z}_a\times {\mathbb Z}_{a'}$ . Then, for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ , there exists $m\in {\mathbb N}$ such that $m\equiv (g^i)^{-1}b\ \mathrm {mod}\ a$ and $m\equiv b'\ \mathrm {mod}\ a'$ . Let $y\in \mathcal {L}(\mathcal {D}^{{\mathbb N}_0})$ be constructed by concatenating w with itself m times. The periodicity $g^p\equiv 1\ \mathrm {mod}\ a$ implies that $g^i(y)_g\equiv g^i m(w)_g\equiv b\ \mathrm {mod}\ a$ . However, $S_g(y)\equiv mS_g(w)\equiv b'\ \mathrm {mod}\ a'$ . Therefore, $M_i$ is irreducible for every $i\in {\mathbb N}$ . This concludes that the Markov condition holds, then Theorem 4.9 implies that $\mathcal {C}_{g,\mathcal {D}}$ is jointly uniformly distributed $\ \mathrm {mod}\ (a,a').$

Now, let us suppose that $\delta \neq 1$ . Since $\delta $ divides $aa'$ and $\gcd (a,a')=1$ , we can write $\delta =\delta _{a}\cdot \delta _{a'}$ , where $\delta _{a}:=\gcd (\delta ,a)$ and $\delta _{a'}:=\gcd (\delta ,a')$ . In particular, $\gcd (\delta _a,\delta _{a'})=1.$

From the definition of $\delta $ , note that $d_j\equiv d_1\ \mathrm {mod}\ \delta $ for all $j\in \{1,\ldots ,t\}$ . Therefore, for any $m\in {\mathbb N}$ and $x=x_0\cdots x_{m-1}\in \mathcal {D}^m$ ,

(5.8) $$ \begin{align} (x)_g=\sum_{j=0}^{m-1}(x_j-d_1)g^j+d_1g^j\equiv d_1\sum_{j=0}^{m-1}g^j\ \mathrm{mod}\ \delta_a \quad \text{and}\quad S_g(x)\equiv md_1\ \mathrm{mod}\ \delta_{a'}. \end{align} $$

In particular, for every $x\in \mathcal {L}(\mathcal {D}^{{\mathbb N}_0})$ such that $|x|\equiv 0\ \mathrm {mod}\ p$ , Lemma 5.2 implies that $(x)_g\equiv 0\ \mathrm {mod}\ \delta _a$ and $S_g(x)\equiv 0\ \mathrm {mod}\ \delta _{a'}$ . However, from Lemma 5.3, we can find a word y such that $|y|\equiv 0\ \mathrm {mod}\ p$ , $(y)_g\equiv \delta \ \mathrm {mod}\ a$ and $S_g(y)\equiv \delta \ \mathrm {mod}\ a'.$ By the Chinese remainder theorem, $(\delta ,\delta )$ is a generator for the subgroup $\mathcal {S}(\delta _a,\delta _{a'}):=\langle \delta _a\rangle \times \langle \delta _{a'}\rangle \subseteq {\mathbb Z}_a\times {\mathbb Z}_{a'}$ . Therefore, recalling that $\gcd (g,\delta _a)=1$ ,

(5.9) $$ \begin{align} \bigcup_{n\in{\mathbb N}}\{w\in \mathcal{D}^{np}:\ g^i(w)_g\equiv b\ \mathrm{mod}\ a,\ S_g(w)\equiv b'\ \mathrm{mod}\ a'\}\neq \emptyset \end{align} $$

if and only if $(b,b')\in \mathcal {S}(\delta _a,\delta _{a'})$ . In particular, this already ensures that $M_i$ is not irreducible on ${\mathbb Z}_a\times {\mathbb Z}_{a'}$ , so the Markov condition does not hold. However, we can show that $X^i$ is an irreducible and aperiodic Markov chain when restricting the state space. Recall the initial distribution of $X^i$ given by

$$ \begin{align*} \mu_{i}(b,b')=\dfrac{|\{w\in \mathcal{D}^i: \ (w)_g\equiv b\ \mathrm{mod}\ a,\ S_g(w)\equiv b'\ \mathrm{mod}\ a'\}|}{|\mathcal{D}|^i}. \end{align*} $$

Defining $\delta _a(i):= d_1\sum _{j=0}^{i-1}g^{i-1}\ \mathrm {mod}\ \delta _a$ and $\delta _{a'}(i):= id_1\ \mod {\delta _{a'}}$ , (5.8) implies that $(x)_g\equiv \delta _a(i)\ \mathrm {mod}\ \delta _a$ and $S_g(x)\equiv \delta _{a'}(i)\ \mathrm {mod}\ \delta _{a'}$ for every $x\in \mathcal {D}^i$ . Therefore, ${\mu _i(b,b')\neq 0}$ implies $b\equiv \delta _a(i) \ \mathrm {mod}\ \delta _a$ and $b'\equiv \delta _{a'}(i)\ \mathrm {mod}\ \delta _{a'}$ . If we define

$$ \begin{align*} \mathcal{S}(i):=(\delta_a(i),\delta_{a'}(i))+\mathcal{S}(\delta_a,\delta_{a'}), \end{align*} $$

the equivalence in (5.9) indicates that $X^i$ never visits the states in ${\mathbb Z}_a\times {\mathbb Z}_{a'}\setminus \mathcal {S}(i)$ , and also $X^i$ is irreducible and aperiodic when restricted to the state space $\mathcal {S}(i)$ . Note that $M^i$ restricted to $\mathcal {S}(i)$ is still doubly stochastic, since we only ignore zero-value entries. Therefore, as $|\mathcal {S}(i)|=|\mathcal {S}(\delta _a,\delta _{a'})|=(a/\delta _a)\cdot (a'/\delta _{a'})$ ,

(5.10) $$ \begin{align} \lim_{N\to \infty}\mu_{i+Np}(b,b')=\begin{cases} \delta/aa' & \text{if }(b,b')\in \mathcal{S}(i),\\ 0& \text{if }(b,b')\notin \mathcal{S}(i). \end{cases} \end{align} $$

If $d_1\equiv 0\ \mathrm {mod}\ \delta _a$ and $d_1\equiv 0\ \mathrm {mod}\ \delta _{a'}$ , $\mathcal {S}(i)=\mathcal {S}(\delta _a,\delta _{a'})$ for every $i\in {\mathbb N}$ . This shows that each Markov chain $X^i$ is irreducible and aperiodic in a common state space $\mathcal {S}(\delta _a,\delta _{a'})$ . Note that the Markov condition means that every $X^i$ is irreducible and aperiodic over the state space ${\mathbb Z}_a\times {\mathbb Z}_{a'}$ , but it is easy to see that the procedure of §4 is identical if we assume that each $X^i$ is irreducible and aperiodic over a subgroup of ${\mathbb Z}_a\times {\mathbb Z}_{a'}$ (and the Markov chain never visits the other states). Thus, by replicating the argument of §4, we can conclude

$$ \begin{align*} \lim_{N\to \infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv_a b,\ S_g(n)\equiv_{a'} b'\}\cap [0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,N)|}=\begin{cases} \delta/aa' & \text{if } (b,b')\in \mathcal{S}(\delta_a,\delta_{a'}), \\ 0& \text{if } (b,b')\notin \mathcal{S}(\delta_a,\delta_{a'}). \end{cases} \end{align*} $$

This shows (5.4). If either $d_1\not \equiv 0\ \mathrm {mod}\ \delta _a$ or $d_1\not \equiv 0\ \mathrm {mod}\ \delta _{a'}$ , notice that $\mathcal {S}(1)\cap \mathcal {S}(2)=\emptyset $ . Then, for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ , there exists $j\in {\mathbb N}$ such that the Markov chain $X^j$ does not visit the state $(b,b')$ . From this fact, we want to show that (5.7) either equals zero or the limit does not exist. Let $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ and let $j\in {\mathbb N}$ such that $X^j$ never visits the state $(b,b')$ . By contradiction, suppose that $L(b,b')>0$ . Since $X^j$ does not visit the state $(b,b')$ ,

$$ \begin{align*}\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}\cap [g^{j+mp-1},g^{j+mp})=\emptyset\end{align*} $$

for every $m\in {\mathbb N}$ . The contradiction follows by noting that

$$ \begin{align*} L(b,b') & = \lim_{m\to \infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}\cap [0,g^{j+mp-1})|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,g^{j+mp-1})|}\\ &>\liminf_{m\to \infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}\cap [0,g^{j+mp})|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,g^{j+mp})|}. \end{align*} $$

This concludes case (5.4).

Note that in the cases (5.4) and (5.4), we can conclude from Proposition 4.6 instead of using Theorem 4.9, as $\Sigma $ is a full shift. Hence, the order of convergence $O(N^{-\gamma })$ for some $\gamma>0$ can be provided for the limit (5.7). An immediate consequence follows by taking $a'=1$ , which allows us to fully describe the phenomenon of uniform distribution $\ \mathrm {mod}\ a$ when $\gcd (g,a)=1$ . This shows Corollary A.

Corollary 5.5. Let $g\geq 2$ be an integer and let $\mathcal {D}=\{d_1,\ldots ,d_t\}$ be a set of digits, where $d_1$ is the smallest digit. Suppose $\gcd (g,a)=1$ and denote $\delta :=\gcd (a,d_2-d_1,\ldots ,d_t-d_1).$ Then:

  1. (i) $\mathcal {C}_{g,\mathcal {D}}$ is uniformly distributed $\ \mathrm {mod}\ a$ if and only if $\delta =1$ ;

  2. (ii) if $\delta \neq 1$ and $d_1\equiv 0\ \mathrm {mod}\ \delta $ , $\mathcal {C}_{g,\mathcal {D}}$ is uniformly distributed in the subgroup $\langle \delta \rangle \subseteq {\mathbb Z}_a$ ;

  3. (iii) in any other case, the limit of

    $$ \begin{align*}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ a\}\cap[0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,N)|}\end{align*} $$
    when $N\to \infty $ is either zero or does not exist.

Note that the condition $\gcd (g,a)= 1$ is commonly assumed in results of this kind. In the framework of Corollary 5.5, when $\gcd (g,a)\neq 1$ , the matrices $M_i$ are no longer irreducible over ${\mathbb Z}_a$ . However, the Markov chains constructed can still capture the behaviour of the distribution by breaking $X^i$ into pieces determined by the communication classes of the Markov chain (see [Reference Norris44, §1.2] for details about this notion). The disadvantage of this situation is that the convergence of $X^i$ depends on the initial distribution.

The following simple example shows that when $\gcd (a,g)\neq 1$ , the limiting behaviour depends heavily on the initial distribution.

Example 5.6. Let $a=12$ , $g=6$ and $\mathcal {D}=\{1,2,4\}$ . Notice that a divides $g^i$ for every $i\geq 2$ , then $(w_0\cdots w_n)_g\equiv w_0+w_1g\ \mathrm {mod}\ a$ . Therefore,

$$ \begin{align*}\lim_{N\to \infty}\dfrac{|\{n\in \mathcal{C}_{6,\mathcal{D}}:\ n\equiv b\ \mathrm{mod}\ 12\}\cap [0,N)|}{|\mathcal{C}_{6,\mathcal{D}}\cap [0,N)|}=\begin{cases} 2/9 & \text{if } b\in \{1,2,4\},\\ 1/9 & \text{if } b\in\{7,8,10\},\\ 0 & \text{if } b\in\{0,3,5,6,9,11\}. \end{cases}\end{align*} $$

Notice that this distribution agrees with the distribution when considering $[0,g^2)$ . Also, we can see that the limit is different and non-zero for some classes, behaviour which is not observed under the assumption $\gcd (g,a)=1$ .

Finally, we will present an equivalent condition for uniform distribution $\ \mathrm {mod}\ (a,a')$ without the assumption $\gcd (a,a')=1$ , however, at the cost of having a more complicated condition to check.

Proposition 5.7. Let $g\geq 2$ be an integer and let $\mathcal {D}=\{d_1,\ldots ,d_t\}$ be a set of digits, where $d_1$ is the smallest digit. Consider $a,a'\in {\mathbb N}$ such that $\gcd (g,a)=1$ and define $p:=a'\phi (a(g-1))$ . Therefore, $\mathcal {C}_{g,\mathcal {D}}$ is jointly uniformly distributed $\ \mathrm {mod}\ (a,a')$ if and only if $\gcd (a,d_2-d_1,\ldots ,d_t-d_1)=1$ , and there exists $w\in \mathcal {L}(\mathcal {D}^{{\mathbb N}_0})$ such that $(w)_g\equiv 0\ \mathrm {mod}\ a$ , $S_g(w)\equiv 1\ \mathrm {mod}\ a'$ and $|w|\equiv 0 \ \mathrm {mod}\ p$ .

Proof. If $\mathcal {C}_{g,\mathcal {D}}$ is jointly uniformly distributed $\ \mathrm {mod}\ (a,a')$ , in particular, it is uniformly distributed $\ \mathrm {mod}\ a$ . From Corollary 5.5, it follows that $\gcd (a,d_2-d_1,\ldots ,d_t-d_1)=1$ . In addition, there exist infinitely many words w such that $(w)_g\equiv 0\ \mathrm {mod}\ a$ , $S_g((w)_g)\equiv 1\ \mathrm {mod}\ a'$ and $|w|\equiv 0 \ \mathrm {mod}\ p$ . Otherwise, for every $m\in {\mathbb N}$ ,

$$ \begin{align*} \{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv 0\ \mathrm{mod}\ a,\ S_g(n)\equiv 1\ \mathrm{mod}\ 1\}\cap [g^{mp-1},g^{mp})=\emptyset, \end{align*} $$

contradicting that

$$ \begin{align*} \lim_{N\to\infty}\dfrac{|\{n\in \mathcal{C}_{g,\mathcal{D}}:\ n\equiv 0\ \mathrm{mod}\ a,\ S_g(n)\equiv 1\ \mathrm{mod}\ a'\}\cap[0,N)|}{|\mathcal{C}_{g,\mathcal{D}}\cap [0,N)|}=\dfrac{1}{aa'}>0. \end{align*} $$

However, let us suppose that $\gcd (a,d_2-d_1,\ldots ,d_t-d_1)=1$ and that there exists $w\in \mathcal {L}(\mathcal {D}^{{\mathbb N}_0})$ such that $(w)_g\equiv 0\ \mathrm {mod}\ a$ , $S_g(w)\equiv 1\ \mathrm {mod}\ a'$ and $|w|\equiv 0 \ \mathrm {mod}\ p$ . From Lemma 5.3, there exists $y\in \mathcal {L}(\mathcal {D}^{{\mathbb N}_0})$ such that $(y)_g\equiv 1\ \mathrm {mod}\ a$ and $|y|\equiv 0\ \mathrm {mod}\ p$ . To prove that $M_i$ is irreducible, we will check (5.3). Let $b\in {\mathbb Z}_a$ and $b'\in {\mathbb Z}_{a'}$ . If $\tilde {y}$ be the concatenation $((g^{i})^{-1}b\ \mathrm {mod}\ a)$ -times of the word y (in the case where $b=0$ , we concatenate a times), the periodicity $g^p\equiv 1\ \mathrm {mod}\ a$ implies that $g^i(\tilde {y})_g\equiv g^i(g^{i})^{-1}b\equiv b \ \mathrm {mod}\ a$ . If $s:=S_g(\tilde {y})$ , we denote by $\tilde {w}$ the concatenation $(b'-s\ \mathrm {mod}\ a')$ -times of w. Thus, we can conclude that $g^i(\tilde {y}\tilde {w})_g\equiv b\ \mathrm {mod}\ a$ and $S_g(\tilde {y}\tilde {w})\equiv b'\ \mathrm {mod}\ a'$ . Clearly, $|\tilde {y}\tilde {w}|\equiv 0\ \mathrm {mod}\ p$ . Therefore, $M_i$ is irreducible. The matrix $M_i$ is also aperiodic as a consequence of Lemma 5.2. Thus, the Markov condition holds and the result follows by Theorem 4.9.

5.2 Revisiting Gelfond’s theorem: an equivalent condition

Let $g\geq 2$ be an integer and $a,a'\in {\mathbb N}$ . As presented in Corollary 1.2, Gelfond [Reference Gelfond25] studied the long-term behaviour of

(5.11) $$ \begin{align} |\{n\leq N:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}|, \end{align} $$

showing that, under the assumption $\gcd (g-1,a')=1$ , the set $A={\mathbb N}$ is jointly uniformly distributed $\ \mathrm {mod}\ (a,a')$ . In this section, we present an extension of Corollary 1.2, obtaining an equivalent condition to uniform distribution $\ \mathrm {mod}\ (a,a')$ .

Notice that the obstruction in applying our method arises from the lack of the condition $\gcd (g,a)=1$ , which implies that the Markov chains associated with this problem are not irreducible. However, we can still break each Markov chain $X^i$ into pieces, generating irreducible and aperiodic Markov chains. In that way, the behaviour of (5.11) can be understood using our method.

Theorem 5.8. Let $g\geq 2$ be an integer and $a,a'\in {\mathbb N}$ . Then,

(5.12) $$ \begin{align}\lim_{N\to\infty}\dfrac{ |\{n\leq N:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}|}{N}=\dfrac{1}{aa'} \end{align} $$

for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ if and only if there exists $n\in {\mathbb N}$ such that $n\equiv 0\ \mathrm {mod}\ a$ and $S_g(n)\equiv 1\ \mathrm {mod}\ a'.$

Proof. If (5.12) holds, there are infinitely many $n\in {\mathbb N}$ such that $n\equiv 0\ \mathrm {mod}\ a$ and $S_g(n)\equiv 1\ \mathrm {mod}\ a'$ .

For the other direction, let $n\in {\mathbb N}$ be such that $n\equiv 0\ \mathrm {mod}\ a$ and $S_g(n)\equiv 1\ \mathrm {mod}\ a'$ . For $\mathbf {f}=(\operatorname {\mathrm {id}},S_g)$ , let $p\in {\mathbb N}$ be given by Proposition 3.2. Then, $(p,a-1)$ is an eventual period for $\mathbf {f}$ with respect to $\mathbf {(a,a')}$ and notice that $\Sigma =\{0,\ldots ,g-1\}^{{\mathbb N}_0}$ is such that ${\mathbb N}=A_\Sigma $ . For $i\geq a-1$ , let $X^i$ be the Markov chain of Definition 3.14, with transition matrix $M_i$ and initial distribution $\mu _i$ .

Let $w=10\cdots 0$ such that $|w|=p$ and clearly $g^i(w)_g\equiv g^i\ \mathrm {mod}\ a$ . If y is the base-g expansion of n (by adding $0$ s, we can suppose that y has length divisible by p), then $(y)_g\equiv 0\ \mathrm {mod}\ a$ and $S_g(y)\equiv 1\ \mathrm {mod}\ a'$ . Hence, for any $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ , there exists $k\in {\mathbb N}$ such that $(w^{b}y^{k})_g\equiv b\ \mathrm {mod}\ a$ and $S_g(w^{b}y^{k})_g\equiv b'\ \mathrm {mod}\ a'$ (where $z^j$ denotes the concatenation of $z j$ -times). Therefore,

(5.13) $$ \begin{align} \bigcup_{m\in{\mathbb N}}\{w\in \mathcal{D}^{mp}:\ g^i(w)_g\equiv b\ \mathrm{mod}\ a,\ S_g(w)\equiv b'\ \mathrm{mod}\ a'\}\neq \emptyset \end{align} $$

if and only if $(b,b')\in \langle g^i \rangle \times {\mathbb Z}_{a'}\subseteq {\mathbb Z}_a\times {\mathbb Z}_{a'}.$ Denoting $\delta _i:=\gcd (g^i,a)$ , it follows that $\sum _{m\in {\mathbb N}}M_i^m((b_0,b_1),(b_0',b_1'))>0$ if and only if $b_0\equiv b_0' \ \mathrm {mod}\ \delta _i$ . Thus, if the Markov chain $X^i$ starts at $X_0^i=(b,b')$ , that trajectory will only visit classes in $ (b+\langle \delta _i \rangle )\times {\mathbb Z}_{a'}\subseteq {\mathbb Z}_a\times {\mathbb Z}_{a'}.$ In this way, we can split $X^i$ into pieces depending on the starting point.

For each $j\in \{0,\ldots ,\delta _i-1\}$ , we define $\mathcal {S}(i,j):=j+\langle \delta _i \rangle $ and

$$ \begin{align*}\mu_{i,j}(b,b'):=\begin{cases} \dfrac{\mu_i(b,b')}{\bar{\mu}_{i,j}}& \text{if } b\equiv j\ \mathrm{mod}\ \delta_i, \\ 0& \text{otherwise,} \end{cases}\end{align*} $$

where $\mu _i$ is the initial distribution of $X^i$ and

$$ \begin{align*}\bar{\mu}_{i,j}:=\sum_{b'\in {\mathbb Z}_{a'}}\sum_{b\in \mathcal{S}(j)}\mu_i(b,b')=\dfrac{|w\in \{0,\ldots,g-1\}^i:\ (w)_g\equiv j\ \mathrm{mod}\ \delta_i|}{g^i}=\dfrac{1}{\delta_i}.\end{align*} $$

Let $X^{i,j}$ be a Markov chain on the state space $\mathcal {S}(i,j)$ , with initial distribution $\mu _{i,j}$ and transition matrix $M_i$ , both restricted to indexes of $\mathcal {S}(i,j)$ . The aperiodicity follows directly as $0\cdots 0$ is in the language of $\{0,\ldots ,g-1\}^{{\mathbb N}_0}$ , and $M_{i}$ restricted to $\mathcal {S}(i,j)$ is irreducible by (5.13). Therefore, the Markov chain $X^{i,j}$ converges to its invariant distribution given by $1/|\mathcal {S}(i,j)|=\delta _i/aa'.$ It is not difficult to see that

(5.14) $$ \begin{align} \mu_{i+np}=\sum_{j=0}^{\delta_i-1}\bar{\mu}_{i,j}(\mu_{i,j}M^n_i)=\dfrac{1}{\delta_i}\sum_{j=0}^{\delta_i-1}\mu_{i,j}M^n_i. \end{align} $$

From Theorem 2.1, there exist $C_{i,j}>0$ and $\rho _{i,j}\in (0,1)$ such that

(5.15) $$ \begin{align} \bigg|(\mu_{i,j}M_i^n)(b,b')-\dfrac{\delta_i}{aa'}\bigg|\leq C_{i,j}\rho_{i,j}^n \end{align} $$

for every $(b,b')\in \mathcal {S}(i,j).$ Clearly, $(\mu _{i,j}M_i^n)(b,b')=0$ if $(b,b')\notin \mathcal {S}(i,j)$ . Since ${\mathbb Z}_a\times {\mathbb Z}_{a'}=\bigsqcup _{j\in \{0,\ldots ,\delta _i-1\}}\mathcal {S}(i,j)$ , from (5.14) and (5.15), we can obtain that, for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}$ ,

(5.16) $$ \begin{align} \bigg|\mu_{i+np}(b,b')-\dfrac{1}{aa'}\bigg|\leq C_i\rho_i^n, \end{align} $$

where $ C_i:=\max _{j=0,\ldots ,\delta _i-1}C_{i,j}$ and $\rho _i:=\max _{j=0,\ldots ,\delta _i-1}\rho _{i,j}$ . Equivalently,

(5.17) $$ \begin{align} \bigg|\mathbb{P}(X^i_n=(b,b'))-\dfrac{1}{aa'}\bigg|\leq C_i\rho_i^n. \end{align} $$

Despite each $X^i$ being not irreducible, we still have convergence to the uniform measure $1/aa'$ . Note that (5.17) is equivalent to the estimation (4.3) in the case of $\Sigma $ being a full shift, and essentially, this is what is required to retrieve the results of §4 and, in particular, Theorem 4.9. Therefore, we can conclude that ${\mathbb N}$ is jointly uniformly distributed $\ \mathrm {mod}\ (a,a')$ by replicating the arguments of §4.

Remark 5.9. The obstruction when trying to use the previous idea in the context of missing digits sets lies in the fact that for some $i\in {\mathbb N}$ , the normalization factor $\bar {\mu }_{i,j}$ could be not the same for each Markov chain $X^{i,j}$ .

5.3 Forbidding combinations of digits

So far, we have focused on applying Theorem 4.9 in restricted digit sets, where restrictions come from forbidding some digits (missing digits sets). Given the flexibility in choosing digits and restrictions in the general case, it does not seem possible to establish general conditions like those in §5.1 within the context of general $\times g$ -invariant sets. In such a case, Theorem 4.9 is still a useful tool on a case-by-case basis. Seeking greater generality, we construct a class of sets with more flexible digit restrictions that exhibit joint uniform distribution. While we focus on restrictions of length 2, some of these ideas can be extended to longer lengths.

Let $g\geq 2$ be an integer and $a,a'\in {\mathbb N}$ . Let $\mathcal {D}\subseteq \{0,\ldots ,g-1\}$ be a set of digits and let T be a matrix on $\mathcal {D}$ such that $T(d,d')\in \{0,1\}$ for every $d,d'\in \mathcal {D}$ .

Definition 5.10. We say that the matrix T is k-regular if for every $d\in \mathcal {D}$ ,

$$ \begin{align*}\sum_{d'\in \mathcal{D}}M(d,d')=\sum_{d'\in \mathcal{D}}M(d',d)=k.\end{align*} $$

Also, we say that T is irreducible if for every $d,d'\in \mathcal {D}$ , there exists $n\in {\mathbb N}$ such that $M^n(d,d')>0$ .

As pointed out in §2.2, such a matrix T induces a shift of finite type

$$ \begin{align*}\Sigma_T:=\{x\in \mathcal{D}^{{\mathbb N}_0}:\ T(x_i,x_{i+1})=1 \text{ for all } i \in {\mathbb N}_0\}.\end{align*} $$

In fact, any 1-step subshift of finite type can be written in this form. Similarly, we can define the $\times g$ -invariant set of integers generated by the subshift $\Sigma _T$ as

$$ \begin{align*}A_T:=A_{\Sigma_T}=\bigg\{\sum_{i=0}^nd_ig^i:\ T(d_i,d_{i+1})=1 \text{ for all } i\in {\mathbb N}_0\bigg\}.\end{align*} $$

As discussed in Remark 3.15, for a 1-step SFT, we can apply Theorem 4.9 when the Markov chains $X^i$ (Definition 3.14) are constructed using the cover of Remark 2.7 instead of the Fischer cover. It is also straightforward that the graph of Remark 2.7 is regular and irreducible if the matrix T is regular and irreducible.

Theorem 5.11. Let $g\geq 2$ be an integer and $a,a'\in {\mathbb N}$ such that $\gcd (g,a)= \gcd (a,a')\,{=}\,1$ . Let $\mathcal {D}\subseteq \{0,\ldots ,g-1\}$ be a set of digits and T be a matrix over $\mathcal {D}$ to values in $\{0,1\}$ , and assume that T is k-regular (for $k\geq 2$ ) and irreducible. If there exist $d,d'\in \mathcal {D}$ such that $T(d,d)=T(d,d')=T(d',d)=1$ and $\gcd (d'-d,aa')=1$ , it follows that

$$ \begin{align*} \lim_{N\to\infty}\dfrac{|\{n\in A_T:\ n\equiv b\ \mathrm{mod}\ a,\ S_g(n)\equiv b'\ \mathrm{mod}\ a'\}\cap [0,N)|}{|A_T\cap [0,N)|} \end{align*} $$

for every $b\in {\mathbb Z}_a$ and $b'\in {\mathbb Z}_{a'}$ .

Proof. We will check the conditions to apply Theorem 4.9. Denote by $\Sigma \subseteq \mathcal {D}^{{\mathbb N}_0}$ the subshift of finite type associated to the matrix T. Since T is regular and irreducible, the cover $\mathcal {G}_T$ constructed in Remark 2.7 is regular and irreducible. Moreover, $\mathcal {G}_T$ is aperiodic, as there exist $d\in \mathcal {D}$ such that $T(d,d)$ (that is, there is a cycle of length $1$ in $\mathcal {G}_T$ ). Let $p=a'\phi (a(g-1))$ and notice that $(p,1)$ is an eventual period for $\mathbf {f}=(\operatorname {\mathrm {id}},S_g)$ with respect to $(a,a')$ . By considering the Markov chains $X^i$ of Definition 3.14 (with the consideration of Remark 3.15), the transition matrix $M_i$ of $X^i$ has state space $\mathcal {S}=({\mathbb Z}_a\times {\mathbb Z}_{a'})\times \mathcal {V}$ , where $\mathcal {V}=\{F(\tilde {d}):\ \tilde {d}\in \mathcal {D}\}.$

Since $T(d,d)=1$ , the word $x=d\cdots d\in \mathcal {D}^p$ satisfies $(w)_g\equiv 0\ \mathrm {mod}\ a$ and $S_g(w)\equiv 0\ \mathrm {mod}\ a'$ (Lemma 5.2). In addition, $F(d)\overset {x}{\to } F(d)$ as the last symbol of x is d. Thus, the state $(0,0,F(d))$ is aperiodic.

Let $(b_0,b_0',F_0),(b_1,b_1',F_1)\in \mathcal {S}$ . To show that $M_i$ is irreducible for every i, we have to find $n(i)\in {\mathbb N}$ such that

$$ \begin{align*}M^{n(i)}_i((b_0,b_0',F_0),(b_1,b_1',F_1))>0.\end{align*} $$

Let $d_0,d_1\in \mathcal {D}$ such that $F_0=F(d_0)$ and $F_1=F(d_1)$ . Since the cover $\mathcal {G}_T$ is aperiodic, there exists a path (of length divisible by p) from $F_0$ to $F(d)$ labelled by some word y. Similarly, there exists a path labelled by z (of length divisible by p) from $F(d)$ to $F_1$ .

Since $T(d,d)=T(d,d')=T(d',d)=1$ , the word $w=d'd\cdots d\in \mathcal {D}^p$ can be read in a path from $F(d)$ to $F(d)$ , $(w)_g\equiv d'-d\ \mathrm {mod}\ a$ and $S_g(w)\equiv d'-d\ \mathrm {mod}\ a'$ . Since $\gcd (d'-d,aa')=1$ and $\gcd (a,a')=1$ , $(d'-d,d'-d)$ generates ${\mathbb Z}_a\times {\mathbb Z}_{a'}$ , so we can find $m\in {\mathbb N}$ such that $m(d'-d)\equiv b_1-b_0-(y)_g-(z)_g\ \mathrm {mod}\ a$ and $m(d'-d)\equiv b_1'-b_0'-S_g(y)-S_g(z)\ \mathrm {mod}\ a'$ . Let $\tilde {w}\in \mathcal {L}(\Sigma )$ be the concatenation m-times of w. It holds that $F_0\overset {y\tilde {w}z}{\to } F_1$ , the length of $y\tilde {w}z$ is divisible by p, $(y\tilde {w}z)_g\equiv b_1-b_0\ \mathrm {mod}\ a$ and $S_g(y\tilde {w}z)\equiv b_1'-b_0'\ \mathrm {mod}\ a'$ . Thus, if $n(i)=|y\tilde {w}z|$ , $M_i^{n(i)}((b_0,b_0',F_0),(b_1,b_1',F_1))>0$ . Therefore, $M_i$ is irreducible and aperiodic for every $i\geq a-1$ , so the conclusion follows from Theorem 4.9.

Remark 5.12. Notice that the condition in the Theorem 5.11 about the existence of ${d,d'\in \mathcal {D}}$ such that $T(d,d)=T(d,d')=T(d',d)=1$ and $\gcd (d'-d,aa')=1$ can be easily relaxed. However, we state it in that way because it allows us to check the Markov condition in a simple way, providing a tool to generate many examples of sets with digit constraints of length 2 that are jointly uniformly distributed.

Example 5.13. Let $g=10$ and consider the set of integers

$$ \begin{align*}A:=\bigg\{\kern-2pt\sum_{j=0}^m w_i10^i:\ w_i\in\{0,\ldots,9\},\ w_{i+1}\in \{w_i-1,w_i,w_i+1\}\ \mathrm{mod}\ 10\bigg\}.\end{align*} $$

Notice that $A=A_T$ , where $T(d,d')=1$ if and only if $d'\in \{d-1,d,d+1\}\ \mathrm {mod}\ 10$ . Clearly, T is $3$ -regular and irreducible. Also, $T(0,0)=T(0,1)=T(1,0)=1$ .

Let $a,a'\in {\mathbb N}$ such that $\gcd (10,a)=\gcd (a,a')=1$ . From Theorem 5.11,

$$ \begin{align*}\lim_{N\to\infty}\dfrac{|\{n\in A_T:\ n\equiv b\ \mathrm{mod}\ a,\ S_{10}(n)\equiv b'\ \mathrm{mod}\ a'\}\cap [0,N)|}{|A_T\cap [0,N)|}=\dfrac{1}{aa'}\end{align*} $$

for every $(b,b')\in {\mathbb Z}_a\times {\mathbb Z}_{a'}.$

Example 5.14. Let $g=10$ and $\mathcal {D}=\{1,2,d,d'\}$ for any $d,d'\in \{0,3,4,\ldots ,9\}$ . Let T be a matrix indexed by $\mathcal {D}\times \mathcal {D}$ and defined by

$$ \begin{align*}T=\begin{pmatrix} 1&1 &0 &0 \\ 1&0 &1 &0 \\ 0&0 &1 &1 \\ 0&1 &0 &1 \\ \end{pmatrix}.\end{align*} $$

Since $T(1,1)=T(1,2)=T(2,1)$ , Theorem 5.11 gives that $A_T$ is jointly uniformly distributed $\ \mathrm {mod}\ (a,a')$ whenever $\gcd (10,a)=\gcd (a,a')=1$ . This set can be understood as all the integers which base-10 expansion can be read in paths of the graph of Figure 1.

Figure 1 Graph that represents the 2-regular and transitive shift of finite type associated to the matrix T in Example 5.14.

5.4 Example involving a sofic subshift

When $\Sigma $ is a sofic subshift, more general restriction can be placed, but at the same time, it is harder to give general conditions to ensure uniform distribution. We will provide a sofic shift $\Sigma $ , which is not of finite type, whose associated multiplicatively invariant set is uniformly distributed.

Example 5.15. Let $\mathcal {G}$ be the graph presented in Figure 2 and let $\Sigma $ be the sofic shift ${\Sigma :=\Sigma _{\mathcal {G}}}$ (recall Definition 2.5). We can see that

$$ \begin{align*}\Sigma=\{x\in \{0,1,2\}^{{\mathbb N}_0}:\ \text{there is an even number of zeros between two 1s, or two 2s}\},\end{align*} $$

and the cover $\mathcal {G}$ is the Fischer cover for $\Sigma $ .

Figure 2 Fischer cover of the sofic shift $\Sigma $ presented in Example 5.15.

Notice that the graph $\mathcal {G}$ is $2$ -regular and aperiodic, so that $\Sigma $ is a mixing, sofic and $2$ -regular subshift. For $g=3$ , we define the $\times 3$ -invariant set

$$ \begin{align*}A_\Sigma:=\bigg\{\kern-2pt\sum_{j=0}^md_j3^j:\ \text{between two consecutive 1s or 2s, there is an even number of 0s} \bigg\}.\end{align*} $$

Let $a,a'\in {\mathbb N}$ such that $\gcd (3,a)=\gcd (a,a')=1$ . We can find a period $p\in {\mathbb N}$ such that $g^p\equiv 1\ \mathrm {mod}\ a(g-1)$ . Without loss of generality, we can suppose p is even (otherwise, change p by $2p$ ). The aperiodicity of the matrix $M_i$ follows because $0\cdots 0\in \mathcal {L}^p(\Sigma )$ is a cycle. Similarly, the word $w=110\cdots 0\in \mathcal {L}^{p}(\Sigma )$ is a cycle in the graph $\mathcal {G}$ . Also, $(w)_3\equiv 4\ \mathrm {mod}\ a$ and $S_3(w)\equiv 2\ \mathrm {mod}\ a'$ . By concatenating w with itself, we can generate every state in $\langle 4\rangle \times \langle 2\rangle \subseteq {\mathbb Z}_a\times {\mathbb Z}_{a'}$ .

For instance, if $a=5$ and $a'=7$ , $\langle 4\rangle \times \langle 2\rangle ={\mathbb Z}_5\times {\mathbb Z}_{7}$ . Considering that the word w is read in a cycle of the Fischer cover, $((w)_3,S_3(w))$ is a generator for ${\mathbb Z}_5\times {\mathbb Z}_7$ and $\mathcal {G}$ is aperiodic, it is possible to see that $M_i$ is irreducible for every $i\in {\mathbb N}$ . Theorem 4.9 implies that

$$ \begin{align*}\lim_{N\to\infty}\dfrac{|\{n\in A_\Sigma:\ n\equiv b\ \mathrm{mod}\ 5,\ S_{3}(n)\equiv b'\ \mathrm{mod}\ 7\}\cap [0,N)|}{|A_\Sigma\cap [0,N)|}=\dfrac{1}{35}\end{align*} $$

for every $(b,b')\in {\mathbb Z}_5\times {\mathbb Z}_{7}.$

6 Transversality between multiplicatively invariant sets and arithmetic progressions

In this section, we provide a partial answer to the open question [Reference Glasscock, Moreira and Richter27, Question 5.6]. Recalling the notion of mass dimension provided in Definition 2.11, the question is stated as follows. Let $A\subseteq {\mathbb N}_0$ be a multiplicatively invariant set and P be an arithmetic progression. Is it true that $\dim _{\mathrm {{M}}}(A\cap P)$ is either zero or $\dim _{\mathrm {{M}}}(A)$ ?

Let A be $\times g$ -invariant and recall the existence of a subshift $\Sigma $ such that $A=A_\Sigma $ . If A satisfies the conditions of Theorem 4.9 with $f=\operatorname {\mathrm {id}}$ and $a\in {\mathbb N}$ (including the Markov condition), it is possible to see that $\dim _{\mathrm {{M}}}(A\cap (a{\mathbb N}+b))=\dim _{\mathrm {{M}}}(A)$ for every $b\in {\mathbb N}$ . Therefore, this provides a positive answer to the open question in those cases. As the notion of dimension is less sensitive to rough estimations than the relative density, we will modify the construction presented in §3 to address this question for every $A=A_\Sigma $ when $\Sigma $ is any transitive sofic subshift.

6.1 Counterexample for general cases

We will show that the answer is negative if we only suppose that the subshift $\Sigma $ is only transitive or only sofic.

Let $g=a>4$ , and let $\mathcal {D}=\{d_0,d_1\}$ and $\mathcal {D}'=\{d_2,d_3,d_4\}$ be disjoint subsets of $\{0,\ldots ,g-1\}$ . We define the subshift $\Sigma =\mathcal {D}^{{\mathbb N}_0}\cup \mathcal {D}^{\prime {\mathbb N}_0}$ . Notice that $\Sigma $ is a sofic subshift (in fact, it is an SFT). From Proposition 2.13, it is easy to see that $\dim _{\mathrm {{M}}}(A_\Sigma )=\log (3)/\log (g).$ Since $a=g$ , $n\in A_\Sigma \cap (a{\mathbb N}+d_0)$ if and only if $d_0$ is the least significant digit of n in base g, so we can conclude that

$$ \begin{align*}0<\dim_{\mathrm{{M}}}(A_\Sigma\cap (a{\mathbb N}+d_0))=\log(2)/\log(g)<\dim_{\mathrm{{M}}}(A_\Sigma).\end{align*} $$

More generally, other examples can be constructed even when $\gcd (g,a)=1$ . For this, we can use the same idea of considering a disjoint set of digits with different size and choose the elements to apply condition (5.5) of Corollary 5.5. This concludes that the sofic condition by itself is not enough to provide a positive answer to the open question. Now, we will see that assuming only transitivity is not enough either.

Proposition 6.1. For any integer $g\geq 3$ , there exists a transitive subshift $\Sigma $ and an arithmetic progression P such that $0<\dim _{\mathrm {{M}}}(A_\Sigma \cap P)<\dim _{\mathrm {{M}}}(A_\Sigma ).$

Proof. Let us choose a set of digits $\mathcal {D}\subsetneq \{0,\ldots ,g-1\}$ with at least two elements, fixing some digits $h\notin \mathcal {D}$ and $d\in \mathcal {D}$ . For every $k\in {\mathbb N}_0$ , we define the set of words

$$ \begin{align*}W_{k}:=\{hd^kz:\ z\in \mathcal{D}^k \}\subseteq \mathcal{L}(\{0,\ldots,g-1\}^{{\mathbb N}_0}),\end{align*} $$

where $d^k:=d\cdots d$ is the concatenation k times of d. The length of any word in $W_k$ is $2k+1$ and $|W_k|=|\mathcal {D}|^k.$ Giving an enumeration to the $|\mathcal {D}|^k$ words of $W_k$ , we can write

$$ \begin{align*}W_k=\{w_k^j: \ j=0,\ldots, |\mathcal{D}|^k-1 \}.\end{align*} $$

By concatenating all the words in the sets $W_k$ , we define the infinite sequence

$$ \begin{align*}w:=(w_0^0)(w_1^0w_1^1\cdots w_1^{|\mathcal{D}|-1})\cdots(w_k^0\cdots w_k^{|\mathcal{D}|^{k}-1})\cdots,\end{align*} $$

and we refer to the subword $w_k^0\cdots w_k^{|\mathcal {D}|^{k}-1}$ as the block induced by $W_k$ . Considering the full shift $ (\{0,\ldots ,g-1\}^{\mathbb {N}_0},\sigma ),$ we can define the transitive subshift

$$ \begin{align*}\Sigma=\overline{\mathrm{Orb}_\sigma (w)}:=\overline{\{\sigma^n(w):\ n\in {\mathbb N}_0\}}.\end{align*} $$

Also, it is straightforward that

$$ \begin{align*}\mathcal{L}(\Sigma)=\{x=x_0\cdots x_m:\ m\in {\mathbb N}_0,\ x \text{ appears in the sequence } w\}.\end{align*} $$

We claim that $\dim _{\mathrm {{M}}}(A_\Sigma )=\log (|\mathcal {D}|)/\log (g).$ To show it, notice that $\mathcal {C}_{g,\mathcal {D}}\subseteq A_\Sigma $ as $\mathcal {D}^{{\mathbb N}_0} \subseteq \Sigma $ . Thus, Corollary 2.14 implies that

(6.1) $$ \begin{align} \dim_{\mathrm{{M}}}(A_\Sigma)\geq \dim_{\mathrm{{M}}}(\mathcal{C}_{g,\mathcal{D}})=\log(|\mathcal{D}|)/\!\log(g). \end{align} $$

For the other direction, we aim to estimate the number of elements in $A_\Sigma $ whose base-g expansion has length at most $i \in {\mathbb N}$ . After the block $W_i$ , no new words of length at most i appear in the sequence w. Therefore, any $n \in A_\Sigma \cap [0, g^i)$ can be generated by a subword with length at most i of the sequence

$$ \begin{align*}w(i):=w_0^0w_1^0\cdots w_1^{|\mathcal{D}|-1} \cdots w_i^0\cdots w_i^{|\mathcal{D}|^i-1}.\end{align*} $$

In $w(i)$ , there are $|w(i)|-(i-1)$ possible starting symbols for words of length i, so there are at most $|w(i)|-(i-1)$ words of length i. A quick estimation leads to

$$ \begin{align*}|w(i)|=\sum_{k=0}^{i}(2k+1)|\mathcal{D}|^k\leq (i+1)(2i+1)|\mathcal{D}|^i.\end{align*} $$

Therefore, $i(i+1)(2i+1)|\mathcal {D}|^i$ gives a rough estimation for the number of words of length at most i that can be read in $w(i)$ . Then,

$$ \begin{align*}\dfrac{\log(|A_\Sigma \cap [0,g^i)|)}{i\log(g) } \leq \dfrac{\log(i(i+1)(2i+1))+i\log|\mathcal{D}|}{i\log(g)}.\end{align*} $$

Taking $i\to \infty $ and using Lemma 2.15, $\log (|\mathcal {D}|)/\!\log (g)\leq \dim _{\mathrm {{M}}}(A_\Sigma ).$ This concludes that

$$ \begin{align*}\dim_{\mathrm{{M}}}(A_\Sigma)=\log(|\mathcal{D}|)/\!\log(g).\end{align*} $$

Let $P:=g{\mathbb N}+h$ be an arithmetic progression. Notice that $n\in A_\Sigma \cap P$ if and only if $n\in A_\Sigma $ and the least significant digit of n in base g is h. Thus, let us define $\Sigma (h):=\{v\in \mathcal {L}(\Sigma ):\ v_0=h\}, A(h):=\{(v)_g:\ v\in \Sigma (h)\}\subseteq A_\Sigma $ and $r=g^2$ . Notice that for any $i\in {\mathbb N}$ and $z\in \mathcal {D}^{i-1}$ , $(hy^{i-1}z)_g\in A(h)\cap [0,r^i)$ . Then, $|\mathcal {D}|^{i-1}\leq |A(h)\cap [0,r^i)|.$

However, after the appearance of the word $w^0_{2i-1}$ in the sequence w, the only word of length $2i$ that starts with h and can be read is $hy^{2i-1}$ . For $j<i$ , there are $|\mathcal {D}|^{j}$ appearances of h in the block j of w, and each occurrence can be associated with one $2i$ -long word. In the block $(w_i^0\cdots w_i^{|\mathcal {D}|^i-1})$ , every word of length $2i$ starting with h is given by $hy^iz$ for some $z\in \mathcal {D}^{i-1}$ , and hence, there are $|\mathcal {D}|^{i-1}$ of those words in $W_i$ . More generally, for every $j\geq i$ , every word of length $2i$ starting with h in the block $W_j$ has the form $hy^jz$ , where $z\in \mathcal {D}^{2i-j-1}$ , so there are $|\mathcal {D}|^{2i-j-1}$ of such words in $W_j$ . Using these estimates,

$$ \begin{align*}|\{w\in \Sigma(h):\ |w|=2i\}|\leq \sum_{j=0}^{i-1}|\mathcal{D}|^j+\sum_{j=i}^{2i-1}|\mathcal{D}|^{2i-j-1}\leq 2i|\mathcal{D}|^{i-1}.\end{align*} $$

Using the same estimate for words of length less than $2i$ , it follows that

$$ \begin{align*}|A(h)\cap [0,r^i)|\leq (2i)^2|\mathcal{D}|^{i-1}.\end{align*} $$

Hence,

$$ \begin{align*}|\mathcal{D}|^{i-1}\leq |A(h)\cap [0,r^i)|\leq (2i)^2|\mathcal{D}|^{i-1}.\end{align*} $$

It follows that

$$ \begin{align*}\dfrac{i-1}{2i}\dfrac{\log(|\mathcal{D}|)}{\log(g)}\leq \dfrac{\log (|A(h)\cap [0,r^i)|)}{2i\log(g)}\leq \dfrac{2\log(2i)+i\log(|\mathcal{D}|)}{2i\log(g)},\end{align*} $$

and invoking Lemma 2.15, we conclude

(6.2) $$ \begin{align} \dim_{\mathrm{{M}}}(A(h))=\dfrac{1}{2}\dfrac{\log(|\mathcal{D}|)}{\log(g)}. \end{align} $$

Since the arithmetic progression $P=g{\mathbb N}+h$ satisfies $P\cap A_\Sigma =A(h)$ , from (6.2), it follows that

$$ \begin{align*} \dim_{\mathrm{{M}}}(A_\Sigma\cap P)=\dfrac{\dim_{\mathrm{{M}}}(A_\Sigma)}{2}.\\[-40pt] \end{align*} $$

Notice that for every rational $\alpha \in (0,1)$ , it is possible to modify the construction of the sets $W_j$ to construct a transitive subshift $\Sigma $ such that $\dim _{\mathrm {{M}}}(A_\Sigma \cap P)=\alpha \dim _{\mathrm {{M}}}(A_\Sigma )>0$ .

6.2 Positive answer for transitive sofic subshifts

In this section, we will prove that the question [Reference Glasscock, Moreira and Richter27, Question 5.6] has a positive answer when the multiplicatively invariant set can be represented by a subshift that is transitive and sofic.

Remark 6.2. For the rest of this section, consider an integer $g\geq 2$ and $a\in {\mathbb N}$ . Let $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ be a transitive and sofic subshift, where $\mathcal {G}=(\mathcal {V},\mathcal {E},\unicode{x3bb} )$ is the Fischer cover of $\Sigma $ . Let $p\in {\mathbb N}$ be as given by Proposition 3.2, so that $(p,a-1)$ forms an eventual period for the function $\mathbf {f}=\operatorname {\mathrm {id}}$ with respect to a.

We use the sets $E_i$ from Definition 3.4 to define a non-normalized version of the matrix M and the measure $\mu $ introduced in §3.

Definition 6.3. For any $i\in {\mathbb N}$ , $b,b'\in {\mathbb Z}_a$ and $F,F'\in \mathcal {V}$ , we define

$$ \begin{align*}\mathcal{M}_{i}((b,F),(b',F'))=|E_{i}(b'-b,F,F')|\end{align*} $$

and

$$ \begin{align*}\nu_{i}(b,F)=|\{w\in \mathcal{L}^{i}(\Sigma):\ (w)_g\equiv b\ \mathrm{mod}\ a,\ F(w)=F\}|.\end{align*} $$

In a straightforward way, we can rewrite Proposition 3.13 in terms of $\mathcal {M}_i$ and $\nu _i$ .

Corollary 6.4. If $i\geq a-1$ and $n\in {\mathbb N}$ ,

$$ \begin{align*}\mathcal{M}_i^n((b_0,F_0),(b_1,F_1))=|\{w\in \mathcal{L}^{np}(\Sigma):\ g^{i}(w)_g\equiv b'-b \ \mathrm{mod}\ a \text{ and } F\overset{w}{\to}F'\}|\end{align*} $$

for any $b,b'\in {\mathbb Z}_a$ and $F,F'\in \mathcal {V}$ . Also, $\nu _{i+np}=\nu _{i}\mathcal {M}_i^n.$

The main idea can be summarized as follows. First, we want to find a word $w\in \mathcal {L}(\Sigma )$ such that $i:=|w|\geq a-1$ , $(w)_g\equiv b\ \mathrm {mod}\ a$ and $F(w)\in \mathcal {V}$ . By studying the extensions of w to words of length $i+pn$ for some $n\in {\mathbb N}$ , we will see that a significant number of these extensions $\tilde {w}$ satisfy $(\tilde {w})_g\equiv b\ \mathrm {mod}\ a$ . As a conclusion, we aim to show $\dim _{\mathrm {{M}}}(A_\Sigma \cap (a{\mathbb N}+b))=\dim _{\mathrm {{M}}}(A_\Sigma )$ . If such a word w does not exist, then the intersection will be finite (hence, zero-dimensional).

For a given word w, it is easy to compute $(w)_g \ \mathrm {mod}\ a$ ; however, deciding whether $F(w)\in \mathcal {V}$ or not could be challenging if we do not know the Fischer cover explicitly. The following lemma shows that, for our purposes, such a check is not required.

Lemma 6.5. Let $w\in \mathcal {L}(\Sigma )$ such that $|w|\geq a-1$ and $F(w)\notin \mathcal {V}$ . Then, there exists an extension $\tilde {w}$ of w such that $(w)_g\equiv (\tilde {w})_g\ \mathrm {mod}\ a$ , $F(\tilde {w})\in \mathcal {V}$ and $|\tilde {w}|=|w|+pn$ for some $n\in {\mathbb N}$ .

Proof. Since $\Sigma $ is transitive and sofic, there exists a synchronizing word $y\in \mathcal {L}(\Sigma )$ and also there exists $x\in \mathcal {L}(\Sigma )$ such that $wxy\in \mathcal {L}(\Sigma )$ . Since y is synchronizing, any extension of y is also synchronizing. Thus, we can suppose $|xy|=mp$ for some $m\in {\mathbb N}$ (otherwise, we can extend y to meet that condition). Since y is synchronizing, the follower set of any word that ends with the subword y is equal to $F(y)$ . In particular, $F:=F(wxy)=F(xy)=F(y)\in \mathcal {V}.$ Furthermore, every path in $\mathcal {G}$ labelled by $xy$ has F as terminal node and we can find a path $\pi $ labelled by $xy$ starting at some $F'\in \mathcal {V}$ . As $\mathcal {G}$ is an irreducible graph, there is a path from F to $F'$ , labelled by some $z\in \mathcal {L}(\Sigma ).$ For any $k\in {\mathbb N}$ , denote

$$ \begin{align*}(xyz)^k=\underbrace{(xyz)\cdots (xyz)}_{k \text{ times}}\in \mathcal{L}(\Sigma).\end{align*} $$

Let $\tilde {w}=w(xyz)^{ap}$ and $\ell :=|xyz|$ . Using that $g^{p+j}\equiv g^p\ \mathrm {mod}\ a$ for all $j\geq a-1$ ,

$$ \begin{align*}(\tilde{w})_g & =(w)_g+g^{|w|}(xyz)^p+\cdots+g^{|w|+(a-1)p\ell}(xyz)^p\\ & =(w)_g+ag^{|w|}(xyz)^p\equiv (w)_g\ \mathrm{mod}\ a.\end{align*} $$

As the path associated to z ends at $F'$ , it follows that $F(\tilde {w})=F'\in \mathcal {V}$ . Also, notice that $|\tilde {w}|=|w|+\ell a p$ .

We now establish a sufficient condition to ensure that extensions of a certain word w will visit certain congruence classes and follower sets.

Lemma 6.6. Let $w\in \mathcal {L}(\Sigma )$ such that $|w|\geq a-1$ , $(w)_g\equiv b\ \mathrm {mod}\ a$ and $F(w)\in \mathcal {V}$ . If for some $(b',F')\in {\mathbb Z}_a\times \mathcal {V}$ and $n\in {\mathbb N}$ , there exists $\tilde {w}\in \mathcal {L}(\Sigma )$ such that $(\tilde {w})_g\equiv b'\ \mathrm {mod}\ a$ , $F(\tilde {w})=F'$ and $|\tilde {w}|=|w| +mp$ for some $m\in {\mathbb N}$ .

Proof. As $\mathcal {M}^n_{|w|}((b',F'),(b,F(w)))>0$ , Corollary 6.4 provides the existence of a word y with length $np$ such that $g^{|w|}(y)_g\equiv b-b'\ \mathrm {mod}\ a$ and $ F'\overset {y}{\to }F(w).$ Equivalently, we can find a path $\pi _1$ in $\mathcal {G}$ with length $np$ , labelled by y and from $F'$ to $F(w)$ . Since the Fischer cover is irreducible, there is a path $\pi _2$ from $F(w)$ to $F'$ ; thus, the path $\tilde {\pi }:=(\pi _2\pi _1)^{p-1}\pi _2$ goes from $F(w)$ to $F'$ and $|\tilde {\pi }|=p|\pi _2|+(p-1)|\pi _1|$ is divisible by p. If $\tilde {\pi }$ is labelled by some $x\in \mathcal {L}(\Sigma )$ , we can define $\tilde {w}:=w(xy)^{a-1}x\in \mathcal {L}(\Sigma )$ . Since the terminal node for $\tilde {\pi }$ is $F'$ , $F(\tilde {w})=F'$ . As $|x|$ and $|y|$ are divisible by p, it follows that $|\tilde {w}|=|w|\ \mathrm {mod}\ p$ and the periodicity implies

$$ \begin{align*} (\tilde{w})_g & \equiv (w)_g+(a-1)g^{|w|}(x)_g+(a-1)g^{|w|}(y)_g+g^{|w|}(x)_g\\ & \equiv b+(a-1)g^{|w|}(y)_g\ \mathrm{mod}\ a.\end{align*} $$

Since $g^{|w|}(y)_g\equiv b-b'$ , it follows that $(\tilde {w})_g\equiv b+(a-1)(b-b')\equiv b'\ \mathrm {mod}\ a.$

By combining Lemmas 6.5, 6.6 and ideas of previous sections, we can show a more general version of Theorem C.

Theorem 6.7. Let $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ be a transitive sofic subshift and $a\in {\mathbb N}$ . If there exists $w\in \mathcal {L}(\Sigma )$ such that $|w|\geq a-1$ and $(w)_g\equiv b\ \mathrm {mod}\ a$ , then

(6.3) $$ \begin{align} \dim_{\mathrm{{M}}}(A_\Sigma\cap (a{\mathbb N}+b))=\dim_{\mathrm{{M}}}(A_\Sigma). \end{align} $$

In particular, either (6.3) holds or $|A_\Sigma \cap (a{\mathbb N}+b)|\leq g^a$ .

Proof. Consider $p\in {\mathbb N}$ given by Proposition 3.2. From Lemma 6.5, we can suppose $F(w)\in \mathcal {V}$ (otherwise, use $\tilde {w}$ instead) and define $i:=|w|\geq a-1$ . In particular, $(p,i)$ is an eventual period. Consider the set

$$ \begin{align*}\mathcal{R}:=\{(b',F')\in {\mathbb Z}_a\times \mathcal{V}: \text{ there exists } n\in {\mathbb N} \text{ such that } \mathcal{M}^n_i((b',F'),(b,F))>0\ \}.\end{align*} $$

From Lemma 6.6, for each $(b',F')\in \mathcal {R}$ , there is $m'\in {\mathbb N}$ such that $\nu _{i+m'p}(b',F')\neq 0$ .

In particular, we can obtain some $m\in {\mathbb N}$ large enough such that

(6.4) $$ \begin{align} \sum_{j=0}^{m}\nu_{i+jp}(b',F')\neq 0 \end{align} $$

for every $(b',F')\in \mathcal {R}$ . Let $n\in {\mathbb N}$ and $(b,F)\in {\mathbb Z}_a\times \mathcal {V}$ . Using Corollary 6.4,

$$ \begin{align*} \sum_{j=0}^m\nu_{i+(j+n)p}(b,F)&=\sum_{j=0}^m \nu_{i+jp}\mathcal{M}^n_i(\cdot, (b,F))\\ &=\sum_{j=0}^m\sum_{b'\in {\mathbb Z}_a,F'\in \mathcal{V}}\nu_{i+jp}(b',F')\mathcal{M}_i^n((b',F'),(b,F))\\ &= \sum_{b'\in {\mathbb Z}_a,F'\in \mathcal{V}}\bigg(\sum_{j=0}^m\nu_{i+jp}(b',F')\bigg)\mathcal{M}_i^n((b',F'),(b,F))\\ &\geq \sum_{b'\in {\mathbb Z}_a,F'\in \mathcal{V}} \mathcal{M}_i^n((b',F'),(b,F)), \end{align*} $$

where the last inequality follows from the definition of $\mathcal {R}$ and (6.4). Combining the previous inequality, Proposition 3.6 and the characterization of Corollary 6.4, we can conclude

(6.5) $$ \begin{align} \sum_{j=0}^m\nu_{i+(j+n)p}(b,F) \geq |\{\pi=(\pi_0\cdots \pi_{np-1}):\ \pi \text{ is a path of } \mathcal{G} \text{ and } t(\pi)=F\}|. \end{align} $$

Since $\mathcal {G}$ is an irreducible graph, for each $F'\in \mathcal {V}$ , there exists $\ell (F')\in {\mathbb N}$ such that there is a path of length $\ell (F')$ from $F'$ to F. Thus, defining $\ell :=\max _{F'\in \mathcal {V}}\ell (F'),$ for every n large enough,

(6.6) $$ \begin{align} &|\{\pi=(\pi_0\cdots \pi_{np-1}):\ \pi \text{ is a path of } \mathcal{G} \text{ and } t(\pi)=F\}\nonumber\\ & \quad \geq \sum_{F'\in \mathcal{V}}|\{\pi=(\pi_0\cdots \pi_{np-1-\ell(F')}):\ \pi \text{ is a path of } \mathcal{G} \text{ and } t(\pi)=F'\}|\nonumber\\ & \quad \geq \sum_{F'\in \mathcal{V}}|\{\pi=(\pi_0\cdots \pi_{np-1-\ell}):\ \pi \text{ is a path of } \mathcal{G} \text{ and } t(\pi)=F'\}|\nonumber\\ & \quad =|\{\pi=(\pi_0\cdots \pi_{np-1-\ell}):\ \pi \text{ is a path of } \mathcal{G}\}|. \end{align} $$

Since $\mathcal {G}$ is a cover for $\Sigma $ , for every $x\in \mathcal {L}^{np-1-\ell }(\Sigma )$ , there exists at least one path in $\mathcal {G}$ labelled by x. From this idea, (6.5) and (6.6), it follows that

(6.7) $$ \begin{align} \sum_{j=0}^m\nu_{i+(j+n)p}(b,F) \geq |\mathcal{L}^{np-\ell-1}(\Sigma)|. \end{align} $$

However, by definition of $\nu _{i+(j+n)p}$ ,

(6.8) $$ \begin{align} \sum_{j=0}^m\nu_{i+(j+n)p}(b,F)\leq \bigg|\bigg\{w\in \bigcup_{j=0}^{m}\mathcal{L}^{i+(j+n)p}(\Sigma):(w)_g\equiv b\ \mathrm{mod}\ a\bigg\}\bigg|. \end{align} $$

Since two words of different length can represent the same integer, the right-hand side of (6.8) contains at most $m+1$ representations for each integer, then

$$ \begin{align*} \bigg|\kern-1pt\bigg\{\kern-1pt w\in \bigcup_{j=0}^{m}\mathcal{L}^{i+(j+n)p}(\Sigma):(w)_g\equiv b\ \mathrm{mod}\ a\bigg\}\bigg|\kern1.4pt{\leq}\kern1.4pt (m+1)|A_\Sigma\cap (a{\mathbb N}+b)\kern1.4pt{\cap}\kern1.4pt [0,g^{i+(m+n)p})|. \end{align*} $$

Combining this estimation with (6.7) and (6.8), it follows that

$$ \begin{align*} \dfrac{1}{m+1}|\mathcal{L}^{np-\ell-1}(\Sigma)|\leq |A_\Sigma\cap (a{\mathbb N}+b)\cap [0,g^{i+(m+n)p})|. \end{align*} $$

Taking $\log (\cdot )$ and rearranging terms,

$$ \begin{align*} &\dfrac{np-\ell-1}{(i+mp+np)\log(g)}\dfrac{\log (|\mathcal{L}^{np-\ell-1}(\Sigma)|)}{np-\ell-1}-\dfrac{\log(m+1)}{(i+mp+np)\log(g)}\\ & \quad \leq \dfrac{\log( |A_\Sigma\cap (a{\mathbb N}+b)\cap [0,g^{i+(m+n)p})| )}{(i+mp+np)\log(g)}. \end{align*} $$

Taking $\liminf $ , we conclude that

$$ \begin{align*} h(\Sigma)/\log(g)\leq \liminf_{n\to \infty}\dfrac{\log(| A_\Sigma\cap (a{\mathbb N}+b)\cap [0,g^{i+mp+np})|)}{(i+mp+np)\log(g)},\end{align*} $$

where $h(\Sigma )$ is the topological entropy of $\Sigma $ . Since $A_\Sigma \cap (a{\mathbb N}+b)\subseteq A_\Sigma $ and recalling that $\dim _{\mathrm {{M}}}(A_\Sigma )=h(\Sigma )/\!\log (g)$ , we can obtain

$$ \begin{align*}\limsup_{n\to \infty}\dfrac{\log(| A_\Sigma\cap (a{\mathbb N}+b)\cap [0,g^{i+mp+np})|)}{(i+mp+np)\log(g)}\leq h(\Sigma)/\!\log(g). \end{align*} $$

Therefore,

$$ \begin{align*}\lim_{n\to \infty}\dfrac{\log(| A_\Sigma\cap (a{\mathbb N}+b)\cap [0,g^{i+mp+np})|)}{(i+mp+np)\log(g)}=h(\Sigma)/\!\log(g).\end{align*} $$

From Lemma 2.15 (in particular, we use a slight variant of this lemma that follows directly from the proof of [Reference Glasscock, Moreira and Richter27, Lemma 3.2]),

$$ \begin{align*}\dim_{\mathrm{{M}}}(A_\Sigma\cap (a{\mathbb N}+b))=h(\Sigma)/\!\log(g).\end{align*} $$

Finally, if there is no word $w\in \mathcal {L}(\Sigma )$ such that $|w|\geq a-1$ and $(w)_g\equiv b\ \mathrm {mod}\ a$ , $A_\Sigma \cap (a{\mathbb N}+b)\cap [g^{a},\infty )=\emptyset $ . Consequently, $|A_\Sigma \cap (a{\mathbb N}+b)|\leq g^a$ and thus,

$$ \begin{align*}\dim_{\mathrm{{M}}}(A_\Sigma\cap (a{\mathbb N}+b))=0.\\[-38pt] \end{align*} $$

From the discussion in §6.1 and Theorem 6.7, the conclusion is that the Open question 1.5 is affirmative if the multiplicatively invariant set can be represented by a transitive sofic shift. However, this is not necessarily true if the shift is merely transitive or sofic.

Nevertheless, we can extend the positive answer beyond transitive sofic subshifts.

Definition 6.8. Let $S\subseteq {\mathbb N}_0$ . We define the S-gap subshift as

$$ \begin{align*}X_S:=\{x\in \{0,1\}^{{\mathbb N}_0}:\ \text{ the number of 0s between two consecutive 1s is in } S \}.\end{align*} $$

For $S\subseteq {\mathbb N}_0$ , we denote $A_S:=A_{\Sigma _S}$ .

Proposition 6.9. Let $S\subseteq {\mathbb N}_0$ . For any arithmetic progression P, $\dim _{\mathrm {{M}}}(A_{S}\cap P)$ is either $\dim _{\mathrm {{M}}}(A_{S})$ or zero.

Proof. If $|S|<\infty $ , the result follows from Theorem 6.7 as $\Sigma _S$ is transitive and sofic. Let us suppose $|S|=\infty $ . Consider $s_n$ as the nth element of S in increasing order and define $S_n:=\{s_1,\ldots ,s_n\}$ . The subshift $X_{S_n}$ is a transitive and sofic shift for every $n\in {\mathbb N}$ , and notice that $\mathcal {L}^n(X_{S_n})=\mathcal {L}^n(X_S)$ . Consequently, it is not difficult to see that

(6.9) $$ \begin{align} h(X_S)=\sup_{n\in{\mathbb N}} h(X_{S_n}). \end{align} $$

Suppose that there exists $w\in \mathcal {L}(X_S)$ such that $|w|\geq a-1$ and $(w)_g\equiv b \ \mathrm {mod}\ a$ . Then, there exists $n_0\in {\mathbb N}$ such that $w\in \mathcal {L}(X_{S_n})$ for every $n\geq n_0$ . Since $X_{S_n}$ is sofic and transitive, we can apply Theorem 6.7 to obtain that

(6.10) $$ \begin{align} \dim_{\mathrm{{M}}}(A_{S_n}\cap (a{\mathbb N}+b))=\dim_{\mathrm{{M}}}(A_{S_n})=h(X_{S_n})/\!\log(g). \end{align} $$

However,

(6.11) $$ \begin{align} h(X_S)/\!\log(g)=\dim_{\mathrm{{M}}}(A_{S})\geq\dim_{\mathrm{{M}}}(A_{S}\cap (a{\mathbb N}+b))\geq \dim_{\mathrm{{M}}}(A_{S_n}\cap (a{\mathbb N}+b)). \end{align} $$

From (6.10) and (6.11),

$$ \begin{align*}h(X_{S_n})/\!\log(g)\leq\dim_{\mathrm{{M}}}( A_{S}\cap (a{\mathbb N}+b))\leq h(X_S)/\!\log(g).\end{align*} $$

The conclusion follows from (6.9).

If S is the set of prime numbers, it is easy to see that $X_S$ is transitive but not sofic. Moreover, note that the property can be extended to subshifts that can be approximated (in terms of entropy) from within by transitive sofic subshifts. In particular, the class of transitive sofic subshifts is not optimal to provide an affirmative answer.

One possible refinement is to look at subshifts with a unique measure of maximal entropy (which includes all transitive sofic subshifts [Reference Weiss52]). However, it is not difficult to see that the subshift constructed in Proposition 6.1 also has a unique measure of maximal entropy. Thus, this class is not sufficient to settle the question either. Seeking a general answer to the open question, we will consider the following class.

Definition 6.10. A subshift $\Sigma $ is said to be entropy minimal if for every subshift $\Sigma '\subsetneq \Sigma $ , $h(\Sigma )>h(\Sigma ').$

The classes of transitive sofic subshifts and S-gap subshifts are examples of entropy minimal subshifts (see [Reference Climenhaga and Thompson10, Remark 2.4] and [Reference García-Ramos and Pavlov24]). However, the counterexample provided in Proposition 6.1 is not entropy minimal. Based on the techniques used in this paper, we think that it should be possible to extend the affirmative answer to the open question to subshifts having left almost specification with bounded function (see [Reference Climenhaga and Pavlov9, Definition 2.14]), which is a subclass of the entropy minimal subshifts. More generally, we propose the following conjecture.

Conjecture 6.11. Let $A\subseteq {\mathbb N}_0$ be a $\times g$ -invariant set. There exists an entropy minimal subshift $\Sigma \subseteq \{0,\ldots ,g-1\}^{{\mathbb N}_0}$ such that $A=A_\Sigma $ if and only if, for every arithmetic progression P, it holds that $\dim _{\mathrm {{M}}}(A\cap P)$ is either 0 or $\dim _{\mathrm {{M}}}(A)$ .

Acknowledgements

The author thanks his advisor, Joel Moreira, for introducing him to the problem, and for his continuous support and guidance throughout this project. The author also expresses gratitude to Vaughn Climenhaga for providing useful references and to the anonymous referee for their valuable feedback and comments.

References

Akiyama, S. and Pethő, A.. On canonical number systems. Theor. Comput. Sci. 270(1–2) (2002), 921933.10.1016/S0304-3975(01)00103-7CrossRefGoogle Scholar
Aloui, K.. Sur les entiers ellipséphiques: somme des chiffres et répartition dans les classes de congruence. Period. Math. Hungar. 70(2) (2015), 171208.10.1007/s10998-014-0066-8CrossRefGoogle Scholar
Aloui, K., Mauduit, C. and Mkaouar, M.. Somme des chiffres et répartition dans les classes de congruence pour les palindromes ellipséphiques. Acta Math. Hungar. 151(2) (2017), 409455.10.1007/s10474-017-0688-4CrossRefGoogle Scholar
Austin, T.. A new dynamical proof of the Shmerkin–Wu theorem. J. Mod. Dyn. 18 (2022), 111.10.3934/jmd.2022001CrossRefGoogle Scholar
Banks, W. D., Conflitti, A. and Shparlinski, I. E.. Character sums over integers with restricted $g$ -ary digits. Illinois J. Math. 46(3) (2002), 819836.10.1215/ijm/1258130986CrossRefGoogle Scholar
Banks, W. D. and Shparlinski, I. E.. Arithmetic properties of numbers with restricted digits. Acta Arith. 112(4) (2004), 313332.10.4064/aa112-4-1CrossRefGoogle Scholar
Bellman, R. and Shapiro, H. N.. On a problem in additive number theory. Ann. of Math. (2) 2(49) (1948), 333340.10.2307/1969281CrossRefGoogle Scholar
Bésineau, J.. Indépendance statistique d’ensembles liés à la fonction “somme des chiffres”. Acta Arith. 20 (1972), 401416.10.4064/aa-20-4-401-416CrossRefGoogle Scholar
Climenhaga, V. and Pavlov, R.. One-sided almost specification and intrinsic ergodicity. Ergod. Th. & Dynam. Sys. 39(9) (2019), 24562480.10.1017/etds.2017.135CrossRefGoogle Scholar
Climenhaga, V. and Thompson, D. J.. Beyond Bowen’s specification property. Thermodynamic Formalism (Lecture Notes in Mathematics, 2290). Ed. M. Pollicott and S. Vaienti. Springer, Cham, 2021, pp. 382.10.1007/978-3-030-74863-0_1CrossRefGoogle Scholar
Col, S.. Diviseurs des nombres ellipséphiques. Period. Math. Hungar. 58(1) (2009), 123.10.1007/s10998-009-9001-9CrossRefGoogle Scholar
Dartyge, C. and Mauduit, C.. Nombres presque premiers dont l’écriture en base $r$ ne comporte pas certains chiffres. J. Number Theory 81(2) (2000), 270291.10.1006/jnth.1999.2458CrossRefGoogle Scholar
Dartyge, C. and Mauduit, C.. Ensembles de densité nulle contenant des entiers possédant au plus deux facteurs premiers. J. Number Theory 91(2) (2001), 230255.10.1006/jnth.2001.2681CrossRefGoogle Scholar
Dartyge, C., Mauduit, C. and Sárközy, A.. Polynomial values and generators with missing digits in finite fields. Funct. Approx. Comment. Math. 52(1) (2015), 6574.10.7169/facm/2015.52.1.5CrossRefGoogle Scholar
Dartyge, C. and Sárközy, A.. The sum of digits function in finite fields. Proc. Amer. Math. Soc. 141(12) (2013), 41194124.10.1090/S0002-9939-2013-11801-0CrossRefGoogle Scholar
Drmota, M. and Mauduit, C.. Weyl sums over integers with affine digit restrictions. J. Number Theory 130(11) (2010), 24042427.10.1016/j.jnt.2010.04.006CrossRefGoogle Scholar
Drmota, M., Mauduit, C. and Rivat, J.. The sum-of-digits function of polynomial sequences. J. Lond. Math. Soc. (2) 84(1) (2011), 81102.10.1112/jlms/jdr003CrossRefGoogle Scholar
Erdős, P., Mauduit, C. and Sárközy, A.. On arithmetic properties of integers with missing digits. I. Distribution in residue classes. J. Number Theory 70(2) (1998), 99120.10.1006/jnth.1998.2229CrossRefGoogle Scholar
Erdős, P., Mauduit, C. and Sárközy, A.. On arithmetic properties of integers with missing digits. II. Prime factors. Discrete Math. 200 (1999), 149164; Paul Erdős memorial collection.10.1016/S0012-365X(98)00331-8CrossRefGoogle Scholar
Fine, N. J.. The distribution of the sum of digits $(\mathrm{mod}\ p)$ . Bull. Amer. Math. Soc. 71 (1965), 651652.10.1090/S0002-9904-1965-11381-7CrossRefGoogle Scholar
Fischer, R.. Sofic systems and graphs. Monatsh. Math. 80(3) (1975), 179186.10.1007/BF01319913CrossRefGoogle Scholar
Fischer, R.. Graphs and symbolic dynamics. Topics in Information Theory (Second Colloquium, Keszthely, 1975) (Colloquia Mathematica Societatis János Bolyai, 16). Ed. I. Csiszár and P. Elias. János Bolyai Mathematical Society, Budapest, 1977, pp. 229244.Google Scholar
Furstenberg, H.. Disjointness in ergodic theory, minimal sets, and a problem in Diophantine approximation. Math. Systems Theory 1 (1967), 149.10.1007/BF01692494CrossRefGoogle Scholar
García-Ramos, F. and Pavlov, R.. Extender sets and measures of maximal entropy for subshifts. J. Lond. Math. Soc. (2) 100(3) (2019), 10131033.10.1112/jlms.12252CrossRefGoogle Scholar
Gelfond, A. O.. Sur les nombres qui ont des propriétés additives et multiplicatives données. Acta Arith. 13 (1967/68), 259265.10.4064/aa-13-3-259-265CrossRefGoogle Scholar
Gittenberger, B. and Thuswaldner, J. M.. Asymptotic normality of $b$ -additive functions on polynomial sequences in the Gaussian number field. J. Number Theory 84(2) (2000), 317341.10.1006/jnth.2000.2522CrossRefGoogle Scholar
Glasscock, D., Moreira, J. and Richter, F. K.. Additive and geometric transversality of fractal sets in the integers. J. Lond. Math. Soc. (2) 109(5) (2024), Paper no. e12902, 55 pp.10.1112/jlms.12902CrossRefGoogle Scholar
Kátai, I.. Construction of number systems in algebraic number fields. Ann. Univ. Sci. Budapest. Sect. Comput. 18 (1999), 103107.Google Scholar
Kempner, A. J.. A curious convergent series. Amer. Math. Monthly 21(2) (1914), 4850.10.1080/00029890.1914.11998004CrossRefGoogle Scholar
Kim, D.-H.. On the joint distribution of $q$ -additive functions in residue classes. J. Number Theory 74(2) (1999), 307336.10.1006/jnth.1998.2327CrossRefGoogle Scholar
Konyagin, S.. Arithmetic properties of integers with missing digits: distribution in residue classes. Period. Math. Hungar. 42(1–2) (2001), 145162.10.1023/A:1015256809636CrossRefGoogle Scholar
Konyagin, S., Mauduit, C. and Sárközy, A.. On the number of prime factors of integers characterized by digit properties. Period. Math. Hungar. 40(1) (2000), 3752.10.1023/A:1004887821978CrossRefGoogle Scholar
Kovács, A.. On expansions of Gaussian integers with non-negative digits. Math. Pannon. 10(2) (1999), 177191.Google Scholar
Kovács, B.. Canonical number systems in algebraic number fields. Acta Math. Acad. Sci. Hungar. 37(4) (1981), 405407.10.1007/BF01895142CrossRefGoogle Scholar
Levin, D. A. and Peres, Y.. Markov Chains and Mixing Times, 2nd edn. American Mathematical Society, Providence, RI, 2017; with contributions by Elizabeth L. Wilmer, with a chapter on “Coupling from the past” by James G. Propp and David B. Wilson.10.1090/mbk/107CrossRefGoogle Scholar
Lind, D. and Marcus, B.. An Introduction to Symbolic Dynamics and Coding (Cambridge Mathematical Library), 2nd edn. Cambridge University Press, 2021.10.1017/9781108899727CrossRefGoogle Scholar
Madritsch, M. G.. The sum-of-digits function of canonical number systems: distribution in residue classes. J. Number Theory 132(12) (2012), 27562772.10.1016/j.jnt.2012.05.023CrossRefGoogle Scholar
Mahler, K.. On the generating functions of integers with a missing digit. K’o Hsüeh (Science) 29 (1947), 265267.Google Scholar
Mauduit, C. and Rivat, J.. Sur un problème de Gelfond: la somme des chiffres des nombres premiers. Ann. of Math. (2) 171(3) (2010), 15911646.10.4007/annals.2010.171.1591CrossRefGoogle Scholar
Mauduit, C. and Sárközy, A.. On the arithmetic structure of the integers whose sum of digits is fixed. Acta Arith. 81(2) (1997), 145173.10.4064/aa-81-2-145-173CrossRefGoogle Scholar
Maynard, J.. Primes with restricted digits. Invent. Math. 217(1) (2019), 127218.10.1007/s00222-019-00865-6CrossRefGoogle Scholar
Maynard, J.. Primes and polynomials with restricted digits. Int. Math. Res. Not. IMRN 2022(14) (2022), 123 [10626–10648 on table of contents].10.1093/imrn/rnab002CrossRefGoogle Scholar
Moshchevitin, N. G. and Shkredov, I. D.. On the multiplicative properties modulo $m$ of numbers with missing digits. Mat. Z. 81(3) (2007), 385404.Google Scholar
Norris, J. R.. Discrete-time Markov chains. Markov Chains (Cambridge Series in Statistical and Probabilistic Mathematics). Cambridge University Press, 1997, pp. 159.Google Scholar
Rosenthal, J. S.. Convergence rates for Markov chains. SIAM Rev. 37(3) (1995), 387405.10.1137/1037083CrossRefGoogle Scholar
Sándor, J. and Crstici, B.. Handbook of Number Theory. II. Kluwer Academic Publishers, Dordrecht, 2004.10.1007/1-4020-2547-5CrossRefGoogle Scholar
Shmerkin, P.. On Furstenberg’s intersection conjecture, self-similar measures, and the ${L}^q$ norms of convolutions. Ann. of Math. (2) 189(2) (2019), 319391.10.4007/annals.2019.189.2.1CrossRefGoogle Scholar
Spandl, C.. Computing the topological entropy of shifts. MLQ Math. Log. Q. 53(4–5) (2007), 493510.10.1002/malq.200710014CrossRefGoogle Scholar
Swaenepoel, C.. Prescribing digits in finite fields. J. Number Theory 189 (2018), 97114.10.1016/j.jnt.2017.11.012CrossRefGoogle Scholar
Thuswaldner, J. M.. The sum of digits function in number fields: distribution in residue classes. J. Number Theory 74(1) (1999), 111125.10.1006/jnth.1998.2317CrossRefGoogle Scholar
Walker, A. and Walker, A.. Arithmetic progressions with restricted digits. Amer. Math. Monthly 127(2) (2020), 140150.10.1080/00029890.2020.1682888CrossRefGoogle Scholar
Weiss, B.. Subshifts of finite type and sofic systems. Monatsh. Math. 77 (1973), 462474.10.1007/BF01295322CrossRefGoogle Scholar
Wu, M.. A proof of Furstenberg’s conjecture on the intersections of $\times p$ - and $\times q$ -invariant sets. Ann. of Math. (2) 189(3) (2019), 707751.10.4007/annals.2019.189.3.2CrossRefGoogle Scholar
Yu, H.. Additive properties of numbers with restricted digits. Algebra Number Theory 15(5) (2021), 12831301.10.2140/ant.2021.15.1283CrossRefGoogle Scholar
Figure 0

Figure 1 Graph that represents the 2-regular and transitive shift of finite type associated to the matrix T in Example 5.14.

Figure 1

Figure 2 Fischer cover of the sofic shift $\Sigma $ presented in Example 5.15.