(Logarithmic) densities for automatic sequences along primes and squares
aa r X i v : . [ m a t h . N T ] S e p (LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONGPRIMES AND SQUARES BORIS ADAMCZEWSKI, MICHAEL DRMOTA AND CLEMENS MÜLLNER
Abstract.
In this paper we develop a method to transfer density results for primitiveautomatic sequences to logarithmic-density results for general automatic sequences. As anapplication we show that the logarithmic densities of any automatic sequence along squares ( n ) n ≥ and primes ( p n ) n ≥ exist and are computable. Furthermore, we give for thesesubsequences a criterion to decide whether the densities exist, in which case they are alsocomputable. In particular in the prime case these densities are all rational. We also deducefrom a recent result of the third author and Lemańczyk that all subshifts generated byautomatic sequences are orthogonal to any bounded multiplicative aperiodic function. Introduction
Automatic sequences are sequences a ( n ) on a finite alphabet that are the output of a finiteautomaton (where the input is the sequence of digits of n in some base k ≥ ). Equivalently,they can also be defined as projections of fixedpoints of morphisms of constant length. Thesekind of sequences have got a lot of attention during the last 15 or 20 year (see for example thebook by Allouche and Shallit [1]). In particular there are very close relations to number the-ory, dynamical systems, and algebra. The most prominent examples of automatic sequencesare the Thue-Morse sequence t ( n ) and the Rudin-Shapiro sequence r ( n ) . Automatic sequences are deterministic sequences in the sense that they generate a topologi-cal dynamical system (subshift) with zero entropy . Say differently, their subword complexity,that is, the number of different subwords of length l , is subexponential. Actually the sub-word complexity of automatic sequences is at most linear in l , which is the lowest possiblegrowth order if we just exclude periodic sequences that have bounded subword complexity.Deterministic sequences have been intensively studied within the last few years in relationto the Sarnak conjecture [27] that says that deterministic sequences d ( n ) are asymptoticallyorthogonal to the Möbius function µ ( n ) : X n ≤ x d ( n ) µ ( n ) = o ( x ) ( x → ∞ ) . Mathematics Subject Classification.
Primary: 11B85, 11L20, 11N05; Secondary: 11A63, 11L03.
Key words and phrases.
Automatic sequences, logarithmic density, primes, squares.The first and third author have received funding from the European Research Council (ERC) under theEuropean Union’s Horizon 2020 research and innovation program under the Grant Agreement No 648132.Furthermore, the second and third author were supported by the Fond zur Förderung der wissenschaftlichenForschung (FWF), grant SFB F55-02 "Subsequences of Automatic Sequences and Uniform Distribution". The Thue-Morse sequence can be defined by t ( n ) = s ( n ) mod 2 , where s ( n ) denotes the number of ’s in the binary expansion of n , and the Rudin-Shapiro sequence by r ( n ) = B ( n ) mod 2 , where B ( n ) denotes the number of consecutive -blocks in the binary expansion of n . This conjecture, which is related to the Chowla conjecture (see for example [30] or [15]), isin general open. There is, however, big progress on the logarithmic version of the Chowlaconjecture by Tao [29] and Tao and Teräväinen [31], and also for the logarithmic version ofthe Sarnak conjecture by Frantzikinakis and Host [13]. For a relatively recent survey on theSarnak conjecture see [12]. Recently the last author could verify the Sarnak conjecture for allautomatic sequences d ( n ) = a ( n ) [24], and even more recently he could extend together withLemanczyk [19] the orthogonality relation to multiplicative functions f ( n ) with | f ( n ) | ≤ (and some mild but natural conditions on a ( n ) ): X n ≤ x a ( n ) f ( n ) = o ( x ) ( x → ∞ ) . The Sarnak conjecture (and the above variant for multiplicative functions) is closely relatedto the asymptotic properties of X n ≤ x d ( n )Λ( n ) , where Λ( n ) denotes the von Mangoldt Λ -function and one usually conjectures that thesesums are asymptotically of the form cx (1 + o (1)) for some constant c . This property is veryclose to prime number theorems of the kind { p ≤ x : p ∈ P , d ( p ) = α } = c x log x (1 + o (1)) . For the Thue-Morse sequence t ( n ) such a prime number theorem { p ≤ x : p ∈ P , t ( p ) = 0 } ∼ { p ≤ x : p ∈ P , t ( p ) = 1 } ∼ x log x was already conjectured in 1968/69 by Gelfond [14] (in a slightly more general form). Thisconjecture was finally proved in 2009 by Mauduit and Rivat [21] in a breakthrough paper.Gelfond conjectured, too, that the Thue-Morse sequence behaves nicely along polynomialsubsequences: { n ≤ x : t ( P ( n )) = 0 } ∼ { n ≤ x : t ( P ( n )) = 1 } ∼ x , where P ( x ) is a non-negative integer valued polynomial. This question turned out to beeven more challenging. It was finally solved (again) by Mauduit and Rivat [20] for quadraticpolynomials but for polynomials of degree at least 3 there is only partial information available[9]; the question by Gelfond is still open.We cannot expect such strong results for general automatic sequences. For example, if a ( n ) denotes the leading digit in the k -ary expansion of n (with k ≥ ) then neither the densities d ( a ( n ) , α ) = lim x →∞ { n ≤ x : a ( n ) = α } x = lim x →∞ x X n ≤ x [ a ( n )= α ] , nor the densities along primes d ( a ( p n ) , α ) = lim x →∞ { n ≤ x : a ( p n ) = α } x = lim x →∞ x X n ≤ x [ a ( p n )= α ] Λ( n ) = log p for prime powers n = p k and Λ( n ) = 0 else. LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 3 exist for ≤ α < k . Nevertheless – and this a general property for automatic sequences (see[6]) – the logarithmic densities d log ( a ( n ) , α ) = lim x →∞ x X n ≤ x n [ a ( n )= α ] = log(1 + 1 /α )log k exist. The question whether a density exists or only a logarithmic density depends mainly onthe behavior of the final strongly connected components of the corresponding finite automata.Furthermore, if densities exist they can be explicitly computed and are rational numbers [6].In the case, when only logarithmic densities exist, this is not that clear.The above mentioned results are related to density results of special automatic sequencesalong special subsequences: the subsequence of primes p and the subsequence of squares n . The purpose of the present paper is to study quite general subsequences of automaticsequences and to give answers to the question, whether a density or logarithmic densityalong subsequences exist. In particular we will give a complete answer for the subsequenceof primes and squares (Theorems 1.2 and 1.3). For these cases we will show that logarithmicdensities always exist. In other terms this means that, for every automatic sequence a ( n ) ,the following limits always exist: lim x →∞ x X n ≤ x n a ( n )Λ( n ) and lim x →∞ x X n ≤ x n a ( n ) . and we can decide, when the non-logarithmic versions hold. We want to add that for somespecial classes of automatic sequences, that is, invertible automatic sequences or automaticsequences related to block-additive functions, this is already known [11], [25].In order to state our main results we have to introduce some notation. First of all we willonly consider strictly increasing subsequences ( n ℓ ) ℓ ≥ of the positive integers that behave as n ℓ = ℓ γ L ( ℓ ) , (1)where γ ≥ and L ( n ) is slowly varying in the sense that lim ℓ →∞ L ( ⌈ δℓ ⌉ ) L ( ℓ ) = 1 (2)for all < δ < . Such sequences ( n ℓ ) ℓ ≥ are called regularly varying sequences , see Section 2.The sequence of primes, polynomial sequences, and Piatetski-Shapiro sequences ( i.e., ⌊ n c ⌋ ,where c > ) provide relevant examples of regularly varying sequences.As mentioned above every automatic sequence a ( n ) can be generated by a finite automaton.Without loss of generality we can assume that this automaton is minimal (see [1]). Thisautomaton can be seen as a directed graph, possibly with loops and multiple edges, whereevery vertex (or state) has out-degree k and for every vertex the out-going edges are labeledby , , . . . , k − . The set { , , . . . , k − } is the input alphabet . One vertex of this graphis distinguished as the initial state. Clearly, this graphs decomposes into strongly connectedcomponents. A strongly connected component is called final if there is no edge from thiscomponent to another one. We will say that an automatic sequence is primitive and pro-longable if the directed graph of the corresponding minimal automaton is strongly connectedand the initial state has a -labeled loop. We will be more precise in Section 3
BORIS ADAMCZEWSKI, MICHAEL DRMOTA AND CLEMENS MÜLLNER
Our first result says that it is sufficient to consider such automatic sequences.
Theorem 1.1.
Suppose that ( n ℓ ) ℓ ≥ is a regularly varying sequence and suppose that for anyprimitive and prolongable automatic sequence ˜ a ( n ) the densities along the subsequence ( n ℓ ) d (˜ a ( n ℓ ) , α ) := lim x →∞ { ℓ ≤ x : ˜ a ( n ℓ ) = α } x exist.Then the two following properties hold. (i) Then for every automatic sequence a ( n ) the logarithmic densities d log ( a ( n ℓ ) , α ) := lim x →∞ x X ℓ ≤ x ℓ [ a ( n ℓ )= α ] exist and can be explicitly computed. (ii) Furthermore, if the densities along the subsequence n ℓ corresponding to those auto-matic sequences that are generated by the final strongly connected components of thedirected graph are all equal then the densities d ( a ( n ℓ ) , α ) := lim x →∞ { ℓ ≤ x : a ( n ℓ ) = α } x exist and are equal to the corresponding densities of the final strongly connected com-ponents. This theorem will be now applied to primes and squares. We start with primes and note thatit was already shown in [24] that primitive and prolongable automatic sequences along theprimes have densities that are all computable rational numbers. Together with Theorem 1.1this solves the problem for primes completely.
Theorem 1.2.
For every automatic sequence a ( n ) the logarithmic densities d log ( a ( p n ) , α ) ofthe subsequence along prime numbers exist and are computable. Furthermore, if the densitiesalong primes on those automatic sequences that correspond to the final strongly connectedcomponents coincide then the densities d ( a ( p n ) , α ) exist and are computable rational numbers. The same result hold for subsequences along squares. However, in this case we have to checkthe assumption on primitive and prolongable automatic sequences, see Section 8. In bothcases of primes and squares we are able to compute the densities for primitive and prolongableautomatic sequence. As an example, we compute the densities of the paper-folding sequencealong primes and squares in Section 9. The densities of and in the paper-folding sequencealong primes are both / , whereas the density of in the paper-folding sequence alongsquares is . Theorem 1.3.
For every automatic sequence a ( n ) the logarithmic densities d log ( a ( n ) , α ) of the subsequence along squares exist and are computable. Furthermore, if the densitiesalong squares on those automatic sequences that correspond to the final strongly connectedcomponents coincide then the densities d ( a ( n ) , α ) exist and are also computable. If the inputbase k is prime, then these densities are rational numbers. LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 5
As a simple application, we can compute the logarithmic densities of the leading digit ofprimes and polynomials P ( n ) with integer coefficients, d log ( a ( p n ) , α ) = d log ( a ( P ( n )) , α ) = log(1 + 1 /α )log k . Theorems 1.2 and 1.3 suggest that the subsequences of primes and squares are similar , at leastfor the question of the existence of (logarithmic) densities of automatic sequences along thesesubsequences. As we will see in the proof parts they share several distribution properties.However, it seems that there are still fundamental differences . For example in the prime casethere is the following quite unexpected property.
Theorem 1.4.
For any automatic sequence a ( n ) there exists a computable positive integer m such that, for all α , d log ( a ( p n ) , α ) is equal to the logarithmic density of a ( n ) along theintegers n satisfying ( n, m ) = 1 . Remark 1.5.
This theorem also works for densities in the sense that if the density existsfor one of them, then it also exists for the other one and they coincide.
Remark 1.6.
This theorem applies for example to the residue of any block-additive function f mod m satisfying ( k − , m ) = 1 and (gcd( f ( n ) n ∈ N ) , m ) = 1 , as this sequence distributesuniformly along any arithmetic progression, which follows from [25, Proposition 3.15]. How-ever, this result was already put as a remark in [24], without a proof.We could not find a corresponding property for squares. We expect that the deeper reason forthis difference is that primes have a quasi-random behavior that is not present for squares.We leave it as an open problem to clarify this phenomenon.To end this introduction, let us mention that an analogue problem for Piatetski-Shapirosequences ⌊ n c ⌋ , with < c < / , has already been solved in [7]. Indeed, these authorsproved that, for every automatic sequence a ( n ) and for every c ∈ (1 , / , the logarithmicdensities d log ( a ( ⌊ n c ⌋ ) , α ) exist and are equal to the logarithmic densities of a ( n ) . Furthermore,the densities d ( a ( ⌊ n c ⌋ ) , α ) exist if and only if the densities d ( a ( n ) , α ) exist, in which case theyare equal. We conjecture that such a result should also hold for all < c < . Conjecture 1.7.
For every automatic sequence a ( n ) and for every c ∈ (1 , , the logarith-mic densities d log ( a ( ⌊ n c ⌋ ) , α ) exist and are equal to the logarithmic densities d log ( a ( n ) , α ) .Furthermore, the densities d ( a ( ⌊ n c ⌋ ) , α ) exist if and only if the densities d ( a ( n ) , α ) exist, inwhich case they are equal. Plan of the paper.
We start with a short section on regularly varying functions (Sec-tion 2) and proceed with a longer background section on properties of automatic sequences(Section 3). In particular we discuss (partly new) structural results that will be needed forthe proof of Theorem 1.1 that will be given in Section 5. In Section 6 we present a strategyhow one can check that densities for primitive and prolongable automatic sequences exist sothat Theorem 1.1 can be applied. Section 7 is then devoted to the case of prime numbers(Theorem 1.2) and Section 8 to the case of squares (Theorem 1.3). Finally, Section 9 isdevoted to the problem, how densities along primes and squares can be actually computed(including some examples). An Appendix collects some implications to dynamical systems.In particular, we deduce from a recent result of the third author and Lemańczyk that all
BORIS ADAMCZEWSKI, MICHAEL DRMOTA AND CLEMENS MÜLLNER subshifts generated by automatic sequences are orthogonal to any bounded multiplicativeaperiodic function (Corollary A.7).1.2.
Notation.
In this paper we let N denote the set of positive integers and we use theabbreviation e( x ) = exp(2 πix ) for any real number x .For two functions, f : R → R and g : R → R > such that f /g is bounded, we write f = O ( g ) or f ≪ g . If even | f ( x ) | ≤ g ( x ) for all x , we write f = O ∗ ( g ) . Furthermore, we write f = o ( g ) if lim x →∞ f ( x ) /g ( x ) = 0 . We also write f ∼ g if lim x →∞ f ( x ) /g ( x ) = 1 .We let ⌊ x ⌋ denote the floor function and ⌈ x ⌉ denote the ceiling function.Moreover we let ϕ ( n ) denote the Euler totient function. Finally, we let P denote the set ofprime numbers and by π ( x ) the number of prime numbers smaller or equal to x .2. Regularly varying functions
We discuss in this section some properties of subsequences ( n ℓ ) ℓ ∈ N satisfying (1) and (2) forsome γ ≥ and L : N → R . We define a new function f : R ≥ → R > , f ( x ) = n ⌈ x ⌉ . It followsdirectly that f is measurable. Furthermore, we have for any δ > that lim x →∞ f ( δx ) f ( x ) = δ γ , i.e. it is regularly varying of index γ (see [3] for background on regularly varying functions).We consider the generalized inverse function of f , g ( x ) := inf { y ∈ [1 , ∞ ) : f ( y ) > x } . Inparticular, we have g ( N ) = { ℓ ∈ N : n ℓ ≤ N } . One has by [3, Theorem 1.5.12] that g isregularly varying of index /γ , i.e. for every δ > N →∞ g ( δN ) g ( N ) = δ β , where we set β := 1 /γ . Lemma 2.1.
With the notation from above, we have log( g ( N )) ∼ β log N. Proof. As g is regularly varying of index β we can write it as g ( x ) = x β · c ( x ) · exp (cid:18)Z x ε ( u ) u du (cid:19) , where c ( x ) converges to some c ∈ (0 , ∞ ) and ε ( x ) converges to for x → ∞ (see [3, Theorem1.3.1]). In particular we have that Z x ε ( u ) u du = o (log x ) , which finishes the proof by basic properties of the logarithm. (cid:3) LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 7 Automatic sequences
Let us now describe the precise setting of our study. First we give some definitions relatedto automata which can also be found in [1].A sequence ( a n ) n ≥ with values in a finite set is k -automatic if it can be generated by afinite automaton. This means that there exists a finite-state machine (a deterministic finiteautomaton with output) that takes as input the base- k expansion of n and produces as outputthe symbol a n . We use the following convention. Inputs are read from left to right, that is,starting from the most significant digit.3.1. Formal definition of k -automatic sequences. Throughout this paper, we will usethe following notation. An alphabet A is a finite set of symbols, also called letters. A finiteword over A is a finite sequence of letters in A or, equivalently, an element of A ∗ , the freemonoid generated by A . The length of a finite word w , that is, the number of symbols in w ,is denoted by | w | . We let ǫ denote the empty word, the neutral element of A ∗ . Let k ≥ bea natural number. We let Σ k denote the alphabet { , , . . . , k − } . Given a positive integer n , we set ( n ) k := w r w r − · · · w for the canonical base- k expansion of n (written from most toleast significant digit), which means that n = P ri =0 w i k i with w i ∈ Σ k and w r = 0 . Note thatby convention (0) k := ǫ . Conversely, if w := w · · · w r is a finite word over the alphabet Σ k ,we set [ w ] k := P ri =0 w r − i k i . Furthermore, we let ( n ) tk denote the unique word w of length t such that [ w ] k ≡ n mod k t . Example 3.1.
We find (37) = (1 , , , , , , (37) = (0 , , , and [(1 , , , , = 22 . Definition 3.2. A k -deterministic finite automaton, or k -DFA for short, is a quadruple A = ( Q, Σ k , δ, q ) , where Q is a finite set of states, Σ k := { , , . . . , k − } is the finite inputalphabet, δ : Q × Σ → Q is the transition function and q ∈ Q is the initial state. A k -DFAO A = ( Q, Σ , δ, q , ∆ , τ ) is a k -DFA endowed with an additional output function τ : Q → ∆ ,where ∆ is the alphabet of output symbols.We extend δ to a function δ : Q × Σ ∗ → Q as follows. Given a state q in Q and a finiteword w := w w · · · w n over the alphabet Σ k , we define δ ( q, w ) recursively by δ ( q, ǫ ) = q and δ ( q, w ) = δ ( δ ( q, w w · · · w n − ) , w n ) . Hence δ ( q, w ) consists of | w | “steps” for every w ∈ Σ ∗ . Definition 3.3.
We say that a sequence ( a ( n )) n ≥ is a k -automatic sequence if there existsa k -DFAO A = ( Q, Σ k , δ, q , ∆ , τ ) such that a n = τ ( δ ( q , ( n ) k )) . If ∆ = Q and τ = id , thenwe call ( a ( n )) n ≥ , pure . A sequence is automatic if it is k -automatic for some k .Let us recall how one can change the input alphabet Σ k to Σ k ℓ = { , . . . , k ℓ − } . Lemma 3.4.
Let A = ( Q, Σ k , δ, q , ∆ , τ ) be a k -DFAO such that δ ( q ,
0) = q . Then, forevery integer ℓ ≥ , the k ℓ -DFAO A ′ = ( Q, Σ k ℓ , δ, q , ∆ , τ ) produces the same automaticsequence.Proof. This follows directly from the extension of δ to Q × Σ ∗ → Q , the way the representationin base k and in base k ℓ correspond to each other and that δ ( q ,
0) = q allows us to ignoreleading zeros both for A and A ′ . (cid:3) BORIS ADAMCZEWSKI, MICHAEL DRMOTA AND CLEMENS MÜLLNER
Reading from right to left.
There is nothing special about reading the input fromleft to right, as shown by the following result. If w = a a · · · a ℓ is a finite word, then by w we mean the reversal of the word w , that is, w = a ℓ a ℓ − · · · a . The reversal of w is alsodenoted by w R . Theorem 3.5 (Theorem 4.3.3 in [1]) . Let a ( n ) be a k -automatic sequence. Then so is thesequence a ( n ) defined by a ( n ) = a (( n ) k ) . In other word, given a k -automatic sequence a ( n ) there exists a k -DFAO with reverse reading producing the sequence a ( n ) . By reverse reading, we mean that this k -DFAO reads the input ( n ) k from right to left.3.3. Densities for automatic sequences.
We recall in this section some results aboutdensities and logarithmic densities for automatic sequences.
Lemma 3.6 (Theorem 7 in [6]) . Let a ( n ) be an automatic sequence. Then the logarithmicdensity exists for every α , i.e. lim N →∞ N X n ≤ N n [ a ( n )= α ] , exists and is denoted by d log ( a ( n ) , α ) . Lemma 3.7.
Let a ( n ) be an automatic sequence, such that the logarithmic density of α is ,then the density of α exists and equals .Proof. It follows directly by partial summation that for any sequence a , we have lim inf N →∞ N X n ≤ N [ a ( n )= α ] ≤ lim inf N →∞ N X n ≤ N n [ a ( n )= α ] . By assumption we know that the logarithmic density is and, therefore, the lower densityof α is . By [6, Theorem 11] we know that this can only be the case if the density is . (cid:3) Lemma 3.8.
Let a ( n ) be an automatic sequence, such that the density of α is , then theupper Banach density is also .Proof. The set of integers for which a ( n ) = α is contained in a set with a missing digit by [6,Theorem 9]. This immediately implies the statement. (cid:3) Lemma 3.7 and Lemma 3.8 tell us that some (in general quite different) notions of sparsenessactually coincide for automatic sequences.3.4.
Some subclasses of automata and automatic sequences.
In this section, we recallvarious definitions about automata and automatic sequences.
Definition 3.9. A k -DFAO A = ( Q, Σ k , δ, q , ∆ , τ ) and the corresponding automatic se-quence is called minimal if • For every q ∈ Q there exists w ∈ Σ ∗ k such that δ ( q , w ) = q . The upper Banach density of a is defined as d ∗ ( a ) := lim sup N − M →∞ { M ≤ n ≤ N : a ( n ) =0 } N − M +1 . LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 9 • For every two different states q , q ∈ Q there exists w ∈ Σ ∗ k such that τ ( δ ( q , w )) = τ ( δ ( q , w )) . Fact 3.10 ([1] Corollary 4.1.9) . Any k -automatic sequence can be produced by a minimal k -DFAO. Definition 3.11. A k -DFA A = ( Q, q , Σ k , δ ) is strongly connected if for any q , q ∈ Q thereexists w ∈ Σ ∗ such that δ ( q , w ) = q . It is primitive if there exists some ℓ ∈ N such thatfor any q , q ∈ Q there exists w ∈ Σ ℓ such that δ ( q , w ) = q . Finally, A is prolongable if δ ( q ,
0) = q . Definition 3.12. A k -automatic sequence is said to be prolongable (resp. primitive ) if it canbe produced by a k -DFAO whose corresponding k -DFA is prolongable (resp. primitive). Itis called pure if it can be produced by a k -DFAO whose output function is the identity. Lemma 3.13.
Let A = ( Q, q , Σ k , δ ) be a strongly connected k -DFA such that there existsome q ∈ Q and i ∈ Σ with δ ( q, i ) = q . Then A is primitive.Proof. Let q , q ∈ Q . As A is strongly connected, there exist w , w ∈ Σ ∗ such that δ ( q , w ) = q, δ ( q, w ) = q . Thus, we find that δ ( q , w i n w ) = q for any n ∈ N . Thisshows that for any sufficiently large ℓ there exists some w ∈ Σ ℓ such that δ ( q , w ) = q .As this works for all (finitely many) pairs q , q ∈ Q we find some ℓ that works for all pairssimultaneously. (cid:3) Definition 3.14.
Let A = ( Q, q , Σ k , δ ) be a k -DFA. A final component of A is a minimal(with respect to inclusion) non-empty set F ⊆ Q that is closed under δ ( ., . ) . The columnnumber of A is defined by c ( A ) := min w ∈ Σ ∗ | δ ( Q, w ) | . We define X ( A ) as the set of subsets of Q c that are realized as δ ( Q, w ) for some w ∈ Σ ∗ .Furthermore, we call a word w minimizing if | δ ( Q, w ) | = c ( A ) . If c ( A ) = 1 , we call it synchronizing . 4. A structural result for automatic sequences
This section is dedicated to the following structural result concerning automatic sequences.
Proposition 4.1.
Let ( a ( n )) n ≥ be a k -automatic sequence. Then there exists a finite set B = { b , b , . . . , b s } of k -automatic sequences that are produced by some prolongable andprimitive k ℓ -DFAO, where ℓ ≥ is an integer, and with the following property. For every b i = ( b i ( n )) n ∈ N ∈ B , we set M i := { m ∈ N : a ( mk λ + r ) = b i ( mk λ + r ) , ∀ λ ∈ N , ≤ r < k λ } . The sets M i , ≤ i ≤ s , are pairwise disjoint and the logarithmic densities of M i , ≤ i ≤ s ,exist and are positive. Furthermore, the (upper Banach) density of M := N \ ∪ i M i existsand equals . This proposition will allow us to approximate an automatic sequence ( a ( n )) n ∈ N by the prim-itive automatic sequences ( b i ( n )) n ∈ N . We start by proving an auxiliary result, which showsthat the M i are k -automatic sets, i.e. the indicator function is k -automatic. Lemma 4.2.
Let k ≥ and ( a ( n )) n ≥ , ( b ( n )) n ≥ be k -automatic sequences. Then so is ( c ( n )) n ≥ , where c ( n ) = (cid:26) , if a ( nk λ + s ) = b ( nk λ + s ) for all λ ≥ , ≤ s < k λ , otherwise. Before proving Lemma 4.2, we recall the following definition.
Definition 4.3.
Let A (1) = ( Q (1) , Σ k , δ (1) , q (1)0 ) , A (2) = ( Q (2) , Σ k , δ (2) , q (2)0 ) be two k -DFA.Then A = ( Q (1) × Q (2) , Σ k , δ, q ) is a k -DFA that we call the product of A (1) and A (2) , where δ = δ (1) × δ (2) , q = ( q (1)0 , q (2)0 ) , i.e. δ (( q (1) , q (2) ) , w ) = ( δ (1) ( q (1) , w ) , δ (2) ( q (2) , w )) . Proof of Lemma 4.2.
Let A (1) = ( Q (1) , Σ k , δ (1) , q (1)0 , ∆ (1) , τ (1) ) denote a minimal k -DFAO withreverse reading that produces the sequence a ( n ) , and let A (2) = ( Q (2) , Σ k , δ (2) , q (2)0 , ∆ (2) , τ (2) ) denote a minimal k -DFAO with reverse reading that produces the sequence b ( n ) . For every q ∈ Q (1) , we let a q ( n ) (resp. b q ( n ) ) denote the sequence produced by A (1) (resp. A (2) ) whenreplacing the initial state by q .For every pair ( q , q ) ∈ Q (1) × Q (2) , we define the sequence c q ,q ( n ) by c q ,q ( n ) = (cid:26) , if a q ( n ) = b q ( n )0 , otherwise.Then c q ,q ( n ) is k -automatic for it can be produced using the product of the k -DFA A q :=( Q (1) , Σ k , δ (1) , q ) and A q := ( Q (2) , Σ k , δ (2) , q ) endowed with the output function τ definedby τ ( q, p ) = 1 if τ (1) ( q ) = τ (2) ( p ) , and τ ( q, p ) = 0 otherwise.Now, setting S := { ( q , q ) ∈ Q (1) × Q (2) : ∃ w ∈ Σ ∗ k such that δ (1) ( q (1)0 , w ) = q and δ (2) ( q (2)0 , w ) = q } , we get that c ( n ) = Y ( q ,q ) ∈S c q ,q ( n ) . Hence c ( n ) is k -automatic as a finite product of k -automatic sequences. (cid:3) Remark 4.4.
The stated Proposition is in a form that is oriented towards applicability.However, for the proof we will use a different description of B , i.e., B = { b i,j : 1 ≤ i ≤ r, ≤ j ≤ c i } , where r denotes the number of different final components and c i the column numberof the i -th final component. A quite similar result can be found in [4]. They show that the minimal components of a subshift cor-responding to a k -automatic sequence are given by primitive and prolongable k ℓ -automatic sequences. Thisallows us to cover the sequence ( a ( n )) n ≥ by arbitrary shifts of these finitely many k ℓ -automatic sequences.Since we are ultimately interested in (possibly) sparse subsequences, we need to avoid these shifts. This isexactly achieved by Proposition 4.1, while also giving some information about how each sequence b i covers a . LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 11
Proof of Proposition 4.1.
We start by noting that by Lemma 4.2, the indicator functions ofthe M i are automatic and, thus, the logarithmic densities of the M i exist. Assume now that m ∈ M i and k ℓ − ≤ m < k ℓ , then we have that mk r + n ∈ M i for all r ∈ N , n < k r . Hence asimple computation shows that the logarithmic density of M i is at least log( m +1) − log( m )log( k r ) . Thusit only remains to show that we can choose the b i in such a way that the M i , ≤ i ≤ s aredisjoint and M has upper Banach density .We can assume without loss of generality that ( a ( n )) n ≥ is minimal and for any q ∈ Q , ( ∃ n ∈ N : δ ( q, n ) = q ) ⇒ ( δ ( q,
0) = q ) , (3)as we can change Σ k = { , . . . , k − } to Σ k ℓ = { , . . . , k ℓ − } . We consider now the finalcomponents which we call F , F , . . . , F r . First we claim that for any final component F i there exists some set M ( i )0 ∈ X ( F i ) such that every element of M ( i )0 is fixed under δ ( ., .Fix any i , ≤ i ≤ r , and take some set M ∈ X ( F i ) . We consider now M j := δ ( M, j ) , andone sees easily that M j ∈ X ( F i ) . As X ( F i ) is finite, there exists some M ( i )0 for which thereexists some ℓ with δ ( M ( i )0 , ℓ ) = M ( i )0 . Thus we see that δ ( ., ℓ ) is a bijection from M ( i )0 toitself. Therefore, we know that a properly chosen power is the identity, i.e. δ ( q, ℓ ′ ) = q forall q ∈ M ( i )0 and the claim follows by (3).This shows in particular that all the F i are primitive by Lemma 3.13. Now we are able todefine the sequences b i,j ( n ) . For every final component F i we define c i := c ( F i ) many differentautomatic sequences corresponding to the automata ( F i , q ( i,j )0 , Σ k ℓ ′ , δ ↾ F i , τ ↾ F i ) for every q ( i,j )0 ∈ M ( i )0 . We call the corresponding automatic sequences b i,j ( n ) and the correspondingautomata B i,j . We note that δ ( q , ( m ) k ) = δ ( q ( i,j )0 , ( m ) k ) if and only if m ∈ M i,j , by theminimality of ( a ( n )) n ≥ . Thus we see directly that all the M i,j have to be disjoint. Indeed, letus assume that m ∈ M i ,j ∩ M i ,j , which can only happen if δ ( q ( i ,j )0 , ( m ) k ) = δ ( q ( i ,j )0 , ( m ) k ) .This can clearly be only the case if i = i =: i , as the final components are disjoint. However,this would also imply that (cid:12)(cid:12)(cid:12) δ ( M ( i )0 , ( m ) k ) (cid:12)(cid:12)(cid:12) < c ( F i ) which gives a contradiction.It only remains to show that the (upper Banach) density of M equals . We find by [5,Lemma 3.1] that there exists a word w ∈ Σ ∗ k such that if v ∈ Σ ∗ k contains w as a factorthen δ ( q , v ) belongs to a strongly connected component of A , i.e. one of the F i . Next wefind a word w that is minimizing for all the F i . Therefore, we can take for example theconcatenation of words that are minimizing for a single F i . Next we aim to show that if v ∈ Σ ∗ k contains w := w w as a subword, then there exists i, j such that δ ( q , v ) = δ ( q ( i,j )0 , v ) ,i.e. [ v ] k / ∈ M . We note that we can split v = v v such that w is a subword of v and w is a subword of v . The defining property of w assures that there exists some i such that δ ( q , v ) ∈ F i . As w (and therefore also v ) is minimizing for F i , we have M ( i ) := δ ( F i , v ) ∈ X ( F i ) such that δ ( q , v ) ∈ M ( i ) . Moreover, we find by the propertiesof X ( F i ) that δ ( M ( i )0 , v ) ∈ X ( F i ) and, therefore, δ ( M ( i )0 , v ) = M ( i ) . Thus, there exists q ( i,j )0 ∈ M ( i )0 such that δ ( q , v ) = δ ( q ( i,j )0 , v ) .Thus M is contained in a set with a missing digit (the alphabet size is k | v | and the missingdigit is v ) and, thus, its upper Banach density is . (cid:3) The set X was introduced in Definition 3.14. Remark 4.5.
We discuss here shortly how to determine the b i,j and the M i,j that appear inthe proof of Proposition 4.1 (also recall Remark 4.4). Given a pure k -automatic sequence a ( n ) with corresponding automaton A = ( Q, Σ k , δ, q ) . We first assure that (3) holds by possiblychanging Σ k to Σ k ℓ for some ℓ ≥ . Then we determine the final components F i , ≤ i ≤ s of A . The proof of Proposition 4.1 assures us that for every F i there exists some M ( i )0 ∈ X ( F i ) such that every element of M ( i )0 is fixed by δ ( ., . This allows us to define the b i,j as theautomatic sequence corresponding to the automaton ( Q, Σ , δ, q ( i,j )0 ) where q ( i,j )0 ∈ M ( i )0 .We have seen in the proof of Proposition 4.1 that m ∈ M i,j if and only if δ ( q , ( m ) k ) = δ ( q ( i,j )0 , ( m ) k ) . Thus, we can actually just consider the k -automatic sequence (( a ( n ) , b i,j ( n ))) n ≥ (see Defini-tion 4.3) and see that the indicator function of M i,j is the just the projection of the previoussequence where τ (( x, y )) = [ x = y ] .5. Transfer of densities
In this section we prove Theorem 1.1 which allows to compute the logarithmic density ofa general automatic sequence along a subsequence ( n ℓ ) ℓ ∈ N when knowing the density ofprimitive automatic sequences along the same subsequence. The main ingredient is thestructural result we discussed in the previous section, Proposition 4.1. Furthermore, it is inthis context very useful to use summation by parts. Lemma 5.1.
Let ( a n ) , ( b n ) be two sequences of complex numbers. Then N X n =0 a n b n = b N N X n =0 a n + N − X n =0 ( b n − b n +1 ) n X ℓ =0 a ℓ . We also need the estimate (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) b X ℓ = a +1 ℓ − log (cid:18) ba (cid:19)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) ≤ a , (4)which follows from comparing the sum with R ba x dx . To prove Theorem 1.1, we are interestedin computing lim L →∞ L ) X ℓ Let ( b ( n ℓ )) ℓ ≥ be such that the density of α exists, i.e. lim L →∞ L X ℓ ≤ L [ b ( n ℓ )= α ] = d b ( α ) . LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 13 Then, X x ≤ ℓ ≤ y ℓ [ b ( n ℓ )= α ] = log( y/x ) d b ( α ) + o x →∞ (1 + log( y/x )) . Proof. Fix ε > and let x be large enough, such that for any x ≥ x we have (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) x X ℓ ≤ x [ b ( n ℓ )= α ] − d b ( α ) (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) ≤ ε. By partial summation, i.e. Lemma 5.1, we find X x ≤ ℓ ≤ y c ℓ ℓ = X x ≤ ℓ ≤ y c ℓ y + X x ≤ n Proof of (i) of Theorem 1.1. Naturally, we are interested in estimating d log ( a ( n ℓ ) , α ) = lim L →∞ L ) X ≤ ℓ ≤ L ℓ [ a ( n ℓ )= α ] . (5)Actually, we aim to show, with the notation from Proposition 4.1, that d log ( a ( n ℓ ) , α ) = X ≤ i ≤ s d log ( M i ) · d ( b i ( n ℓ ) , α ) . (6)We note that the limit in (5) is invariant under multiplying L by a bounded constant. Thismeans, it is sufficient to consider only a subsequence ( L ν ) ν ∈ N , where L ν +1 /L ν is bounded.In particular, we can choose L ν = g ( k λν ) , as g ( k λ ( ν +1) ) /g ( k λν ) → k λβ for any λ ∈ N ≥ .Moreover, Lemma 2.1 shows that we can replace log( g ( k λν )) by log( k βλν ) in (5).On the other hand, we find k βλν ) X ℓ ∈ N : n ℓ Consider some large λ and define for N ≥ k λ an integer ν suchthat k ν + λ − ≤ N < k ν + λ and m ∈ [ k λ − , k λ ] such that m k ν ≤ N < ( m + 1) k ν . We areinterested in computing lim N →∞ g ( N ) X ℓ ≤ g ( N ) [ a ( n ℓ )= α ] . (7)Changing N to m k ν changes the limit in two ways. The first contribution is due to theshortening of the sum and the second contribution is due to the changing of the normalizingfactor. Both contributions change the value by at most g ( N ) − g ( m k ν ) g ( N ) ≤ − g ( m k ν ) g (( m + 1) k ν ) → ν →∞ − (cid:18) − m + 1 (cid:19) β ≤ m + 1 ≤ k λ − . Therefore, we are interested in computing g ( m k ν ) X m We start this section by discussing a result by the last author [24], which allows to represent a k -automatic sequence a ( n ) which is primitive and prolongable as a combination of an almostperiodic sequence and a sequence that looks random in some ways. This representation hasthe form a ( n ) = f ( s ( n ) , T ( n )) , (8)where s ( n ) is a pure synchronizing k -automatic sequence taking values in Q ( c ) for some c ≥ and T ( n ) takes values in a finite group G with the following property. For every j < k and q ∈ Q ( c ) there exists g j,q ∈ G such that T ( n · k + j ) = T ( n ) · g j,s ( n ) holds for all n ∈ N . We seethat T takes a particularly simple form when s is constant – this corresponds to a so calledinvertible (sometimes also called bijective) automatic sequence. LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 17 Example 6.1. We consider the following automaton, with input alphabet { , } . q start q q q q 01 0 1 010 1 0,1 The sequence s ( n ) corresponds to the following automaton. ( q , q , q ) start ( q , q , q ) The group G = S and the group elements g j,q are given by g , ( q ,q ,q ) = (12) , g , ( q ,q ,q ) = (23) g , ( q ,q ,q ) = (12) , g , ( q ,q ,q ) = id, and the function f is given by f (( q i , q i , q i ) , g ) = q i g − . For a more detailed treatment ofthis example see [24].We start by discussing some properties of synchronizing automatic sequences. For a moredetailed treatment of subsequences of synchronizing automatic sequences see [8]. We recallthat a word w ∈ Σ ∗ is synchronizing for an automaton A = ( Q, q , Σ , δ, ∆ , τ ) if δ ( q, w ) = δ ( q , w ) for all q ∈ Q . This implies directly that the concatenation of a synchronizing wordwith any word is again synchronizing. We define the set of synchronizing integers as follows. S := { n ∈ N : ( n ) k is synchronizing } . We will also make use of a truncated version, S λ := S ∩ [0 , . . . , k λ − . We recall that bythe defining property of a synchronizing word, s ( n ) = s ( m ) if n ≡ m mod k λ for m ∈ S λ .Moreover, we have lim λ →∞ | S λ | k λ = 1 by [8, Lemma 2.2]. This already shows that s ( n ) is almostperiodic, i.e. it can be (uniformly) approximated by periodic functions. T ( n ) , which is sometimes called the invertible part , looks much more random in many ways,but still has some periodic properties. In particular, there exists a normal subgroup G suchthat G/G ∼ = Z /d Z for some d ∈ N which is coprime to k and depends on the sequence a ( n ) .Furthermore, there exist cosets G , G , . . . , G d − such that T ( n ) ∈ G ( n mod d ) for all n ∈ N .One of the key tools to study the distribution of sequences that take values in G are (uni-tary and irreducible) representations (see for example [28] for more information on linearrepresentations of finite groups). A m -dimensional unitary representation D : G → U m isa homomorphism from G to the set of unitary m × m matrices. It is said to be irreducibleif there exists no non-trivial subspace V such that D ( g ) · V ⊆ V holds for all g ∈ G . Theperiodic behaviour described above manifests itself in the existence of special representations D , D , . . . , D d − form G to U which can be defined via D j ( T ( n )) = e (cid:18) n · jd (cid:19) . We say that two representations D, D ′ are equivalent if there exists a matrix A ∈ U m suchthat D ′ ( g ) = AD ( g ) A − for all g ∈ G . It is a well-known fact that for a finite group G there are only finitely many equivalence classes of irreducible and unitary representations.Furthermore, non-equivalent irreducible and unitary representations D, D ′ are orthogonal,i.e. h D, D ′ i = 1 | G | X g ∈ G D ( g ) D ′ ( g ) . Very importantly, one can use representations to determine the asymptotic distribution of asequence (see for example [18] for a proof). Lemma 6.2. Let G be a compact group and ν a regular normed Borel measure in G . Thena sequence ( x n ) n ≥ is ν -uniformly distributed in G , i.e., N P n Now we describe a method on how to work with subsequencesof primitive automatic sequences using (8). We need another definition before tackling thistask. Definition 6.3. A sequence ( n ℓ ) ℓ ∈ N of nonnegative integers distributes regularly within residueclasses if for any h ∈ N , ≤ m < h there exists some c n ℓ ( m ; h ) such that lim L →∞ |{ ℓ ≤ L : n ℓ ≡ m mod h }| L = c n ℓ ( m ; h ) and it is multiplicative in the second argument, i.e. c n ℓ ( m ; h · h ) = c n ℓ ( m ; h ) · c n ℓ ( m ; h ) forany m ∈ N and co-prime h , h . We write c ( m ; h ) = c n ℓ ( m ; h ) if n ℓ is clear from the context.Now we are able to state the main theorem of this subsection. LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 19 Theorem 6.4. Let ( n ℓ ) ℓ ∈ N be a strictly increasing sequence that distributes regularly withinresidue classes such that lim λ →∞ X m We first show that the limit lim λ →∞ X r ∈ S λ [ s ( r )= q ] c ( r ; k λ ) indeed exists. We find directly that X r ∈ S λ [ s ( r )= q ] c ( r ; k λ ) ≤ X ≤ r By (13), this shows that the sequence T ( n ℓ ) is ν -uniformly distributed in G . Finally, we areable to simplify the expression for ν . We find for g ∈ G i , ν ( g ) = 1 | G | X ≤ j The subsequence along primes We apply in this section Theorem 6.4 to the subsequence along primes which reproves resultsfrom [24] using this new framework. For this purpose we are repeating the key argumentsfrom [24].We find directly by the Prime Number Theorem in arithmetic progressions that lim N →∞ π ( N ) X p ≤ N [ p ≡ r mod m ] = [( r,m )=1] ϕ ( m ) = c ( r ; m ) . One finds directly that primes distribute regularly within residue classes. Moreover, ( r, k λ ) =1 ⇔ ( r, k ) = 1 holds with positive probability. Thus, c ( r ; k λ ) resembles a uniform distributionon a subset of [0 , . . . , k λ − with positive density (independent of λ ). This shows (10) as lim λ →∞ | S λ | k λ = 0 . Thus, it remains to show for any m, h ∈ N , lim N →∞ π ( N ) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) X p ≤ Np ≡ m mod h D ( T ( p )) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) = 0 . (14)The key ingredient was to generalize and use a method developed by Mauduit and Rivat [22].We will focus here mainly on the generalized version, as it proved to be better applicable inthis situation. We fix some k ∈ N and let f λ ( n ) denote f ( n mod k λ ) and let . H denote theHermitian transpose. We also need the following two definitions. Definition 7.1. A function f : N → U d has the Carry property if there exists η > suchthat uniformly for ( λ, α, ρ ) ∈ N with ρ < λ , the number of integers ≤ ℓ < k λ such thatthere exists ( n , n ) ∈ { , . . . , k α − } with f ( ℓk α + n + n ) H f ( ℓk α + n ) = f α + ρ ( ℓk α + n + n ) H f α + ρ ( ℓk α + n ) (15)is at most O ( k λ − ηρ ) where the implied constant may depend only on k and f . Definition 7.2. Given a non-decreasing function γ : R → R satisfying lim λ →∞ γ ( λ ) = + ∞ and c > we let F γ,c denote the set of functions f : N → U d such that for ( α, λ ) ∈ N with α ≤ cλ and t ∈ R : (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) k − λ X u Furthermore, it is classical to replace estimates for the sum along primes by correlations with Λ . This gives (for example by [16]) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) π ( N ) X p Corollary 7.4. Let γ : R → R be a non-decreasing function satisfying lim λ →∞ γ ( λ ) / log( λ ) =+ ∞ , and f : N → U d be a function satisfying Definition 7.1 for some η ∈ (0 , and f ∈ F γ,c for some c ≥ in Definition 7.2. Then for any a, m ∈ N we have lim N →∞ (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) π ( N ) X p Proposition 7.6 ([24]) . Let D be a unitary, irreducible representation of G different from D j . Then D ( T ( . )) ∈ F γ,c for some linear γ and all c ≥ . We note that Proposition 7.6 does not hold for D = D j , in fact for t = j/d we have N X n Proposition 7.7. Let a ( n ) be a prolongable and primitive automatic sequence. Then thedensity of a ( n ) = α exist along the subsequence of primes. Finally we prove Theorem 1.4 saying that there exists m with d log ( a ( p n ) , α ) = d log ( a ( n ℓ ) , α ) ,where n ℓ runs through all positive integers with ( n, m ) = 1 . Proof. We first use Theorem 1.1 to find B = { b ( n ) , . . . , b s ( n ) } . Each of the b i can be writtenas b i ( n ) = f i ( s i ( n ) , T i ( n )) , with some d i = d ( b i ) . We choose now m = k · Q d i and denote by n ℓ the sequence of integers that are coprime to m .We find immediately that n ℓ distributes regularly within residue classes and that c n ℓ ( m ; h ) fulfills (10). Furthermore, (11) is an immediate consequence of Proposition 7.6. Thus, wecan apply for any b i Theorem 6.4 both for the subsequence along P and along n ℓ .A simple computation shows that c P ( r ; k λ ) = c n ℓ ( r ; k λ ) = ( r,k )=1 ϕ ( k ) k λ − and c P ( r ; d i ) = c n ℓ ( r ; d i ) = ( r,d i )=1 ϕ ( d i ) . This shows immediately that d ( b i ( p n ) , α ) = d ( b i ( n ℓ ) , α ) for all ≤ i ≤ s . The result followsnow directly from equation (6). (cid:3) We remark that Theorem 1.4 can be also used to observe zero densities. Namely, we have d log ( a ( mn + r ) , α ) = 0 if and only if d log ( a ( p n ) , α ) = 0 for all r with ( r, m ) = 1 .8. The subsequence along squares The goal of this section is to compute the density of primitive automatic sequences alongsquares. There are already some interesting results in this direction that we want to mentionhere. The first and ground-breaking result is due to Mauduit and Rivat [20], where theyshowed that the Thue-Morse sequence takes values and with density along squares.This result relies on L estimates of the Fourier-Transform and is thus not possible to ex-tend to general automatic sequences. However, it was generalized to invertible automaticsequences by Drmota and Morgenbesser [11]. Moreover, there are results about the densityof blocks along squares (i.e. normality) for the Thue-Morse sequence by Drmota, Mauduitand Rivat [10] and, more generally, strongly block-additive functions mod m by the lastauthor [25].Finally, and most important for this section, there is a new result by Mauduit and Rivat [23]which gives density results along squares, for all functions satisfying the Carry-Property andthe Fourier-Property (again in the stricter sense). In particular, they only consider complex-valued sequences f , and a stronger Carry-Property, i.e. η = 1 .The main result of this section is the following theorem. Theorem 8.1. Let a ( n ) be a prolongable and primitive automatic sequence. With the nota-tion from (8) , we write a ( n ) = f ( s ( n ) , T ( n )) . Then there exist the densities d q = d ( s ( n ) , q ) and d g = d ( T ( n ) , g ) . Furthermore, we have d ( a ( n ) , α ) = X q ∈ Q,g ∈ G d q · d g · [ f ( q,g )= α ] . Naturally, the idea is to apply Theorem 6.4 for the subsequence n ℓ = ℓ . Thus, the proofsplits into two parts. We first aim to show (10) and then (11). LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 25 Synchronizing automatic sequence along squares. The main result of this sub-section is the following proposition. Proposition 8.2. The subsequence along squares distributes regularly within residue classesand fulfill (10) . We first observe that c ( m ; h ) := { ≤ x < h : x ≡ m mod h } h . This already shows that the subsequence along squares distributes regularly within residueclasses by the Chinese Remainder Theorem. It thus remains to prove (10).As c ( m ; h ) is multiplicative in the second coordinate, we are interested in c ( m ; p α ) , where p is a prime. We will use the following results which follow directly from Hensel’s Lemma. Lemma 8.3. Let p be an odd prime and α ≥ . Then we have for m p α and any ℓ ≥ , c ( m ; p α + ℓ ) = c ( m ; p α ) p ℓ . Furthermore, if α ≥ , m p α − , then for any ℓ ≥ , c ( m ; 2 α + ℓ ) = c ( m ; 2 α )2 ℓ . Corollary 8.4. Let k = p α · . . . · p α s s , where p i ∈ P . Let λ ∈ N and a such that for all i , m p λα i − i . Then, c ( m ; k λ + ℓ ) = c ( m ; k λ ) k ℓ for all ℓ ≥ . We are now ready to prove Proposition8.2. Proof of Proposition 8.2. This will allow us to show the following result. lim λ →∞ X m The main result ofthis section is the following theorem. Theorem 8.5. Let γ : R → R be a nondecreasing function satisfying lim λ →∞ γ ( λ ) = ∞ , andlet f : N → U d be a function satisfying Definition 7.1 for some η > and f ∈ F γ,c for some c ≥ in Definition 7.2. Then for any θ ∈ R , we have (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) X For all z , . . . , z N being complex d × d matrices and all integers k ≥ and R ≥ , we have (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) X ≤ n ≤ N z n (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) F ≤ N + kR − kR X ≤ n ≤ N k z n k F + 2 X ≤ r LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 27 Lemma 8.7. Let f : N → U d satisfying Definition 7.1, and let ( ν, κ, ρ ) ∈ N with ρ < ν <κ < ν + 2 ρ . The set E of n ∈ { k ν − , . . . , k ν − } such that there exists ℓ ∈ { , . . . , k κ − } with f ( n + k ) H f ( n ) = f κ + ρ ( n + k ) H f κ + ρ ( n ) satisfies card E ≪ card f,k k ν − ηρ . The proof stays essentially unchanged, but it will be important later that one takes thehermitian of f ( n + ℓ ) instead of f ( n ) .For Lemma 8 we only need to change the final conclusion to card E ≪ f,k k ν − η ( ν − ν ) + k ν + ν − ν log( k ν ) k − η ( ν − ν ) . We are now ready to tackle the estimate of S := X N/ The next more substantial change has to be made to Lemma 9, where the final estimateneeds to be replaced by X ≤ h Finishing the proof of Theorem 8.1 and Theorem 1.3. We have already seen that n distributes regularly within residue classes and that c n ( m ; h ) satisfies (10). It remains toapply Theorem 8.5 to the function f ( n ) = D ( T ( n )) for unitary and irreducible representations D different from D j . Again the factor e( nθ ) can be used to detect the residue of n modulo k λ .Thus, we can apply Theorem 6.4 to the subsequence along squares, which gives immediatelyTheorem 8.1.The main part of Theorem 1.3 is now an immediate consequence of Theorem 1.1. It willjust remain to prove that when the input base k is prime, then the densities are computablerational numbers.9. Computability of densities along subsequences We first start with the primitive and prolongable case.9.1. Densities of primitive automatic sequences. We use this section to recall a classicalresults about densities of pure, primitive and prolongable k -automatic sequences. Therefore,we need the following definition. Definition 9.1. Let A = ( Q, { , . . . , k − } , δ, q ) be a DFA, where Q = { q , q , . . . , q d } . Wedefine the incidence matrix M = M ( A ) as follows: M = ( m i,j ) ≤ i,j ≤ d , where m i,j = |{ ≤ w < k : δ ( q j , w ) = q i }| .One sees directly that P ≤ i ≤ d m i,j = k for all ≤ j ≤ d . Thus one has that (1 , , . . . , isa left-eigenvector assoziated with the eigen-value k . It turns out that the right-eigenvectorassociated to the eigenvalue k describes the densities. Theorem 9.2 (Theorem 8.4.7 and 8.4.5 of [1]) . Let ( a ( n )) n ≥ be a pure and primitive k -automatic sequence with incidence matrix M , as in Definition 9.1. Moreover, let v = LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 29 ( v , . . . , v d ) T be the positive normalized right-eigenvector of M associated with the eigenvalue k . Then d ( a ( n ) , q i ) = v i ∈ Q > , for all ≤ i ≤ d . Example 9.3. We discuss the paperfolding sequence with respect to Theorem 9.2. Thetransition diagram of the paperfolding sequence is given below. a/ start b/ c/ d/ 10 100 1 10 Thus, we find that the transition matrix is given by M = , with the unique normalized eigenvector (1 / , / , / , / T assoziated with the eigenvalue and consequently, both the value and have density / .9.2. Primitive automatic sequences along primes. We recall here how to explicitlycompute the densities of primitive automatic sequences along primes. We only consider thecase when a is pure as the general case follows immediately. Therefore, let ( a ( n )) n ≥ bea primitive and prolongable k -automatic sequence. Next we consider the (explicitly com-putable) decomposition in (8), i.e. a ( n ) = f ( s ( n ) , T ( n )) , where s ( n ) is a pure synchronizingautomatic sequence and T ( n ) takes values in a finite group G . Then we computed d = d ( a ) .Thus, we know by Theorem 1.4 that d ( a ( p n ) , α ) = 1 ϕ ( m ) X r We continue the discussion of the paper-folding sequence from Example 9.3.We see directly, that the paper-folding sequence is synchronizing. Thus, T ( n ) = id and G = { id } are trivial and m = k = 2 as d = 1 .Thus, we need to consider the -compression of a ( n ) . The corresponding transition diagramis given below, ( a, b ) start ( c, b )( a, d ) ( c, d ) 10 100 1 10 We note that this is basically the same transition diagram as for the original paper-foldingsequence. Thus, the density of every state is again / . However, now we need to considerthe projection to the first coordinate which shows that the density of b and d are / andthe density of a and c are . Thus we conclude that the density of the symbols and inthe subsequence of the paperfolding sequence along the primes are / .9.3. Primitive automatic sequences along squares. For the sake of simplicity we onlyconsider the case, where the base k is prime. The general case is much more technical, butthe densities can be computed explicitly by Theorem 6.4 even if it is not clear whether theywill be rational. Theorem 9.5. Let k be a power of a prime number and a ( n ) a primitive and prolongable k -automatic sequence. Then the density along squares is rational.Proof. As d ( T ( n ) , g ) = d | G | · c ( j ; d ) ∈ Q for g ∈ G j , we see that we only need to consider thesynchronizing part, i.e. we need to show that lim λ →∞ X m LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 31 that we can ignore m = 0 as c (0; k λ +1 ) = k − λ − → . Then we rewrite m = m ′ k µ +1 + m ′ k µ for some m ′ = 0 and ≤ µ ≤ λ . Since k is assumed to be prime, we have by Lemma 8.3that c ( m ; k λ +1 ) = c ( m ′ k µ ; k µ +1 ) k λ − µ . We can also determine c ( m ′ k µ ; k µ +1 ) quite easily, as x ≡ m ′ k µ mod k µ +1 if and only if x = x ′ k µ +1 + x ′ k µ where ( x ′ ) ≡ m ′ mod k . Thus we have that c ( m ′ k µ ; k µ +1 ) = 2 /k µ +1 if m ′ is a quadratic residue modulo k and otherwise. So we are left with d ( s ( n ) , q ) = lim λ →∞ X m We discuss again the paperfolding sequence with respect to Theorem 9.5.We first discuss the automatic sequence without the projection and call it s ′ . As thepaperfolding sequence (and s ′ ) is -automatic, we have to apply (21). We also see that δ ( q, b for all q ∈ Q . Thus, only q = b gives a positive contribution and clearly P q ∈ Q d ( s ′ ( n ) , q ) = 1 . This gives d ( s ′ ( n ) , q ) = 12 X µ ≥ µ [ δ ( b, (0) µ ) = q ] . Moreover, we have δ ( b, 00) = a, δ ( a, 00) = a . So that only a, b have a positive density alongsquares: d ( s ′ ( n ) , a ) = 12 X µ ≥ µ = 12 ,d ( s ′ ( n ) , b ) = 12 X µ =0 µ = 12 . As both a and b are projected to , we find that the density of in the paperfolding sequencealong squares is .9.4. Logarithmic densities of general automatic sequences. We focus in this sectionon how to compute the logarithmic density of automatic sequences (in particular of the M i in Proposition 4.1). There is for example an explicit formula in [1], namely Theorem 8.4.8(and Corollary 8.4.9). However, this one is rather hard to use in practical terms. There isalso a (slightly vague) description in a presentation by Bell [2]. We can find a very similar(if not identical) description as in [2]:We note that for each of the M i in Proposition 4.1 we have that if m ∈ M i then also mk λ + r ∈ M i for all λ ≥ , ≤ r < k λ . Thus, we let S i denote the set of integers that"generate" M i , i.e. S i := { m ∈ M i : m ∈ M i , λ ≥ , ≤ r < k λ with m = m k λ + r } . The output is then on the alphabet a, b, c, d . LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 33 This allows us to decompose M i into a disjoint union, M i = [ m ∈ S i { mk λ + r : λ ≥ , ≤ r < k λ } . A simple computation shows d log ( { mk λ + r : λ ≥ , ≤ r < k λ } ) = lim L →∞ mk L ) X ≤ λ We consider the following -automatic sequence that is if the base expan-sion starts with . . . and otherwise. The corresponding automaton is given below. a/ start b/ c/ d/ 10 2 120 0,1,20,1,2 We have that b ( n ) = 0 and b ( n ) = 1 for all n ≥ . Moreover one finds that S = { λ + 1 : λ ≥ } .Thus one has d log ( M ) = 1log(3) X λ ≥ log (cid:18) λ + 1 (cid:19) = 1log(3) log Y λ ≥ (cid:18) λ + 1 (cid:19)! . We end this section with another example that was already discussed in [24] for which thedensity along primes does not exist. Example 9.8. We consider the following automaton and the corresponding automatic se-quence ( a ( n )) n ∈ N . a start b c It follows by the discussion in [24] that a ( n ) = b holds in exactly two cases: • n is even and the first digit of n in base is , • n is odd and the first digit of n in base is .One finds easily that the a ( n ) is equally distributed on { b, c } , i.e. d ( a ( n ) , b ) = d ( a ( n ) , c ) =1 / . But as discussed in [24] the density of b and c do not exist along primes.Now how does this example work in light of Theorem 1.2 (and Proposition 4.1)? We firstfind a decomposition as in Proposition 4.1. Therefore, let b ( n ) = (cid:26) b, if n is odd ,c otherwise , b ( n ) = (cid:26) c, if n is odd ,b otherwise , and M i ( i = 1 , ) denotes the set of integers for which the first digit in base is i . Onefinds directly by the discussion above that this choice satisfies Proposition 4.1. As all primenumbers (except ) are odd we have directly d ( b ( p n ) , b ) = d ( b ( p n ) , c ) = 1 and d ( b ( p n ) , c ) = d ( b ( p n ) , b ) = 0 . Moreover, we see that S = { } and S = { } . Thus we see by (22) that d log ( M ) = log(2) / log(3) and d log ( M ) = (log(3) − log(2)) / log(3) . This shows with (6) that d log ( a ( p n ) , b ) = log(2)log(3) · − log(2)log(3) · . Appendix A. Implications for dynamical systems The decomposition of an automatic sequence in primitive and prolongable automatic se-quences in Proposition 4.1 has an interesting counterpart in the world of dynamics. We startoff with a short introduction to dynamical systems associated with sequences.There is a long history for considering dynamical systems associated with sequences (see forexample [26], which is especially concerned with automatic sequences). We first define the language of a sequence u = ( u ( n )) n ∈ N (or Z instead of N ) taking valuesin a finite alphabet A as L ( u ) := { u ( m ) · · · u ( n ) : m ≤ n } , In this context one works with substitutions of constant length instead of automata. However, we willtry to avoid introducing different concepts if not strictly necessary. LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 35 i.e. the language is the set of all non-empty factors of u . Then we can associate a compactset with this sequence, X u := { x ∈ A Z : L ( x ) ⊆ L ( u ) } = { ( u ( n + ℓ )) n ∈ N : ℓ ∈ N } . That is the minimal compact set containing u , that is closed under the shift T , where T (( x ( n )) n ∈ N := ( x ( n + 1)) n ∈ N . Therefore, ( X u , T ) it is a canonical candidate to consider, when one wants to use methodsor ideas coming from dynamical systems.It proved to be useful to consider two-sided sequences ( Z ) instead of one-sided sequences ( N )for the case when u is an automatic sequence.We can make ( X u , T ) a topological dynamical system by using the metric d ( x, y ) = X n ≥ n +2 ( d n ( x n , y n ) + d − n ( x − n , y − n )) , where d n denotes the discrete metric on A .We can also consider a measure-theoretic dynamical system , i.e. ( X u , B , µ, T ) where ( X, B , µ ) is a standard Borel probability space and T : X u → X u is an a.e. bijection which isbimeasurable and measure-preserving. We call ( X u , B , µ, T ) ergodic if for every E ∈ B with T − ( E ) = E follows either µ ( E ) = 0 or µ ( E ) = 1 .Each homeomorphism T of a compact metric space X determines many (measure-theoretic)dynamical systems ( X, B ( X ) , µ, S ) with µ ∈ M ( X, S ) , where M ( X, T ) stands for the set ofBorel probability measures on X ( B ( X ) stands for the σ -algebra of Borel sets of X ). Recallthat by the Krylov-Bogolyubov theorem, M ( X, T ) = ∅ , and moreover, M ( X, T ) endowedwith the weak- ∗ topology becomes a compact metrizable space. The set M ( X, T ) has anatural structure of a convex set (in fact, it is a Choquet simplex) and its extremal pointsare precisely the ergodic measures. We say that the topological system ( X, T ) is uniquelyergodic if it has only one invariant measure (which must be ergodic). The system ( X, T ) is called minimal if it does not contain a proper subsystem (equivalently, the orbit of eachpoint is dense). Furthermore, a point x ∈ X is called an almost periodic point if for anyneighborhood U of x there exists N ∈ N such that { T n + i ( x ) : i = 0 , . . . , N } ∩ U = ∅ , for all n ∈ N .It is a classical result that if u is a primitive and prolongable automatic sequence, then ( X u , T ) is strictly ergodic , that is minimal and uniquely ergodic. Moreover, every point x ∈ X u isalmost periodic. Lemma A.1. Assume that ( X, T ) is a topological dynamical system and let x be an almostperiodic point and y ∈ X for which d ( T j n x, T i n y ) → when n → ∞ . Then { T k x : k ∈ Z } ⊂{ T k y : k ∈ Z } .Proof. By passing to a subsequence T j ns x → x ′ and T i ns y → y ′ , where necessarily x ′ = y ′ .This shows that the intersection of the closures of the two orbits is non-empty, so the claimfollows from minimality of the orbit closure of x . (cid:3) Remark A.2. The condition d ( T j n x, T i n y ) → when n → ∞ is equivalent to the fact that x and y have arbitrarily long common subwords. Corollary A.3. With the notation of Proposition 4.1, we have that X b i ⊂ X a for all i .Furthermore, we have for all i, j , either X b i = X b j or X b i ∩ X b j = ∅ .Proof. It follows from Proposition 4.1 that a and b i coincide on arbitrarily long intervals.Thus the condition of Lemma A.1 is fulfilled and the desired result follows. The secondresult follows easily as both X b i , X b j are minimal. (cid:3) Proposition A.4. Each automatic sequence a yields a subshift X a which has only finitelymany minimal components. They are given by the X b i .Proof. This is in its essence only a reformulation of Proposition 2.2 in [4]. However, weprovide nevertheless a proof as it highlights important ideas for the proof of Proposition A.5.First we note that there exists some ℓ ∈ N such that every consecutive ℓ integers containan integer n / ∈ M , as otherwise the upper Banach density of M would be . Let us nowassume that z is an almost periodic point in X a . Fix K = k λ ( ℓ + 2) ≥ for some λ (we willlater let λ → ∞ ) and we find z (0) z (1) · · · z ( K ) = a ( L ) a ( L + 1) · · · a ( L + K ) , for some L ∈ N as L ( z ) ⊂ L ( a ) .We find by our definition of K that I = [ L/k λ , ( L + K ) /k λ − contains at least ℓ consecutiveintegers, so that there exists n ∈ I with n / ∈ M . Thus, we have n ∈ M i for some i ≥ and by the properties of M i also that n k λ + r ∈ M i for all ≤ r < k λ .Thus we find that for every λ ∈ N there exists some i ≥ such that z and b i have a commonsubword of length k λ . As there are only finitely many b ′ i s there has to exist some i ≥ suchthat z and b i have arbitrarily long common subwords and we can apply Lemma A.1. Thisshows that { T k ( z ) : k ∈ Z } = { T k ( b i ) : k ∈ Z } as both z and b i are almost periodic. (cid:3) Proposition A.5. The only ergodic measures in X a are given by the unique measures deter-mined by X b i ( i ≥ ). (In other words the ergodic decomposition is in a sense a decompositioninto minimal components.)Proof. Indeed, if z is a generic point for an ergodic measure ν then similarly to the proofof Proposition A.4 we let K = ( ℓ + 2) · k λ , where we let this time both ℓ → ∞ and λ → ∞ .We find by the same reasoning as before that z (0) z (1) . . . z ( K ) = a ( L ) a ( L + 1) . . . a ( L + K ) , for some L ∈ N and find that I = [ L/k λ , ( L + K ) /k λ − contains at least ℓ consecutiveintegers. As the upper Banach density of M is zero, we know that the proportion of integersin I that do belong to M tend to as ℓ → ∞ . Thus, we can cover [ L, K ] by blocks of the b i of length k λ (up to a small proportion). It follows that ν is supported by the union ofsupports of the unique measures given by the b i ’s. Since ν has to be positive on some X b i .As there is only one ergodic measure on X b i it follows that ν has to coincide with it. (cid:3) A point x is called generic for a measure ν if lim n →∞ n P n − i =0 f ( T i ( x )) = R X f dν holds for all f ∈ C ( X ) ,whose existence is guaranteed by the ergodic Theorem. LOGARITHMIC) DENSITIES FOR AUTOMATIC SEQUENCES ALONG PRIMES AND SQUARES 37 Remark A.6. Proposition A.4 and Proposition A.5 show that the ergodic decomposition ofinvariant measures of dynamical systems associate with automatic sequences actually corre-sponds to the decomposition of the topological dynamical system into minimal components.Lastly, we give a short application of this decomposition. Corollary A.7. The subshift ( X a , S ) generated by any automatic sequence a is orthogonalto any bounded multiplicative aperiodic function.Proof. We take any point y ∈ X a and suppose that it is quasi-generic for a measure ν .Its ergodic decomposition consists of finitely many measures, each of which yields a system ( X b i , T ) which satisfies the strong MOMO property by [19, Lemma 8.1]. So the result followsfrom a general theory (see for example [17, Theorem 4.1]). (cid:3) References 1. J.-P. Allouche and J. Shallit. Automatic Sequences. Theory, Applications, Generalizations. Cambridge:Cambridge University Press, 2003.2. J. Bell. Automatic sequences, logarithmic density, and fractals. .3. N. H. Bingham, C. M. Goldie, and J. L. Teugels. Regular variation , volume 27 of Encyclopedia of Math-ematics and its Applications . Cambridge University Press, Cambridge, 1987.4. J. Byszewski, J. Konieczny, and E. Krawczyk. Substitutive systems and a finitary version of cobham’stheorem. to appear in Combinatorica , 2019.5. J. Byszewski, J. Konieczny, and C. Müllner. Gowers norms for automatic sequences. preprintarXiv:2002.09509 , 2020.6. A. Cobham. Uniform tag sequences. Math. Systems Theory , 6:164–192, 1972.7. J.-M. Deshouillers, M. Drmota, and J. F. Morgenbesser. Subsequences of automatic sequences indexedby ⌊ n c ⌋ and correlations. J. Number Theory , 132(9):1837–1866, 2012.8. J.-M. Deshouillers, M. Drmota, and C. Müllner. Automatic Sequences generated by synchronizing au-tomata fulfill the Sarnak conjecture. Studia Mathematica , 231:83–95, 2015.9. M. Drmota, C. Mauduit, and J. Rivat. The sum-of-digits function of polynomial sequences. J. Lond.Math. Soc. , 84(1):81–102, 2011.10. M. Drmota, C. Mauduit, and J. Rivat. Normality along squares. J. Eur. Math. Soc. (JEMS) , 21(2):507–548, 2019.11. M. Drmota and J. F. Morgenbesser. Generalized Thue-Morse sequences of squares. Israel J. Math. ,190:157–193, 2012.12. S. Ferenczi, J. Kułaga-Przymus, and M. Lemańczyk. Sarnak’s conjecture: What’s new. Ergodic Theoryand Dynamical Systems in their Interactions with Arithmetics and Combinatorics , Jan. 2018.13. N. Frantzikinakis and B. Host. The logarithmic sarnak conjecture for ergodic weights. Annals of Mathe-matics , 187(3):869–931, 2018.14. A. Gelfond. Sur les nombres qui ont des propriétés additives et multiplicatives données. Acta Arith. ,13:259–265, 1967/1968.15. A. Gomilko, D. Kwietniak, and M. Lemańczyk. Sarnak’s conjecture implies the chowla conjecture alonga subsequence. Ergodic Theory and Dynamical Systems in their Interactions with Arithmetics and Com-binatorics , Jan. 2018.16. H. Iwaniec and E. Kowalski. Analytic number theory , volume 53. American Mathematical Soc., 2004.17. A. Kanigowski, M. Lemańczyk, and M. Radziwiłł. Rigidity in dynamics and Möbius disjointness. preprintarXiv:1905.13256 , 2019.18. L. Kuipers and H. Niederreiter. Uniform distribution of sequences . Wiley-Interscience [John Wiley &Sons], New York-London-Sydney, 1974. Pure and Applied Mathematics.19. M. Lemańczyk and C. Müllner. Automatic sequences are orthogonal to aperiodic multiplicative functions. preprint arXiv:1811.00594 , 2018. 20. C. Mauduit and J. Rivat. La somme des chiffres des carrés. Acta Math. , 203(1):107–148, 2009.21. C. Mauduit and J. Rivat. Sur un problème de Gelfond : la somme des chiffres des nombres premiers. Ann. of Math. (2) , 171(3):1591–1646, 2010.22. C. Mauduit and J. Rivat. Prime numbers along Rudin-Shapiro sequences. J. Eur. Math. Soc. (JEMS) ,17(10):2595–2642, 2015.23. C. Mauduit and J. Rivat. Rudin-Shapiro sequences along squares. Trans. Amer. Math. Soc. , 370(11):7899–7921, 2018.24. C. Müllner. Automatic sequences fulfill the Sarnak conjecture. Duke Math. J. , 166(17):3219–3290, 2017.25. C. Müllner. The Rudin-Shapiro sequence and similar sequences are normal along squares. Canad. J.Math. , 70(5):1096–1129, 2018.26. M. Queffélec. Substitution dynamical systems. Spectral analysis. 2nd ed. Linear Representations of Finite Groups . Springer-Verlag, New York-Heidelberg, 1977. Trans-lated from the second French edition by Leonard L. Scott, Graduate Texts in Mathematics, Vol. 42.29. T. Tao. The logarithmically averaged chowla and elliott conjectures for two-point correlations. In Forumof Mathematics, Pi , volume 4. Cambridge University Press, 2016.30. T. Tao. Equivalence of the logarithmically averaged chowla and sarnak conjectures. In Number Theory–Diophantine Problems, Uniform Distribution and Applications , pages 391–421. Springer, 2017.31. T. Tao and J. Teräväinen. Odd order cases of the logarithmically averaged chowla conjecture.