This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

11institutetext: Laboratoire de Combinatoire et d’Informatique Mathématique,
Université du Québec à Montréal, Montréal (QC), Canada,
11email: [email protected], [email protected]
22institutetext: Institute for Advanced Study in Mathematics
Harbin Institute of Technology, Harbin, PR China
22email: [email protected]

Block-counting sequences are not purely morphic

Antoine Abram 11 Yining Hu 22 Shuo Li 11
Abstract

Let mm be a positive integer larger than 11, let ww be a finite word over {0,1,,m1}\left\{0,1,...,m-1\right\} and let am;w(n)a_{m;w}(n) be the number of occurrences of the word ww in the mm-expansion of nn mod pp for any non-negative integer nn. In this article, we first give a fast algorithm to generate all sequences of the form (am;w(n))n𝐍(a_{m;w}(n))_{n\in\mathbf{N}}; then, under the hypothesis that mm is a prime, we prove that all these sequences are mm-uniformly but not purely morphic, except for w=1,2,,m1w=1,2,...,m-1; finally, under the same assumption of mm as before, we prove that the power series i=0am;w(n)tn\sum_{i=0}^{\infty}a_{m;w}(n)t^{n} is algebraic of degree mm over 𝔽m(t)\mathbb{F}_{m}(t).

1 Introduction, definitions and notation

Given a positive integer mm larger than 11 and a finite word ww over {0,1,2,,m1}\left\{0,1,2,...,m-1\right\}, the block-counting sequence (em;w(n))n𝐍(e_{m;w}(n))_{n\in\mathbf{N}} counts the number of occurrences of the word ww in the mm-expansion of nn for each non-negative integer nn. Let us define (am;w(n))n𝐍(a_{m;w}(n))_{n\in\mathbf{N}} to be a sequence over {0,1,2,,m1}\left\{0,1,2,...,m-1\right\} such that am;w(n)em;w(n)mod(m)a_{m;w}(n)\equiv e_{m;w}(n)\mod(m) for all non-negative integer nn. The analytical as well as the combinatorial properties of these sequences have been studied since 1900’s after Thue and some well-known sequences are strongly related to this notion. Recall that the 0,10,1-Thue-Morse sequence can be defined as (a2;1(n))n𝐍(a_{2;1}(n))_{n\in\mathbf{N}} (see, for example, Page 15 in [4]) and the 0,10,1-Rudin-Shapiro sequence can also be defined as (a2;11(n))n𝐍(a_{2;11}(n))_{n\in\mathbf{N}} (see, for example, Example 3.3.1 in [4]). In this article, we review some common properties of usual block-counting sequences and generalize them to all block-counting sequences.

To be able to announce our results, here we recall some definitions and notation. Let AA be a finite set. It will be called an alphabet and its elements will be called letters. Let AA^{*} denote the free monoid generated by AA under concatenations and let A𝐍A^{\mathbf{N}} denote the set of infinite concatenations of elements in AA. Let A=AA𝐍A^{\infty}=A^{*}\cup A^{\mathbf{N}}. A finite word over the alphabet AA is an element in AA^{*} and an infinite word over AA is an element in A𝐍A^{\mathbf{N}}. Particularly, the empty word is an element in AA^{*} and it is denoted by ϵ\epsilon. The length of a word ww, denoted by |w||w|, is the number of letters that it contains. The length of the empty word is 0 and the length of any infinite word is infinite. For any non-empty word wAw\in A^{\infty}, it can be denoted by w[0]w[1]w[2]w[0]w[1]w[2]..., where w[i]w[i] are elements in AA. A word xx is called a factor of ww if there exist two integers 0ij|w|10\leq i\leq j\leq|w|-1 such that x=w[i]w[i+1]w[j]x=w[i]w[i+1]...w[j], this factor can also be denoted by w[i..j]w[i..j]. A factor xx is called a prefix (resp. a suffix ) of the word ww if there exists a positive integer ii such that 0i|w|0\leq i\leq|w| and x=w[0..i]x=w[0..i] (resp. x=w[i..|w|1]x=w[i..|w|-1]). For any finite word ww and any positive integer nn, let wnw^{n} denote the concatenation of nn copies of ww, i.e. wn=wwww^{n}=ww...w nn times. Particularly, w0=ϵw^{0}=\epsilon. For any pair of words w,vw,v such that vv is a factor of ww, let |w|v|w|_{v} denote the number of occurrences of vv in ww.

Let AA and BB be two alphabets, a morphism ϕ\phi from AA to BB is a map from AA^{\infty} to BB^{\infty} satisfying ϕ(xy)=ϕ(x)ϕ(y)\phi(xy)=\phi(x)\phi(y) for any pair of elements x,yx,y in AA^{\infty}. The morphism ϕ\phi is called kk-uniform if for all elements aAa\in A, |ϕ(a)|=k|\phi(a)|=k and it is called non-uniform otherwise. A morphism ϕ\phi is called a coding function if it is 11-uniform and it is called non-erasing if ϕ(a)ϵ\phi(a)\neq\epsilon for all aAa\in A.

Let AA be a finite alphabet and let (an)n𝐍(a_{n})_{n\in\mathbf{N}} be an infinite sequence over AA, it is called morphic if there exists an alphabet BB, an infinite sequence (bn)n𝐍(b_{n})_{n\in\mathbf{N}} over BB, a non-erasing morphism ϕ\phi from BB^{\infty} to BB^{\infty} and a coding function ψ\psi from BB^{\infty} to AA^{\infty}, such that (bn)n𝐍(b_{n})_{n\in\mathbf{N}} is a fixed point of ϕ\phi and (an)n𝐍=ψ((bn)n𝐍)(a_{n})_{n\in\mathbf{N}}=\psi((b_{n})_{n\in\mathbf{N}}). Moreover, the sequence (an)n𝐍(a_{n})_{n\in\mathbf{N}} is called uniformly morphic if ϕ\phi is kk-uniform for some integer kk, and it is called non-uniformly morphic otherwise. The sequence (an)n𝐍(a_{n})_{n\in\mathbf{N}} is called purely morphic if A=BA=B and ψ=Id\psi=Id.

For any positive integer mm, let [[m]]={0,1,2,,m1}[\![m]\!]=\left\{0,1,2,...,m-1\right\}. For any t[[m]]t\in[\![m]\!] let t+t+1modmt^{+}\equiv t+1\mod m; for any w[[m]]w\in[\![m]\!]^{*}, let w+=w[0]+w[1]+w[|w|1]+w^{+}=w[0]^{+}w[1]^{+}...w[|w|-1]^{+}.

In Section2, we give a fast algorithm to generate all block-counting sequences. It is well-known that the Thue-Morse sequence can be generated by the following algorithm (see, for example, [12, A008277]):

Example 1

Let (wn)n𝐍(w_{n})_{n\in\mathbf{N}} be a sequence of words over the [[2]][\![2]\!]^{*} such that w0=0w_{0}=0 and that wi+1=wiwi+w_{i+1}=w_{i}w_{i}^{+} for all ii, then the Thue-Morse sequence (a2;1(n))n𝐍(a_{2;1}(n))_{n\in\mathbf{N}} satisfies (a2;1(n))n𝐍=limiwi(a_{2;1}(n))_{n\in\mathbf{N}}=\lim_{i\to\infty}w_{i}.

In Section2, we prove that the Rudin-Shapiro sequence can also be generalized by a similar algorithm, see 4. More generally, we find fast algorithms to generate all block-counting sequences. These algorithms are given by 3 and 5 in Section2.

From the definitions recalled as above, any morphic word can be classified as either a uniformly morphic word or a non-uniformly morphic word. However, from a recent article [5], Allouche and Shallit proved that all uniformly morphic sequences are also non-uniformly morphic. This result implies that all sequences in the family of morphic sequences are also in its subfamily of non-uniformly morphic sequences. Indeed, many works can be found in the literature in the direction of characterizing all those non-uniformly morphic sequences which are not uniformly morphic, for example, one can find [2][13][7][1][8][9][6]. However, in [5], it is proved actually that all uniformly morphic sequences are also non-uniformly non-purely morphic. In other words, from the construction of the proof given in [5], a nontrivial coding function is required. In Section 3, we investigate all those uniformly morphic sequences which are not purely morphic. It is already known that the Rudin-Shapiro sequence is in this case (Example 26 in [3]). In section 3, we prove that all other sequences in the form of (am,w(n))n𝐍(a_{m,w}(n))_{n\in\mathbf{N}} have the same property when |w|1|w|\neq 1 and mm is a prime. The result is announced as follows:

Theorem 2

Let pp be a prime number and w[[p]]w\in[\![p]\!]^{*}. The sequence (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} is a pp-uniformly morphic. Moreover, if |w|=1|w|=1 and w0w\neq 0, this sequence is purely morphic and if not is it non-purely morphic.

In Section 4, under the assumption that pp is a prime number, we prove that the formal power series fp;w=i=0am;w(n)tnf_{p;w}=\sum_{i=0}^{\infty}a_{m;w}(n)t^{n} is algebraic and of degree pp over 𝔽p(t)\mathbb{F}_{p}(t). Indeed, from Christol’s theorem [11], we know that the power series fp;wf_{p;w} is algebraic over 𝔽p(t)\mathbb{F}_{p}(t). In Section 4, we prove that ff is algebraic of degree pp.

2 Windows functions and (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}}

For any positive integer mm and non-negative integer nn, let [n]m[n]_{m} denote the expansion of nn in the base mm. For a given word w[[m]]={0,1,,m1}w\in[\![m]\!]^{*}=\{0,1,\cdots,m-1\}^{*}, w=w[0]w[1]w[|w|1]w=w[0]w[1]...w[|w|-1], let (w)m=i=0|w|1w[i]m|w|1i(w)_{m}=\sum_{i=0}^{|w|-1}w[i]m^{|w|-1-i} and let w=w[1]w[2]w[|w|1]w^{\prime}=w[1]w[2]\cdots w[|w|-1]. A word ww is called a xx-word if w[0]=xw[0]=x. For a given string ww, let αw=(w)mm|w|1\alpha_{w}=\frac{(w^{\prime})_{m}}{m^{|w|-1}}, βw=(w)m+1m|w|1\beta_{w}=\frac{(w^{\prime})_{m}+1}{m^{|w|-1}} and let ϕw:[[m]][[m]]\phi_{w}:[\![m]\!]^{*}\to[\![m]\!]^{*} be a function such that for any v[[m]]v\in[\![m]\!]^{*}, ϕw(v)\phi_{w}(v) satisfies the following propriety:

ϕw(v)[i]={v[i]+1modmif αw|v|i<βw|v|v[i]otherwise.\phi_{w}(v)[i]=\begin{cases}v[i]+1\!\mod\!m\;\;\text{if }\alpha_{w}|v|\leq i<\beta_{w}|v|\\ v[i]\;\;\;\text{otherwise}.\end{cases}

2.1 Block-counting sequences for non-0-words

Proposition 3

Let mm a positive number, let x[[m]]\{0}x\in[\![m]\!]\backslash\{0\}, let w[[m]]w\in[\![m]\!]^{*} be a xx-word and let t=(v)mt=(v)_{m}. If we let (ui)i(u_{i})_{i\in\mathbb{N}} be a sequence of words such that |u0|=m|w||u_{0}|=m^{|w|}, that

u0[i]={1if i=t0otherwise,u_{0}[i]=\begin{cases}1\;\;\text{if i=t}\\ 0\;\;\;\text{otherwise},\end{cases}

and that uk+1=ukxϕw(uk)ukmx1u_{k+1}=u_{k}^{x}\phi_{w}(u_{k})u_{k}^{m-x-1}, then limkuk=(am;w(n))n\lim_{k\to\infty}u_{k}=(a_{m;w}(n))_{n\in\mathbb{N}}.

Proof

First, it is obvious that u0u_{0} is a prefix of (am;w(n))n𝐍(a_{m;w}(n))_{n\in\mathbf{N}}. Now let y[[m]]\{0}y\in[\![m]\!]\backslash\{0\}. For any integers rr and mkm^{k} such that 0r<mk0\leq r<m^{k}, 0em;w(r+ymk)em;w(r)10\leq e_{m;w}(r+ym^{k})-e_{m;w}(r)\leq 1. Indeed, since y0y\neq 0, [r+ymk]m=y0..0[r]m[r+ym^{k}]_{m}=y0..0[r]_{m}, thus, [r+ymk]m[r+ym^{k}]_{m} has exactly one more xx-factor of length |v||v| than [r]p[r]_{p} only if y=xy=x, and this factor can be ww or not. Moreover, em;w(r+ymk)em;w(r)=1e_{m;w}(r+ym^{k})-e_{m;w}(r)=1 only if ww is a prefix of [r+ymk]m[r+ym^{k}]_{m}. Consequently, em;w(r+ymk)=em;w(r)+1e_{m;w}(r+ym^{k})=e_{m;w}(r)+1 only if αwmkr<βwmk\alpha_{w}m^{k}\leq r<\beta_{w}m^{k} and y=xy=x. Hence, for any t[[m]]\{x}t\in[\![m]\!]\backslash\{x\},

(am;w(n))tmkn<(t+1)mk\displaystyle(a_{m;w}(n))_{tm^{k}\leq n<(t+1)m^{k}} =(am;w(n))0n<mk\displaystyle=(a_{m;w}(n))_{0\leq n<m^{k}}
(am;w(n))xmkn<(x+1)mk\displaystyle(a_{m;w}(n))_{xm^{k}\leq n<(x+1)m^{k}} =ϕw((am;w(n))0n<mk).\displaystyle=\phi_{w}((a_{m;w}(n))_{0\leq n<m^{k}}).

This implies that

(am;w(n))0n<mk+1=ukxϕw(uk)ukmx1,(a_{m;w}(n))_{0\leq n<m^{k+1}}=u_{k}^{x}\phi_{w}(u_{k})u_{k}^{m-x-1},

which concludes the proof.∎

Example 4

Let us compute the Rudin-Shapiro sequence using windows function. From Example 3.3.1 in [4], the Rudin-Shapiro sequence can be defined as (a2;11(n))n𝐍(a_{2;11}(n))_{n\in\mathbf{N}}. From Proposition 3, set α11=12\alpha_{11}=\frac{1}{2}, β11=22\beta_{11}=\frac{2}{2} and s0=0,0,0,1s_{0}=0,0,0,1. For any words w{0,1}w\in\left\{0,1\right\}^{*} such that w=w1w2w=w_{1}w_{2} with |w1|=|w2||w_{1}|=|w_{2}|, ϕs(w)=w1(w2+)\phi_{s}(w)=w_{1}(w_{2}^{+}). Thus, one can compute

s1=0,0,0,1,0,0,1,0;s2=0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1;s_{1}=0,0,0,1,0,0,1,0;\;\;\;\;\;\;\;\;\;\;\;s_{2}=0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1;
s3=0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,0,0,0,1,0;s_{3}=0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,0,0,0,1,0;

(es(n))n𝐍(e_{s}(n))_{n\in\mathbf{N}} is the limit of sns_{n} when nn tends to infinite.∎

2.2 Block-counting sequences for 0-words

Proposition 5

Let mm be a positive number, let w[[m]]w\in[\![m]\!]^{*} a 0-word and let t=(w)mt=(w)_{m}. Let u0u_{0} be such that |u0|=m|w||u_{0}|=m^{|w|} and

u0[i]={1if i=t0otherwise,u_{0}[i]=\begin{cases}1\;\;\text{if i=t}\\ 0\;\;\;\text{otherwise},\end{cases}

and let uk+1=ϕw(uk)ukm1u_{k+1}=\phi_{w}(u_{k})u_{k}^{m-1}.

By letting w1=u0w_{-1}=u_{0} if w=0|w|w=0^{|w|} and w1=0m|w|w_{-1}=0^{m^{|w|}} if not, wk=ukm1w_{k}=u_{k}^{m-1} for k0k\geq 0, then

(am;w(n))n=w1w0w1w2wn.(a_{m;w}(n))_{n\in\mathbb{N}}=w_{-1}w_{0}w_{1}w_{2}\cdots w_{n}\cdots.
Lemma 6

Let mm be a positive number, y[[m]]\{0}y\in[\![m]\!]\backslash\{0\}, w[[m]]w\in[\![m]\!]^{*} a 0-word and let t=(w)mt=(w)_{m}, then for any integer rr satisfying t<mkr<mk+1t<m^{k}\leq r<m^{k+1}:
1) em;w(r+ymk+1)=em;w(r)e_{m;w}(r+ym^{k+1})=e_{m;w}(r);
2) 0em;w(r+mk)em;w(r)10\leq e_{m;w}(r+m^{k})-e_{m;w}(r)\leq 1;
3) em;w(r+mk)em;w(r)=1e_{m;w}(r+m^{k})-e_{m;w}(r)=1 only if [r]m[r]_{m} is a m1m-1-word and αwmkr<βwmk\alpha_{w}m^{k}\leq r<\beta_{w}m^{k}.

Proof

For any integer rr satisfying t<mkr<mk+1t<m^{k}\leq r<m^{k+1}, we first remark that [r+ymk+1]m=y[r]m[r+ym^{k+1}]_{m}=y[r]_{m}. Since [r+ymk+1]m[r+ym^{k+1}]_{m} and y[r]my[r]_{m} have the same set of 0-factors, em;w(r+ymk+1)=em;w(r)e_{m;w}(r+ym^{k+1})=e_{m;w}(r). Second, if [r]m[r]_{m} is not a m1m-1-word than [r]m[r]_{m} and [r+mk]m[r+m^{k}]_{m} has the same set of 0-factors. But if [r]m[r]_{m} is a m1m-1-word, then [r+mk]m=10[r]m[r+m^{k}]_{m}=10[r]_{m}^{\prime} and thus, can have at most one more 0 factors of length |w||w| than [r]m[r]_{m}. Consequently, 0em;w(r+mk)em;w(r)10\leq e_{m;w}(r+m^{k})-e_{m;w}(r)\leq 1. Moreover, in the latter case, em;w(r+mk)em;w(r)=1e_{m;w}(r+m^{k})-e_{m;w}(r)=1 only if 1w1w is a prefix of [r+mk]m[r+m^{k}]_{m}. So em;w(r+mk)=em;w(r)+1e_{m;w}(r+m^{k})=e_{m;w}(r)+1 only if αwmk<rβwmk\alpha_{w}m^{k}<r\leq\beta_{w}m^{k}.∎

Proof (of Proposition 5)

We first remark that w1w0w_{-1}w_{0} is a prefix of (am;w(n))n𝐍(a_{m;w}(n))_{n\in\mathbf{N}}.

Further, for any integer kk satisfying (w)m<mk(w)_{m}<m^{k} and x[[m]]\{0}x\in[\![m]\!]\backslash\{0\}, from Lemma 6,

(am;w(n))xmkn<(x+1)mk\displaystyle(a_{m;w}(n))_{xm^{k}\leq n<(x+1)m^{k}} =(am;w(n))mkn<2mk\displaystyle=(a_{m;w}(n))_{m^{k}\leq n<2m^{k}}
(am;w(n))mk+1n<mk+1+mk\displaystyle(a_{m;w}(n))_{m^{k+1}\leq n<m^{k+1}+m^{k}} =(ϕ(am;w(n))(p1)mkn<mk+1)).\displaystyle=(\phi(a_{m;w}(n))_{(p-1)m^{k}\leq n<m^{k+1}})).

This implies that

(am;w(n))mkn<mk+1=(ϕw((am;w(n))mk1n<mk)(am;w(n))mk1n<mkm1)m1,(a_{m;w}(n))_{m^{k}\leq n<m^{k+1}}=\left(\phi_{w}((a_{m;w}(n))_{m^{k-1}\leq n<m^{k}})(a_{m;w}(n))_{m^{k-1}\leq n<m^{k}}^{m-1}\right)^{m-1},

which concludes the proof.∎

Example 7

Let us compute the sequence (a2;01(n))n𝐍(a_{2;01}(n))_{n\in\mathbf{N}} with. From the previous theorem, set α01=12\alpha_{01}=\frac{1}{2}, β01=22\beta_{01}=\frac{2}{2}, s1=0,0,0,0s_{-1}=0,0,0,0 and s0=0,1,0,0s_{0}=0,1,0,0. For any words w{0,1}w\in\left\{0,1\right\}^{*} such that w=w1w2w=w_{1}w_{2} with |w1|=|w2|=k|w_{1}|=|w_{2}|=k for some integer kk, ϕs(w)=w1w2+\phi_{s}(w)=w_{1}w_{2}^{+}. Thus, one can compute

s1=0,1,1,1,0,1,0,0;s2=0,1,1,1,1,0,1,1,0,1,1,1,0,1,0,0;s_{1}=0,1,1,1,0,1,0,0;\;\;s_{2}=0,1,1,1,1,0,1,1,0,1,1,1,0,1,0,0;
s3=0,1,1,1,1,0,1,1,1,0,0,0,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,0,1,0,0;s_{3}=0,1,1,1,1,0,1,1,1,0,0,0,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,0,1,0,0;

(a2;01(n))n𝐍(a_{2;01}(n))_{n\in\mathbf{N}} is the limit of s1s0s1s2s3sns_{-1}s_{0}s_{1}s_{2}s_{3}...s_{n} when nn tends to infinite.∎

3 (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} are not purely morphic

From now on, we work with pp a prime number.

We first prove that (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} is not purely morphic when |w|>1|w|>1. We will need a simple notation, for w=w[0]w[|w|1]w=w[0]\cdots w[|w|-1], let w=w[0]w[|w|2]w^{\diamond}=w[0]\cdots w[|w|-2].

Proposition 8

For any prime number pp and for any w[[p]]w\in[\![p]\!]^{*}, the sub-sequences of the form (ap;w(pn+i))0ip1(a_{p;w}(pn+i))_{0\leq i\leq p-1} are either constant (called type 1) or of the form

ap;w(pn+i)={t+if i=w[|w|1],totherwise;a_{p;w}(pn+i)=\begin{cases}t^{+}\;\;\text{if $i=w[|w|-1]$},\\ t\;\;\;\text{otherwise};\end{cases}

for some integer t[[p]]t\in[\![p]\!] (called type 2). Moreover, (ap;w(pn+i))0ip1(a_{p;w}(pn+i))_{0\leq i\leq p-1} is of type 2 if and only if ww^{\diamond} is a suffix of [n]p[n]_{p}.∎

For the sequence (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}}, let us define a pp-block to be a sub-sequence of the form (ap;w(pn+i))0ip1(a_{p;w}(pn+i))_{0\leq i\leq p-1} for some integer nn. From the previous proposition, a pp-block is either of type 1 or type 2. For a pp-block (ap;w(pn+i))0ip1(a_{p;w}(pn+i))_{0\leq i\leq p-1} of type 2, let us define its index to be an integer i[[p]]i\in[\![p]\!] such that ap;w(pn+i)ap;w(pn+j)a_{p;w}(pn+i)\neq a_{p;w}(pn+j) for all jij\neq i.

Proposition 9

For any prime number pp and any w[[p]]w\in[\![p]\!]^{*}, if there exists a word vv such that vp+1v^{p+1} is a prefix of (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} and that |v|2p|w||v|\geq 2p^{|w|}, then |v||v| is a multiple of p|w|1p^{|w|-1}.

Proof

If |v|2p|w||v|\geq 2p^{|w|}, then, from Proposition 3 and 5, vv contains a pp-block of the form

ap;w(pm+i)={1if i=w[|w|1],0otherwise,a_{p;w}(pm+i)=\begin{cases}1\;\;\text{if $i=w[|w|-1]$},\\ 0\;\;\text{otherwise},\end{cases}

for some mm. Since vp+1v^{p+1} is a prefix of (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}}, (ap;w(pm+p|v|+i))0ip1=(ap;w(pm+i))0ip1(a_{p;w}(pm+p|v|+i))_{0\leq i\leq p-1}=(a_{p;w}(pm+i))_{0\leq i\leq p-1}, which is also a pp-factor of type 2. From Proposition 8, ww^{\diamond} is a suffix of both [m]p[m]_{p} and [m+|v|]p[m+|v|]_{p}. Thus, m+|v|mm+|v|-m is a multiple of p|w|1p^{|w|-1}. ∎

Proposition 10

For any prime integer pp and any w[[p]]w\in[\![p]\!]^{*}, the sequence (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} cannot have a prefix vp+1v^{p+1} such that |v|=ip|w|1|v|=ip^{|w|-1} for some positive integer ip+1i\geq p+1.

This proposition will be proved with the help of the following lemmas.

Lemma 11

Let w[[p]]w\in[\![p]\!]^{*}, then for any words a,b[[p]]a,b\in[\![p]\!]^{*} and for any positive integer \ell, there exists a word uu such that |u|=l|u|=l, |au|w=|a|w|au|_{w}=|a|_{w} and |bu|w=|b|w|bu|_{w}=|b|_{w}.

Proof

Let x[[p]]\{w[|w|1]}x\in[\![p]\!]\backslash\{w[|w|-1]\} and u=xu=x^{\ell}. It is clear that |au|w=|a|w|au|_{w}=|a|_{w} and |bu|w=|b|w|bu|_{w}=|b|_{w} because none of the added factor of size |w||w| ends with xx.

Lemma 12

Let ww be a word in [[p]][\![p]\!]^{*} such that |w|>1|w|>1. Let a,b[[p]]a,b\in[\![p]\!]^{*} such that awbwa_{w}\neq b_{w} where awa_{w} and bwb_{w} are the longest suffixes of respectively aa and bb that are prefixes of ww. Then there exists a word uu such that |u||w|1|u|\leq|w|-1 and that |au|w|bu|wmodp|au|_{w}\not\equiv|bu|_{w}\mod p.

Proof

If |a|w|b|wmodp|a|_{w}\not\equiv|b|_{w}\mod p, then let v=ϵv=\epsilon.
If |a|w|b|wmodp|a|_{w}\equiv|b|_{w}\mod p, because have awbwa_{w}\neq b_{w}, then |a|w|bw||a|_{w}\neq|b_{w}| because ww doesn’t have multiple suffixes of the same length. Suppose that awa_{w} is the longest. It is clear that |aw|>0|a_{w}|>0. We define vv to be a word satisfying awv=wa_{w}v=w. In this case, |v||w|1|v|\leq|w|-1, |av|w=|a|w+1|av|_{w}=|a|_{w}+1 and |bv|w=|b|w|bv|_{w}=|b|_{w}.

Now we are able to prove Proposition 10.

Proof (of Proposition 10)

We only need to prove that there exist k,k[[p]]k,k^{\prime}\in[\![p]\!] such that

(ap;w(n))kip|w|1n<(k+1)ip|w|1(ap;w(n))kip|w|1n<(k+1)ip|w|1,(a_{p;w}(n))_{kip^{|w|-1}\leq n<(k+1)ip^{|w|-1}}\neq(a_{p;w}(n))_{k^{\prime}ip^{|w|-1}\leq n<(k^{\prime}+1)ip^{|w|-1}},

i.e. there exists some jj such that 0j<|v|0\leq j<|v| and

ap;w(kip|w|1+j)ap;w(kip|w|1+j).a_{p;w}(kip^{|w|-1}+j)\neq a_{p;w}(k^{\prime}ip^{|w|-1}+j).

For 1kp1\leq k\leq p, let tk=[kip|w|1]pt_{k}=[kip^{|w|-1}]_{p}. One has tk=ukxk0jt_{k}=u_{k}x_{k}0^{j} for some word uku_{k}, some letter xk[[p]]\{0}x_{k}\in[\![p]\!]\backslash\{0\} and some non-negative integer j|w|1j\geq|w|-1. Note that u10u_{1}\neq 0. Since pp is prime, one has xkxkx_{k}\neq x_{k^{\prime}} if kkk\neq k^{\prime}. Thus, there exists k[[p]]k\in[\![p]\!] such that xk=w[0]x_{k}=w[0].

Now, let k[[p]]\{k}k^{\prime}\in[\![p]\!]\backslash\{k\} and let vkv_{k} and vkv_{k}^{\prime} be the longest suffixes of respectively ukxku_{k}x_{k} and ukxku_{k^{\prime}}x_{k^{\prime}} that are prefixes of ww. Because xk=w[0]x_{k}=w[0], vkϵv_{k}\neq\epsilon and thus vkvkv_{k}\neq v_{k^{\prime}}. Therefore, by Lemma 12 and Lemma 11, there exists uu such that |vku|w|vku|wmodp|v_{k}u|_{w}\not\equiv|v_{k^{\prime}}u|_{w}\mod p and that |u|=|w|1|u|=|w|-1. Let j=[u]pj=[u]_{p}, clearly j<ip|w|1j<ip^{|w|-1} and one has

ap;w(kip|w|1+j)ap;w(kip|w|1+j),a_{p;w}(kip^{|w|-1}+j)\neq a_{p;w}(k^{\prime}ip^{|w|-1}+j),

which proves the result.

Now we are able to prove the principle theorem in most cases:

Theorem 13

For any prime number pp and any w[[p]]w\in[\![p]\!]^{*}, the sequence (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} is pp-uniformly morphic for any ww and non-purely morphic when |w|>1|w|>1 and w10w\neq 10.

Proof

First, the fact that (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} is pp-automatic for any word ww follows from the Proposition 3.1 in [10], Page 7 and Theorem 16.1.5 in [4].

Now, if w10w\neq 10 and |w|>1|w|>1 and the sequence (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} is purely morphic, then 0p+10^{p+1} is a prefix of (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}}. Thus, (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} will have infinitely many prefix of type vp+1v^{p+1}. However, from Proposition 9 and 10, (ap;w(n))n𝐍(a_{p;w}(n))_{n\in\mathbf{N}} can only have finitely many prefix of the form vp+1v^{p+1}. We conclude.∎

Here we prove the pp particular cases.

Proposition 14

For any prime number pp and for any w[[p]]\{0}w\in[\![p]\!]\backslash\{0\}, the sequence (ap,w(n))n𝐍(a_{p,w}(n))_{n\in\mathbf{N}} is purely morphic.

Proof

It is easy to check that for any non-negative integer mm, (ap;w(pm+i))0ip1(a_{p;w}(pm+i))_{0\leq i\leq p-1} satisfies the following property:

ap;w(pm+i)={ap;w(m)+if i=w,ap;w(m)otherwise.a_{p;w}(pm+i)=\begin{cases}a_{p;w}(m)^{+}\;\;\text{if $i=w$},\\ a_{p;w}(m)\;\;\text{otherwise}.\end{cases}

Thus, it is easy to check that (ap;w(pm+i))0ip1(a_{p;w}(pm+i))_{0\leq i\leq p-1} is the fixed point of the morphism: ivii\to v_{i} for all i[[p]]i\in[\![p]\!], where,

vi[k]={i+if k=w,iotherwise.v_{i}[k]=\begin{cases}i^{+}\;\;\text{if $k=w$},\\ i\;\;\text{otherwise}.\end{cases}

Proposition 15

The sequence (a2,0(n))n𝐍(a_{2,0}(n))_{n\in\mathbf{N}} is non-purely morphic.

Proof

The sequence (a2,0(n))n𝐍(a_{2,0}(n))_{n\in\mathbf{N}} begins with 1,0,1,01,0,1,0. Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form v2v^{2}. Here we prove that (a2,0(n))n𝐍(a_{2,0}(n))_{n\in\mathbf{N}} cannot have a prefix of the form v2v^{2} with |v|5|v|\geq 5.

If (a2,0(n))n𝐍(a_{2,0}(n))_{n\in\mathbf{N}} has a prefix of the form v2v^{2} with |v|5|v|\geq 5. Let us suppose that |v|=4k+i|v|=4k+i for some non-negative integers k,ik,i such that i=0,1,2,3i=0,1,2,3 and k1k\geq 1. First note that a2,0(r)=a2,0(4k+i+r)a_{2,0}(r)=a_{2,0}(4k+i+r) for any rr satisfying 0r<4k+i0\leq r<4k+i.

Also note that, for k0k\geq 0, a2,0(k)=a2,0(4k)=a2,0(4k+3)=a2,0(2k+1)=xa_{2,0}(k)=a_{2,0}(4k)=a_{2,0}(4k+3)=a_{2,0}(2k+1)=x and a2,0(4k+1)=a2,0(4k+2)=a2,0(2k)=x+a_{2,0}(4k+1)=a_{2,0}(4k+2)=a_{2,0}(2k)=x^{+} for some x{0,1}x\in\{0,1\}. This is because if [k]2=u[k]_{2}=u, then [2k]2=u0[2k]_{2}=u0, [2k+1]2=u1[2k+1]_{2}=u1, [4k]2=u00[4k]_{2}=u00, [4k+1]2=u01[4k+1]_{2}=u01, [4k+2]2=u10[4k+2]_{2}=u10 and [4k+3]2=u11[4k+3]_{2}=u11.

Finally, note that a2,0(2tk1)=a2,0(k1)a_{2,0}(2^{t}k-1)=a_{2,0}(k-1), because, we know that k1k\geq 1 so if [k1]2=u[k-1]_{2}=u then [2tk1]2=u1t[2^{t}k-1]_{2}=u1^{t}. Similarly, a2,0(2tk2s1)=a2,0(2tk1)+a_{2,0}(2^{t}k-2^{s}-1)=a_{2,0}(2^{t}k-1)^{+} if 1<s<t1<s<t.

Now if i=0i=0, then |v|=4k|v|=4k and a2,0(1)=a2,0(4k+1)=0a_{2,0}(1)=a_{2,0}(4k+1)=0, a2,0(2)=a2,0(4k+2)=1a_{2,0}(2)=a_{2,0}(4k+2)=1 which contradicts to a2,0(4k+1)=a2,0(4k+2)a_{2,0}(4k+1)=a_{2,0}(4k+2).

If i=1i=1, then |v|=4k+1|v|=4k+1 and a2,0(0)=a2,0(4k+1)=1a_{2,0}(0)=a_{2,0}(4k+1)=1, a2,0(1)=a2,0(4k+2)=0a_{2,0}(1)=a_{2,0}(4k+2)=0 which contradicts to a2,0(4k+2)=a2,0(4k+2)a_{2,0}(4k+2)=a_{2,0}(4k+2).

If i=2i=2, then |v|=4k+2|v|=4k+2 and a2,0(k1)=a2,0(4k1)a_{2,0}(k-1)=a_{2,0}(4k-1) but a2,0(k1)=a2,0(8k1)=a2,0(4k3)=a2,0(4k1)+a_{2,0}(k-1)=a_{2,0}(8k-1)=a_{2,0}(4k-3)=a_{2,0}(4k-1)^{+}.

If i=3i=3, then |v|=4k+3|v|=4k+3 and a2,0(2(2k+1))=a2,0(4k+2)=a2,0(4k+3)+=a2,0(0)+=0a_{2,0}(2(2k+1))=a_{2,0}(4k+2)=a_{2,0}(4k+3)^{+}=a_{2,0}(0)^{+}=0. Thus, we have a2,0(2k+1)=1a_{2,0}(2k+1)=1. But on the other hand, a2,0(2k+1)=a2,0(4(2k+1))=a2,0(8k+4)=a2,0(4k+1)=a2,0(4k+2)=0a_{2,0}(2k+1)=a_{2,0}(4(2k+1))=a_{2,0}(8k+4)=a_{2,0}(4k+1)=a_{2,0}(4k+2)=0, which is a contradiction.

In all cases, (a2,0(n))0n<|v|(a2,0(n))|v|n<2|v|(a_{2,0}(n))_{0\leq n<|v|}\neq(a_{2,0}(n))_{|v|\leq n<2|v|}. ∎

Proposition 16

For any prime number p3p\geq 3, the sequence (ap,0(n))n𝐍(a_{p,0}(n))_{n\in\mathbf{N}} is non-purely morphic.

Proof

The sequence (ap,0(n))n𝐍(a_{p,0}(n))_{n\in\mathbf{N}} begins with (10p1)p(10^{p-1})^{p}. Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form v2v^{2}. Here we prove that (ap,0(n))n𝐍(a_{p,0}(n))_{n\in\mathbf{N}} cannot have a prefix of the form v2v^{2} with |v|p2|v|\geq p^{2}.

First, let us prove that if v2v^{2} is a prefix of (ap,0(n))n𝐍(a_{p,0}(n))_{n\in\mathbf{N}}, then |v||v| is a multiple of pp. It is easy to check that v2v^{2} is not a prefix of (ap,0(n))n𝐍(a_{p,0}(n))_{n\in\mathbf{N}} when |v|=1,2|v|=1,2. Let us suppose that |v|3|v|\geq 3. In this case, vv begins with 1,0,01,0,0. Thus, ap,0(|v|)=1,ap,0(|v|+1)=ap,0(|v|+2)=0a_{p,0}(|v|)=1,a_{p,0}(|v|+1)=a_{p,0}(|v|+2)=0.

Let us suppose that |v|=kp+t|v|=kp+t for some nonnegative integers k,tk,t such that 0tk10\leq t\leq k-1. We first prove that tk1t\neq k-1. If it is the case, then |v|+1|v|+1 is a multiple of pp and ap,0(|v|+1)ap,0(|v|+2)=0a_{p,0}(|v|+1)\neq a_{p,0}(|v|+2)=0 since |v|+2|v|+2 has one 0 less than |v|+1|v|+1 in their p-expansions. this contradicts the fact that ap,0(|v|+1)=ap,0(|v|+2)=0a_{p,0}(|v|+1)=a_{p,0}(|v|+2)=0.

Now let us suppose that tk1t\neq k-1. In this case, (ap,0(n))kpn(k+1)p1(a_{p,0}(n))_{kp\leq n\leq(k+1)p-1} contains the factor ap,0(|v|)ap,0(|v|+1)=1,0a_{p,0}(|v|)a_{p,0}(|v|+1)=1,0. Thus, (ap,0(n))kpn(k+1)p1(a_{p,0}(n))_{kp\leq n\leq(k+1)p-1} is a factor of type 2 announced in proposition 8. But the word (ap,0(n))0np1=10p1(a_{p,0}(n))_{0\leq n\leq p-1}=10^{p-1} is also a word of type 2 and the word (ap,0(n))n𝐍(a_{p,0}(n))_{n\in\mathbf{N}} cannot have two different factors of type 2 such that the special letters are at different positions. Thus, ap,0(|v|)ap,0(|v|+1)a_{p,0}(|v|)a_{p,0}(|v|+1) should be a prefix of (ap,0(n))kpn(k+1)p1(a_{p,0}(n))_{kp\leq n\leq(k+1)p-1} and consequently |v||v| is a multiple of pp.

Second, |v||v| is not a multiple of p2p^{2}. Because, if it is in this case, ap,0(|v|)=ap,0(0)=1a_{p,0}(|v|)=a_{p,0}(0)=1 and ap,0(|v|+p)=ap,0(|v|)1=0a_{p,0}(|v|+p)=a_{p,0}(|v|)-1=0. But ap,0(p)=1a_{p,0}(p)=1, thus, ap,0(|v|+p)ap,0(p)a_{p,0}(|v|+p)\neq a_{p,0}(p). Consequently, (ap,0(n))0n<|v|1(ap,0(n))|v|n<2|v|1(a_{p,0}(n))_{0\leq n<|v|-1}\neq(a_{p,0}(n))_{|v|\leq n<2|v|-1}.

Third, if |v||v| is not a multiple of p2p^{2} but larger than p2+1p^{2}+1, let us suppose that |v|=kp2+tp|v|=kp^{2}+tp for some positive integers k,tk,t such that 1tp11\leq t\leq p-1. Let x=(pt)px=(p-t)p, we then have ap,0(|v|+x)=ap,0(x)=1a_{p,0}(|v|+x)=a_{p,0}(x)=1. But in this case, ap,0(x+p)=1a_{p,0}(x+p)=1 or 22, but ap,0(|v|+x+p)=0a_{p,0}(|v|+x+p)=0. Thus, (ap,0(n))0n<|v|1(ap,0(n))|v|n<2|v|1(a_{p,0}(n))_{0\leq n<|v|-1}\neq(a_{p,0}(n))_{|v|\leq n<2|v|-1}. ∎

Proposition 17

The sequence (a2;10(n))n𝐍(a_{2;10}(n))_{n\in\mathbf{N}} is non-purely morphic.

Proof

The sequence (a2;10(n))n𝐍(a_{2;10}(n))_{n\in\mathbf{N}} begins with 00100010. Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form v2v^{2}. We will prove that its only prefix of square shape is 0000.

Let v2v^{2} be a prefix of (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}}. Because of that, one can note that (ap;10(n))0n<|v|=ap;10(|v|+n))0n<|v|(a_{p;10}(n))_{0\leq n<|v|}=a_{p;10}(|v|+n))_{0\leq n<|v|}, in particular, (ap;10(|v|+n))0n4=0010(a_{p;10}(|v|+n))_{0\leq n\leq 4}=0010. Using this, we will prove this proposition by proving all the different possibility for the word [|v|]2[|v|]_{2}.

For now on, uu can be any word in [[p]][\![p]\!]^{*} and ss and tt positive integer. Note that the computation is made in binary basis.

i) If [|v|]2=1t[|v|]_{2}=1^{t} with t>1t>1, we have ap;10(|v|+1)=10a_{p;10}(|v|+1)=1\neq 0 because 1t+1=10t1^{t}+1=10^{t}.

ii) If [|v|]2=1t01[|v|]_{2}=1^{t}01, one can simply note that ap;10(|v|)=10a_{p;10}(|v|)=1\neq 0.

iii) If [|v|]2=u101t01[|v|]_{2}=u101^{t}01 then ap;10(|v|+3)=ap;10(|v|)+a_{p;10}(|v|+3)=a_{p;10}(|v|)^{+} because u101t01+11=u110s+2u101^{t}01+11=u110^{s+2}.

iv) If [|v|]2=u101t[|v|]_{2}=u101^{t} with t>1t>1 then ap;10(|v|+2)=ap;10(|v|)a_{p;10}(|v|+2)=a_{p;10}(|v|), because u101t+11=u110t11u101^{t}+11=u110^{t-1}1.

v) If [|v|]2=u10s1t[|v|]_{2}=u10^{s}1^{t} with s>1s>1 we have ap;10(|v|+1)=ap;10(|v|)+a_{p;10}(|v|+1)=a_{p;10}(|v|)^{+}, because u10s1t+1=u10s110tu10^{s}1^{t}+1=u10^{s-1}10^{t}.

vi) Finally, if [|v|]2=u10t[|v|]_{2}=u10^{t} with t>1t>1, we have on one hand ap;10(|v|+(1t10)2)=ap;10(|v|)=0a_{p;10}(|v|+(1^{t-1}0)_{2})=a_{p;10}(|v|)=0 because u10t+1t10=u1t0u10^{t}+1^{t-1}0=u1^{t}0. We also have ap;10(|v|+(1t10)2)=ap;10((1t10)2)=1a_{p;10}(|v|+(1^{t-1}0)_{2})=a_{p;10}((1^{t-1}0)_{2})=1, which is a contradiction.

An attentive reader will remark that this cover all the number strictly bigger than 1. ∎

Proposition 18

For any prime number p3p\geq 3 the sequence (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}} is non-purely morphic.

Proof

The sequence (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}} begins with 0p10^{p}1. Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form vpv^{p}. It suffices to prove that if |v|>p2|v|>p^{2} then vpv^{p} is not a prefix of (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}}.

Let vpv^{p} be a prefix of (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}}.

Suppose that p|v|>p2p\nmid|v|>p^{2}. This means that v=uyxv=uyx for a word uu and some letters y,xy,x with x0x\neq 0. Because v2v^{2} is a prefix of (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}}, vv begins with the letters 0p10^{p}1 and (ap;10(n))0np=ap;10((v)p+n))0np(a_{p;10}(n))_{0\leq n\leq p}=a_{p;10}((v)_{p}+n))_{0\leq n\leq p}. Thus ap;10((v)p)=0a_{p;10}((v)_{p})=0.

Let c[[p]]c\in[\![p]\!] such that x+c=px+c=p; it exists because x0x\neq 0 and p>2p>2. Thus, [(v)p+c]p=uy0[(v)_{p}+c]_{p}=u^{\prime}y^{\prime}0. Because ap;w(c)=0a_{p;w}(c)=0, ap;w((v)p+c)=0a_{p;w}((v)_{p}+c)=0 also and ap;w((v)p+p)=0a_{p;w}((v)_{p}+p)=0 or p1p-1 which is not equal to ap;w(p)=1a_{p;w}(p)=1. Therefore, v2v^{2} is not a prefix of (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}}.

Suppose now that p|v|pp\mid|v|\geq p. Let |v|=spt|v|=sp^{t} for some positive integer s,ts,t such that t1t\geq 1 and psp\nmid s and let [v]p=ux0t[v]_{p}=ux0^{t} for some word uu and some letter x[[p]]\{0}x\in[\![p]\!]\backslash\{0\}.

Since pp is prime, there exists k[[p]]k\in[\![p]\!] such that [kv]p=u10t[kv]_{p}=u^{\prime}10^{t} for some word uu^{\prime}. Let m=pt+11m=p^{t+1}-1, thus [m]p=(p1)t[m]_{p}=(p-1)^{t} and [kv+m]p=u1(p1)t[kv+m]_{p}=u^{\prime}1(p-1)^{t}.

Since (ap;10(n))k1|v|n(k1+1)|v|1=(ap;10(n))k2|v|n(k2+1)|v|1(a_{p;10}(n))_{k_{1}|v|\leq n\leq(k_{1}+1)|v|-1}=(a_{p;10}(n))_{k_{2}|v|\leq n\leq(k_{2}+1)|v|-1}, for any k1k_{1}, k2[[p]]k_{2}\in[\![p]\!] we have ap;10(0)=0=ap;10(kv)a_{p;10}(0)=0=a_{p;10}(kv) thus ap;10(u)=p1a_{p;10}(u^{\prime})=p-1 which means that ap;10(m)=0ap;10(kv+m)=p1a_{p;10}(m)=0\neq a_{p;10}(kv+m)=p-1.

Hence, vpv^{p} cannot be a prefix of (ap;10(n))n𝐍(a_{p;10}(n))_{n\in\mathbf{N}} if v>p2v>p^{2} which concludes the proof. ∎

Proof (of Theorem 2)

It is a direct result of Theorem 13, Proposition 14, Proposition 15, Proposition 16, Proposition 17 and Proposition 18.∎

4 Algebraicity

By Christol’s theorem [11], we know that the power series f=i=0ap;w(n)tnf=\sum_{i=0}^{\infty}a_{p;w}(n)t^{n} is algebraic over 𝔽p(t)\mathbb{F}_{p}(t). Now we prove that ff is algebraic of degree pp. Indeed, if we let [w]p[w]_{p} denote w1pk1++wkw_{1}p^{k-1}+\cdots+w_{k}, and write an=ap;w(n)a_{n}=a_{p;w}(n) for short, then

(1+t++tp1)fpf\displaystyle\quad(1+t+\cdots+t^{p-1})f^{p}-f
=n0j=0p1(anapn+j)tpn+j\displaystyle=\sum_{n\geq 0}\sum_{j=0}^{p-1}(a_{n}-a_{pn+j})t^{pn+j}
=n0(anapn+wk)tpn+wk\displaystyle=\sum_{n\geq 0}(a_{n}-a_{pn+w_{k}})t^{pn+w_{k}}
=n0j=0p1(anp+janp2+jp+wk)tnp2+jp+wk\displaystyle=\sum_{n\geq 0}\sum_{j=0}^{p-1}(a_{np+j}-a_{np^{2}+jp+w_{k}})t^{np^{2}+jp+w_{k}}
=n0(anp+wk1anp2+wk1p+wk)tnp2+wk1p+wk\displaystyle=\sum_{n\geq 0}(a_{np+w_{k-1}}-a_{np^{2}+w_{k-1}p+w_{k}})t^{np^{2}+w_{k-1}p+w_{k}}
\displaystyle\ldots
=n0(anpk1+w1pk2+wk1anpk+w1pk1++wk)tnpk+[w]p\displaystyle=\sum_{n\geq 0}(a_{np^{k-1}+w_{1}p^{k-2}\cdots+w_{k-1}}-a_{np^{k}+w_{1}p^{k-1}+\cdots+w_{k}})t^{np^{k}+[w]_{p}}
={n0tnpk+[w]p=t[w]p/(tpk1),if w10n1tnpk+[w]p=tpk+[w]p/(tpk1),if w1=0.\displaystyle=\begin{cases}\sum_{n\geq 0}-t^{np^{k}+[w]_{p}}=t^{[w]_{p}}/(t^{p^{k}}-1),\;&\text{if }w_{1}\neq 0\\ \sum_{n\geq 1}-t^{np^{k}+[w]_{p}}=t^{p^{k}+[w]_{p}}/(t^{p^{k}}-1),\;&\text{if }w_{1}=0.\end{cases}

The irreduciblity of the the above functional equations is straightforward from the Eisenstein’s criterion. We thus have the following propriety:

Proposition 19

For any prime number pp and any finite word ww in [[p]][\![p]\!]^{*}, the power series i=0ap;w(n)tn\sum_{i=0}^{\infty}a_{p;w}(n)t^{n} is algebraic of degree pp over 𝔽p(t)\mathbb{F}_{p}(t).

5 Final remarks

The authors remark that the fast algorithms introduced in Section 2 for 0-words and non-0-words are much different. However, the generating functions given in Section 4 for 0-words and non-0-words are quite similar. Thus, we believe that the algorithms in Section 2 can be unified for both 0-words and non-0-words.

References