Michael M Drmota

Peter J Grabner
email: peter.grabner@tugraz.at

Pierre Liardet
email: liardet@cmi.univ-mrs.fr

Arithmetica BLOCK ADDITIVE FUNCTIONS ON THE GAUSSIAN INTEGERS

Keywords: . 2000 Mathematics Subject Classification. Primary: 11A63; Secondary: 11M41, 22D40 block additive digital functions, asymptotic distribution results

come

Introduction

Let q = -a + i ∈ Z[i] for a positive integer a and N = {0, 1, . . . , a 2 }. Then every Gaussian integer z ∈ Z[i] can be uniquely represented as z = j≥0 ε j (z) q j with ε j (z) ∈ N . Formally we set ε j (z) = 0 for all negative integers j < 0. It will be convenient sometimes to use infinite or even doubly infinite sequences (filled with zeros) for the representation of Gaussian integers. We denote the length of the expansion by length q (z) = max {j ∈ N 0 | ε j (z) = 0} + 1 and length q (0) = 0. (We denote the positive integers by N and use N 0 = N ∪ {0} for the non-negative integers.) Throughout the paper we will use the notation log b for the logarithm to base b. The following lemma was proved in [START_REF] Grabner | The sum-of-digits function for complex bases[END_REF]. Lemma 1. There exists a positive constant c such that for all z ∈ Z[i] length q (z)log |q| |z| ≤ c.

The fundamental domain of the base q representation on Z[i] is defined by

F q = ∞ ℓ=1 ε ℓ q ℓ | ∀ℓ : ε ℓ ∈ N .
This subset of C plays the same rôle for q-adic numeration as the unit interval does for classical number systems on the integers (cf. [START_REF] Gilbert | Geometry of radix representations, The Geometric Vein. The Coxeter Festschrift[END_REF][START_REF]Arithmetic in complex bases[END_REF][START_REF] Grabner | The sum-of-digits function for complex bases[END_REF]). More generally, radix representations of elements of the ring of integers Z K of a number field K can be considered. A base α ∈ Z K together with the digit set D = {0, 1, . . . , |N K|Q (α)| -1} is called a canonical number system (cf. [START_REF] Kovács | Canonical number systems in algebraic number fields[END_REF][START_REF] Kovács | Canonical systems in the ring of integers[END_REF]), if every ζ ∈ Z K has a representation of the form

ζ = n ℓ=0 ε ℓ α ℓ
with ε ℓ ∈ D for 0 ≤ ℓ ≤ n. The point 0 is an inner point of F q . This follows from the general fact that (α, D) is a canonical number system, if and only if the corresponding fundamental domain contains 0 as an inner point (cf. [START_REF] Akiyama | Topological properties of two-dimensional number systems[END_REF]).

Let F : N L+1 → R be any given function (for some L ≥ 0) with F (0, 0, . . . , 0) = 0. Furthermore, set s F (z) = ∞ j=-L F (ε j (z), ε j+1 (z), . . . , ε j+L (z)) .

This means that we consider a weighted sum over all subsequent digital patterns of length L + 1 of the digital expansion of z. The function s F is called block additive function of rank L + 1. This generalises the blockadditive digital functions studied in [START_REF] Cateland | Suites digitales et suites k-régulières[END_REF] for digital expansions on the rational integers. This definition readily extends to functions taking values in an arbitrary abelian group A. We will use this in the general considerations in Section 5.

For example, for L = 0 we obtain completely additive functions such as those studied in [18, Section 5], for instance for F (ε) = ε we just have the sum-of-digits function studied in [START_REF] Gittenberger | The moments of the sum-of-digits function in number fields[END_REF][START_REF] Grabner | The sum-of-digits function for complex bases[END_REF][START_REF] Grabner | Harmonic properties of the sum-of-digits function for complex bases[END_REF], or if L = 1 and F (ε, η) = 1δ ε,η (δ x,y denoting the Kronecker symbol) then s F (n) is just counting the number of times that a digit is different from the preceding one etc.

Overview of the Results

Our main objective is to get information on sums (2.1)

S N (x) = |z| 2 <N
x s F (z) , where x is a complex variable. It is clear that S N (x) encodes the distribution of s F (z). For example, if we assume that s F (z) has only non-negative integer values then we have

S N (x) = k≥0 #{z ∈ Z[i] : |z| 2 < N, s F (z) = k} x k .
More generally, let Y N denote the random variable that is induced by the distribution of s F (z) for |z| 2 < N, that is, the distribution function of Y N is given by (2.2)

P{Y N ≤ y} = 1 S N (1)
#{|z| 2 < N : s F (z) ≤ y}.

Then we have (2.3)

E x Y N = 1 S N (1) |z| 2 <N x s F (z) = 1 S N (1)
S N (x).

In particular the moment generating function E e λY N and the characteristic function E e itY N of Y N can be expressed with help of S N (x). (Note that S N (1) = πN + O N 1 3 .) In what follows we will present three different methods to obtain asymptotic information for S N (x). In Section 3 we use a measure theoretic approach showing that for real numbers x sufficiently close to 1 we have (2.4)

S N (x) = Φ(x, log |q| 2 N) N log |q| 2 λ(x) • 1 + O N -κ ,
where Φ(x, t) is a function that is analytic in x and periodic (with period 1) and Hölder continuous in t, and λ(x) is the dominant eigenvalue of a certain matrix A(x) defined in (3.1). This representation directly implies that the random variable

X N = Y N -µ log |q| 2 N σ 2 log |q| 2 N , with µ = λ ′ (1) λ(1)
and σ 2 = λ ′′ (1) λ(1) + λ ′ (1) λ(1) -λ ′ (1) 2 λ(1) 2 satisfies a central limit theorem and we have convergence of all moments. More precisely we get (uniformly in y)

1 πN # |z| 2 < N : s F (z) ≤ µ log |q| 2 N + y σ 2 log |q| 2 N = 1 √ 2π y -∞ e -1 2 u 2 du + o(1)
and (for every L ≥ 0) 1 πN

|z| 2 <N s F (z) -µ log |q| 2 N L = 1 √ 2π ∞ -∞
u L e -1 2 u 2 du + o [START_REF] Akiyama | Topological properties of two-dimensional number systems[END_REF].

The drawback of the method given in Section 3 is that it only works for real numbers x. In Section 4 we present a method that is based on Dirichlet series that extends (2.4) to a complex neighbourhood of x = 1. Furthermore, we provide upper bounds for S N (x) for complex x with modulus |x| close to 1. With the help of this extension we are able to provide more precise distributional results. Besides the central limit theorem we also get a local limit theorem, that is, asymptotic expansions for the numbers

#{z ∈ Z[i] : |z| 2 < N, s F (z) = k}
if k is close to the mean µ log |q| 2 N and if s F (z) is integer valued. Furthermore, we obtain very precise asymptotic expansions of the moments.

Next we consider the sequence s F (z) taking values in a compact abelian group A. Then the closure of the set {s F (z) : z ∈ Z[i]} is a subgroup of A denoted by A(F ). The results on exponential sums obtained in Section 4 are used to prove uniform distribution of (s F (z)) z∈Z[i] in the groups R/Z and Z/MZ with respect to the Haar measure λ A under according natural conditions. The method gives results for uniform distribution of the values of s F in large circles, i. e. lim

N →∞ 1 πN # z ∈ Z[i]; |z| 2 < N, s F (z) ∈ B = λ A (B)
for all B ⊆ A with λ A (∂B) = 0.

In Section 5 we use an approach based on ergodic Z[i]-actions and skew products to extend the distribution results for group valued s F to well uniform distribution with respect to Følner sequences (Q n ) n∈N , i. e.

lim n→∞ 1 #Q n # {z ∈ Q n ; s F (z + y) ∈ B} = λ A (B) uniformly in y ∈ Z[i]
. This generalises the results on uniform distribution of (s F (z)) z∈Z[i] obtained in Section 4. On the other hand methods from ergodic theory do not allow to obtain error terms, which come as a natural by-product of the method used in Section 4.

A measure theoretic method

In the following we use ideas developed in [START_REF] Grabner | On the number of optimal base 2 representations of integers[END_REF][START_REF] Grabner | Counting optimal joint digit expansions[END_REF]. The measure theoretic approach to asymptotic questions about digital functions gives a smooth proof for a real version of the asymptotic representation (2.4) for S N (x).

In order to formulate our results we have to introduce some notations.

For every block B = (η 0 , η 1 , . . . , η L ) ∈ N L+1 we set B ′ = (η 1 , . . . , η L ) ∈ N L , that is, the block without the first digit, and η(B) = η 0 , the first digit of the block B. Furthermore, set

g F (B) = L i=0
(F (0, . . . , 0, η 0 , η 1 , . . . , η i ) -F (0, . . . , 0, 0, η 1 , . . . , η i )) .

Note that g

F (B) = 0 if η 0 = 0.
By the definition of block additive function we directly get the following property.

Lemma 2. For z ∈ Z[i] let B = B(z) = (ε 0 (z), . . . , ε L (z)) the block of the first L + 1 digits of the q-ary digital expansion of z. Then

s F (z) = g F (B) + s F (v),
where z = ε 0 (z) + qv.

Now define a matrix

A(x) = (A B,C (x)) B,C∈N L+1 by (3.1) A B,C (x) = x g F (B) if C = (B ′ , ℓ) for some ℓ ∈ N , 0 otherwise.
Finally, let λ(x) be the dominant eigenvalue of the matrix A(x) that surely exists if x is close to the positive real axis, in particular, if x is close to 1, compare with Lemma 4. Note that λ(1) = |q| 2 .

Theorem 1. The following asymptotic relation holds uniformly for x in some interval I containing 1 (3.2)

|z| 2 <N x s F (z) = Φ(x, log |q| 2 N) N log |q| 2 λ(x) • 1 + O N -κ
with some κ > 0, where Φ(x, t) is a periodic (with period 1) and Hölder continuous function in t and continuous in x.

Proof. Before we present the proof of Theorem 1 we derive some direct corollaries.

Corollary 1. Set µ = λ ′ (1) λ(1) and σ 2 = λ ′′ (1) λ(1) + µ -µ 2 .
If σ 2 > 0 then we have uniformly for real y

1 πN # |z| 2 < N : s F (z) ≤ µ log |q| 2 N + y σ 2 log |q| 2 N = 1 √ 2π y -∞ e -1 2 u 2 du + o(1). (3.3)
and for every L ≥ 0

(3.4) 1 πN |z| 2 <N s F (z) -µ log |q| 2 N L = 1 √ 2π ∞ -∞ u L e -1 2 u 2 du + o(1)
.

Furthermore, we have exponential tail estimates of the form

(3.5) 1 πN # |z| 2 < N : s F (z) -µ log |q| 2 N ≥ η log |q| 2 N ≪ min e -cη , e -cη 2 +O(η 3 / √ log N )
for some constant c > 0.

Remark 1. The above result suggests that the distribution of s F (z), |z| 2 < N, can be approximated by a sum of (weakly dependent) random variables. This is in fact a possible approach to this problem. Observe that the constant µ can be explicitly calculated by

µ = λ ′ (1) λ(1) = 1 |q| L+1 B∈N L+1 s F (B).
Of course, this mean value corresponds to the contribution of one block of length L + 1 in the digital expansion of z that has approximately log |q| 2 N digits. In a similar way it is also possible to represent σ 2 but this is much more involved.

Proof of Corollary 1. Let Y N denote the random variable that is induced by the distribution of s F (z) for |z| 2 < N given by (2.2). Then the moment generating function of Y N is given by (using (2.3))

E e tY N = 1 S N (1) S N (e t ) = 1 π Φ(e t , log |q| 2 N)N log |q| 2 λ(e t )-1 • (1 + O N -η ).
Hence, by using the local expansion (recall that λ(1)

= |q| 2 ) log λ(e t ) = log |q| 2 + µt + σ 2 2 t 2 + O t 3
we directly obtain that the moment generating function of the normalised random variable

Z N = Y N -µ log |q| 2 N σ 2 log |q| 2 N
is given by

E e tZ N = e -t(µ/σ) √ log |q| 2 N E e (t/ √ σ 2 log |q| 2 N )Y N = e 1 2 t 2 +O(t 3 / √ log N ) .
Of course, this directly translates to (3.3). Furthermore, convergence of the moment generating function also implies convergence of all moments, that is, we get (3.4). Finally, the tail estimates (3.5) are a direct consequence of Chernov type inequalities.

The proof of Theorem 1 runs along the lines of [14, Sections 4 and 5] and is organised in four steps.

Step 1 defines a sequence of discrete measures, which are obtained by suitably rescaling point masses x s F (z) . Let δ z denote the Dirac measure supported at {z}. Then we define a family of measures (depending on n and x) by setting (3.6) µ n,x = z∈Bn x s F (z) δ z q n z∈Bn x s F (z) , where

B n = {z ∈ Z[i] | length(z) ≤ n} .
Using the matrix A(x) introduced in (3.1), we can write the denominator in (3.6) as

(x g F (B) ) B • A(x) n • (δ 0,C ) T C , δ 0,C
denoting the Kronecker symbol, and T the transposition.

Step 2 uses characteristic functions to show that the sequence µ n,x has a weak limit. The fact that the values x s F (z) are formed from the digital expansion of z can be used to express the Fourier transforms μn,x of the measures µ n,x

(3.7) μn,x (t) = z∈Bn x s F (z) e ℜ tz q n z∈Bn x s F (z)
. in terms of matrix products. Here t ∈ C and as usual e(•) = e 2πi(•) . We define the matrix H(x, t) by setting

H B,C (x, t) = A B,C (x)e (ℜ (tB 0 )) .
This allows us to write

(3.8) μn,x (t) = v 1 (x, tq -n ) • H(x, t q n-1 ) • • • H(x, t q ) • v 2 v 1 (x, 0) • A(x) n • v 2 with v 1 (x, t) = x s F (B) e (ℜ (tB 0 )) B and v 2 = (δ 0,C ) T C .
The matrices 1 λ(x) H(x, t) satisfy the conditions of [14, Lemma 5] (mutatis mutandis) and therefore, the sequence of matrices

P n (x, t) = λ(x) -n H(x, t q n-1 ) • • • H(x, t q )
converges to a limit P(x, t) and (3.9) P n (x, t) -P n (x, 0) ≪ |t| for |t| ≤ 1

P n (x, t) -P(x, t) ≪ (1 + |t|) η(x) |q| -η(x)n for all t,
where

η(x) = log λ(x) -log |λ 1 (x)| log |q| + log λ(x) -log |λ 1 (x)| ,
where λ 1 (x) denotes the second largest eigenvalue of A(x). These relations hold uniformly for x in compact subsets of (0, ∞).

For |t| ≥ 1 (3.9) together with (3.8) implies

(3.10) |μ n,x (t) -μx (t)| ≪ |t| η(x) q -nη(x) .
For |t| ≤ 1 and L > K > ℓ we estimate using (3.8)

|μ K,x (t) -μL,x (t)| = λ(x) K v 1 (x, tq -K ) • P K-ℓ (q -ℓ t)P ℓ (t)v 2 v 1 (x, 0) • A(x) K • v 2 -λ(x) L v 1 (x, tq -L ) • P L-ℓ (q -ℓ t)P ℓ (t)v 2 v 1 (x, 0) • A(x) L • v 2 ≪ λ(x) K v 1 (x, tq -K ) • P K-ℓ (0)P ℓ (t)v 2 v 1 (x, 0) • A(x) K • v 2 -λ(x) L v 1 (x, tq -L ) • P L-ℓ (0)P ℓ (t)v 2 v 1 (x, 0) • A(x) L • v 2 + |q| -ℓ |t| = λ(x) K v 1 (x, tq -K ) • P K-ℓ (0)(P ℓ (t) -P ℓ (0))v 2 v 1 (x, 0) • A(x) K • v 2 -λ(x) L v 1 (x, tq -L ) • P L-ℓ (0)(P ℓ (t) -P ℓ (0))v 2 v 1 (x, 0) • A(x) L • v 2 + |q| -ℓ |t| ≪ |t| λ 1 (x) λ(x) K-ℓ + |q| -ℓ ≪ |t||q| -η(x)K ,
where we have chosen ℓ = ⌈ηK⌉. Passing L to infinity yields

(3.11) |μ n,x (t) -μx (t)| ≪ |t|q -nη(x)
for |t| ≤ 1. Especially, (3.10) and (3.11) establish the existence of a (weak) limiting measure µ x .

Remark 2. What we have proved up to now is enough to have the asymptotic relation (3.2) without error term for all x > 0.

Step 3 establishes estimates for the measure dimension of µ x , which will be needed in Step 4. We define the matrices I ε by setting

(I ε ) B,C = δ B,C
if the block B starts with the digit ε 0 otherwise.

Clearly

I 0 + I 1 + • • • + I a 2
is the identity matrix. Furthermore, we have

µ x ε 1 q + ε 2 q 2 + • • • + ε k q k + q -k F = lim n→∞ (v 1 (x, 0) • I ε 1 A(x)I ε 2 A(x) • • • I ε k A(x)A(x) n-k • v 2 v 1 (x, 0) • A(x) n • v 2 .
The limit can be computed by the Perron-Frobenius theorem and equals

λ(x) -k v 1 (x, 0) • I ε 1 A(x)I ε 2 A(x) • • • I ε k v(x),
where v(x) denotes the (Perron-Frobenius) eigenvector of A(x) associated to the eigenvalue λ(x) normalised so that

v 1 (x, 0) • v(x) = 1. Now we define ξ(x) = max ε max B (A(x)I ε v) B (v(x)
) B (this is always finite, since all coordinates of v(x) are strictly positive). Clearly, ξ(x) < λ(x) and ξ(1) = 1. By definition of ξ(x) we have the component-wise inequality

A(x)I ε v(x) ≤ ξ(x)v(x), from which we conclude v 1 (x, 0) • I ε 1 A(x)I ε 2 A(x) • • • I ε k v(x) ≤ ξ(x) k v 1 (x, 0) • v(x) = ξ(x) k and (3.12) µ x ε 1 q + ε 2 q 2 + • • • + ε k q k + q -k F ≪ ξ(x) λ(x) k .
Since (q, {0, . . . , a 2 }) is a canonical number system, every ball B(z, r) can be covered by an absolutely bounded number of sets of the form Notice that β(1) = 2, which is no surprise, since µ 1 is Lebesgue measure restricted to F . Furthermore, we need at most O(|q| 2n ) times the area of the annulus

ε 1 q + ε 2 q 2 + • • • + ε k q k + q -k F for k = ⌊-
B(0, r + ε + |q| -n ) \ B(0, r -|q| -n ) copies of q -n
F to cover the annulus B(0, r + ε) \ B(0, r). This together with (3.12) implies

µ x (B(0, r + ε) \ B(0, r)) ≪ |q| -nβ(x) |q| 2n (2r + ε)(ε + |q| -n ) for all n. Setting n = -⌈log |q| ε⌉ gives (3.14) µ x (B(0, r + ε) \ B(0, r)) ≪ (r + ε)ε β(x)-1 .
This gives a sensible estimate, if β(x) > 1 or equivalently log ξ(x) < log λ(x)log |q|. Since this inequality is satisfied for x = 1 and β(x) depends continuously on x, there exists an interval I around x = 1, such that β(x) ≥ β 0 > 1 for some β 0 < 2.

Step 4 uses the estimates for the measure dimension of µ x and a suitable version of the Berry-Esseen inequality to provide bounds for |µ n,x (B(0, r))-µ x (B(0, r))|. Since µ n,x (B(0, r)) can be easily related to the sum occurring in (3.2), this gives the error term in (3.2).

We recall the following result obtained in [START_REF] Grabner | Counting optimal joint digit expansions[END_REF]. The statement uses the notation c(φ) = (cos φ, sin φ) T .

Proposition 1 ([14, Proposition 1]). Let ν 1 and ν 2 be two probability measures in R 2 with their Fourier transforms defined by

νk (t) = R 2 e ( x, t ) dν k (x).
Suppose that ν 2 satisfies

(3.15) ν 2 (B(0, r + ε) \ B(0, r)) ≪ ε θ
for some 0 < θ < 1 and all r ≥ 0. Then the following inequality holds for all r ≥ 0 and T > 0

(3.16) |ν 1 (B(0, r)) -ν 2 (B(0, r))| ≪ T 0 2π 0 K r (t, T ) |ν 1 (tc(φ)) -ν2 (tc(φ))| t dφ dt + T -2θ θ+2 ,
where the kernel function K r (t, T ) satisfies

K r (t, T ) ≪ 1 T 2 + min r 2 , r 1 2 t 3 2
.

The implied constant in (3.16) depends only on the implied constant in (3.15).

Inserting (3.10) and (3.11) into (3.16) with θ = β(x) -1 yields (3.17)

|µ n,x (B(0, r)) -µ x (B(0, r))| ≪ 1 0 K r (t, T )t|q| -η(x)n t dt + T 1 K r (t, T )t η(x) |q| -η(x)n t dt + T -2 β(x)-1 β(x)+1 .
Using the bounds for K r (t, T ) and setting

log T = η(x) η(x) + 1 2 + 2 β(x)-1 β(x)+1 n log |q| yields |µ n,x (B(0, r)) -µ x (B(0, r))| ≪ |q| -2κ(x)n
uniformly in r with

κ(x) = η(x)(β(x) -1) (η(x) + 1 2 )(β(x) + 1) + 2β(x) -2
.

Choosing κ to be the minimum attained by κ(x) on a compact interval I, where β(x) ≥ β 0 > 1 for some β 0 < 2, gives

(3.18) |µ n,x (B(0, r)) -µ x (B(0, r))| ≪ |q| -2κn
for all x ∈ I. Now, by definition of µ k,x , we have

|z| 2 <N x s F (z) = v 1 (x, 0) • A(x) k • v 2 • µ k,x (B(0, |q| -k √ N ))
for k = ⌊log |q| 2 N⌋ + M and some integer constant M > 0, which is chosen so that B(0, |q| 1-M ) ⊂ F . Inserting (3.18) and v 1 (x, 0)

• A(x) k • v 2 = C(x)λ(x) k + O(λ 1 (x) k ) yields |z| 2 <N x s F (z) = C(x)λ(x) k µ x (B(0, |q| -k √ N))+O(λ 1 (x) k )+O(λ(x) k |q| -2κk ) = N log |q| 2 λ(x) C(x)λ(x) {log |q| 2 N }+M µ x (B(0, q {log |q| 2 N }-M ))(1 + O(N -κ )).
We observe that the measure µ x satisfies the self-similarity relation

µ x (B(0, |q|r)) = λ(x)µ x (B(0, r))
for r sufficiently small. Setting

Φ(x, t) = C(x)λ(x) t+M µ x (B(0, q t-M ))for t < 1
and noting that (3.13) implies the Hölder continuity of Φ as a function of t completes the proof.

Remark 3. For complex values of x this method breaks down, because the weak limits µ x have infinite total variation and are therefore not complex measures.

A Dirichlet series method

The goal of this section is to generalise Theorem 1 to complex x. The proof relies on Dirichlet series and Mellin-Perron techniques.

Theorem 2. There exists a complex neighbourhood of x = 1 (that is, |x -1| ≤ δ for some δ > 0) such that uniformly (4.1)

|z| 2 <N x s F (z) = Φ(x, log |q| 2 N) N log |q| 2 λ(x) • 1 + O N -κ
with some κ > 0, where Φ(x, t) is a function that is analytic in x and periodic (with period 1) and Hölder continuous in t.

Furthermore, if F is integer valued with the property that

(4.2) d = gcd{g F (B) : B ∈ N L+1 } = 1.
Then we have uniformly for |x -1| ≥ δ and |ℜ(x) -1| ≤ δ 2 (4.3)

|z| 2 <N x s F (z) ≪ N log |q| 2 λ(|x|)-κ
with some κ > 0 and some δ 2 with 0 < δ 2 < δ.

Remark 4.

In what follows we will also show that Φ(x, t) has an explicit representation (see (4.21)). For example, for the sum-of-digits function s q (z) we have

Φ(x, t) = X -t 1 -X -1 a 2 ℓ=1 x ℓ X ⌊ t-log |q| 2 ℓ 2 ⌋ + X -t 1 -X -1 a 2 ℓ=1 x ℓ z =0 x sq(z) X ⌊t-log |q| 2 |qz+ℓ| 2 ⌋ -X ⌊t-log |q| 2 |qz| 2 ⌋ ,
where X abbreviates

X = x |q| 2 -1 x -1 .
The asymptotic representations (4.1) and ( 4.3) can be used in various ways (compare also with [START_REF] Drmota | The distribution of patterns in digital expansions, Algebraic number theory and Diophantine analysis[END_REF] and [START_REF] Drmota | The sum-of-digits function of squares[END_REF]). We directly derive asymptotic expansions for moments (Corollary 2) and a refinement of the central limit theorem stated in Corollary 1, further a local limit theorem (Corollary 3), uniform distribution in residue classes (Corollary 4) and uniform distribution modulo 1 (Corollary 5).

Corollary 2. For every integer r ≥ 1 we have (4.4) 1 πN

|z| 2 <N s F (z) r = µ r (log |q| 2 N) r + r-1 ℓ=0 G r,ℓ (log |q| 2 N)•(log |q| 2 N) ℓ +O N -κ ,
where the functions G r,ℓ (t) (0 ≤ ℓ < r) are continuous and periodic (with period 1).

Proof. Since (4.1) is uniform in a neighbourhood of 1 and Φ(x, t) is analytic in x one can take derivatives at x = 1 at arbitrary order by using the formula

G (r) (1) = r! 2πi |x-1|=δ/2 G(x) (x -1) r+1 dx.
Furthermore, note that Φ(1, t) = π. Hence, the asymptotic leading term is given by (λ ′ (1)/λ(1)) r (log |q| 2 N) r and has no periodic fluctuations.

Note that if we combine Corollaries 1 and 2 then we also get error terms for the central moments of the form 1 πN

|z| 2 <N s F (z) -µ log |q| 2 N L = 1 √ 2π ∞ -∞ u L e -1 2 u 2 du + O N -κ ,
for every integer L ≥ 0. Furthermore, if we use the characteristic function E itY N = S N (e it )/S N (1) instead of the moment generating function E e tY N , that is, we set x = e it in Theorem 2, combined with Berry-Esseen techniques we get a central limit theorem with error terms, too:

1 πN # |z| 2 < N : s F (z) ≤ µ log |q| 2 N + y σ 2 log |q| 2 N = 1 √ 2π y -∞ e -1 2 u 2 du + O (log N) -1 2 .
Corollary 3. Suppose that F is integer valued and that (4.2) holds. Set

µ(x) = xλ ′ (x) λ(x) and σ 2 (x) = x 2 λ ′′ (x) λ(x) + µ(x) -µ(x) 2 . Furthermore, for k ∈ K(N) = Z ∩ µ(1 -δ 2 ) • log |q| 2 N, µ(1 + δ 2 ) • log |q| 2 N we define x k,N by µ(x k,N ) = k/ log |q| 2 N
, where δ and δ 2 are from Theorem 2. Then we have uniformly for k ∈ K(N)

#{z ∈ Z[i] : |z| 2 < N, s F (z) = k} = Φ(x k,N , log |q| 2 N) 2πσ 2 (x k,N ) log |q| 2 N N log |q| 2 λ(x k,N ) x -k k,N 1 + O 1 log N (4.5) Furthermore, if |k -µ log |q| 2 N| ≤ C log |q| 2 N (for some C > 0) we also have #{z ∈ Z[i] : |z| 2 < N, s F (z) = k} = πN 2πσ 2 log |q| 2 N exp - (k -µ log |q| 2 N) 2 2σ 2 log |q| 2 N 1 + O 1 √ log N . (4.6)
Note that µ = µ(1) and σ 2 = σ 2 (1).

Proof. We apply (4.1) and (4.3) and use Cauchy's formula:

#{z ∈ Z[i] : |z| 2 < N, s F (z) = k} = 1 2πi |x|=x k,N   |z| 2 <N x s F (z)   x -k-1 dx,
where x k,N is the saddle point of the asymptotic leading term of the integrand:

N log |q| 2 λ(x) x -k = e log λ(x)•log |q| 2 N -k log x .
We do not work out the details of standard saddle point techniques. We just refer to [START_REF] Drmota | The sum-of-digits function of squares[END_REF], where problems of almost the same kind have been discussed.

Corollary 4. Suppose that F is integer valued and that (4.2) holds. Then for every integer M ≥ 1 and all m ∈ {0, 1, . . . , M -1} we have

1 πN # |z| 2 < N : s F (z) ≡ m mod M = 1 M + O N -η
for some η > 0.

Remark 5. Alternatively to condition (4.2) we can assume that s F attains a value that is relatively prime to M. Then the same assertion holds, compare with Corollary 8.

Proof. We use (4.3) for all M-th roots of unity x = e 2πim/M and apply simple discrete Fourier techniques.

Corollary 5. Let s F be a block-additive function which attains one irrational value. Then the sequence (s

F (z)) z∈Z[i] is uniformly distributed modulo 1.
Remark 6. Note that Corollary 5 in particularly applies to sequences of the kind (αs

F (z)) z∈Z[i] if s F is integer valued and if α is irrational.
Proof. We only have to prove that there exists a block B of length L + 1 such that g F (B) is irrational. For this purpose we find a z 0 ∈ Z[i] with s F (z 0 ) irrational and with base q representation of minimal length. Then by Lemma 2 we write z 0 = ε 0 + qv and g F (B) = s F (z 0 )s F (v). Since the base q representation of v has one digit less than the representation of z 0 , s F (v) is rational, and therefore g F (B) is irrational. Choosing x g F (B) = e(hg F (B)) for h ∈ Z \ {0} gives a matrix A(x) with eigenvalues strictly less than |q| 2 . By Weyl's criterion this implies the assertion.

We now turn to the proof of Theorem 2. For this purpose we will consider the Dirichlet series

G B (x, s) = z∈Z[i]\{0}, (ε 0 (z),...,ε L (z))=B x s F (z) |z| 2s
for B ∈ N L+1 . It is easy to see that these series are well defined in a certain range. Set A 1 = max B∈N L+1 F (B) and

A 2 = min B∈N L+1 F (B). Then we have A 2 log |q| 2 |z| -O (1) ≤ s F (z) ≤ A 2 log |q| 2 |z| + O (1). Hence, if |x| ≥ 1 then G B (x, s) is surely absolutely convergent for ℜ(s) > 1 + 1 2 A 1 log |q| 2 |x|. Similarly, if |x| ≤ 1 then G B (x, s) is absolutely convergent for ℜ(s) > 1 -1 2 A 2 log |q| 2 (1/|x|).
Next we provide a representation for G B (x, s) that can be used for analytic continuation.

Lemma 3. Define the vectors G(x, s) = (G B (x, s)) B∈N L+1 and H(x, s) = (H B (x, s)) B∈N L+1
, where

H B (x, s) =                                      0, if η(B) = 0, x s F (η 0 ) |η 0 | 2s + x g F (B) |q| 2s v∈Z[i]\{0} (ε 0 (v),...,ε L-1 (v))=(0,...,0) x s F (v) 1 |v + η 0 /q| 2s - 1 |v| 2s , if η 0 = η(B) = 0 and B ′ = (0, . . . , 0), x g F (B) |q| 2s v∈Z[i]\{0} (ε 0 (v),...,ε L-1 (v))=B ′ x s F (v) 1 |v + η 0 /q| 2s - 1 |v| 2s , if η 0 = η(B) = 0 and B ′ = (0, . . . , 0). Then H B (x, s) is absolutely convergent for ℜ(s) > 1 2 + 1 2 A 1 log |q| 2 |x| (if |x| ≥ 1) and for ℜ(s) > 1 2 -1 2 A 2 log |q| 2 (1/|x|) (if |x| ≤ 1)
. More precisely, we have in that range Proof. We use the substitution z = η 0 + qv. If ε 0 (z) = η 0 = 0 we have s F (z) = s F (q) and consequently

(4.7) H(x, σ + it) ≪ (1 + |t|) 2(1-σ)+A 1 log |q| 2 |x| if |x| ≥ 1, (1 + |t|) 2(1-σ)-A 2 log |q| 2 (1/|x|) if |x| ≤ 1,
G B (x, s) = 1 |q| 2s v∈Z[i]\{0}, (ε 0 (v),...,ε L (v))=B ′ x s F (v) |v| 2s = 1 |q| 2s a 2 ℓ=0 G (B ′ ,ℓ) (x, s).
Similarly, if η 0 > 0 and B ′ = (0, . . . , 0) we get

G B (x, s) = x s F (η 0 ) |η 0 | 2s + x g F (B) |q| 2s v∈Z[i]\{0}, (ε 0 (v),...,ε L-1 (v))=(0,...,0) x s F (v) |v + η 0 /q| 2s = x g F (B) |q| 2s v∈Z[i]\{0}, (ε 0 (v),...,ε L-1 (v))=(0,...,0) x s F (v) |v| 2s + H B (x, s) = x g F (B) |q| 2s a 2 ℓ=0 G (0,...,0,ℓ) (x, s) + H B (x, s).
Finally, if η 0 > 0 and B ′ = (0, . . . , 0) then the case v = 0 cannot appear and we also get

G B (x, s) = x g F (B) |q| 2s v∈Z[i]\{0}, (ε 0 (v),...,ε L-1 (v))=B ′ x s F (v) |v + η 0 /q| 2s = x g F (B) |q| 2s a 2 ℓ=0 G (B ′ ,ℓ) (x, s) + H B (x, s). Now with A(x) = (A B,C (x)) B,C∈N L+1 this directly translates to G(x, s) = 1 |q| 2s A(x)G(x, s) + H(x, s) which implies (4.8). Set s = σ + it. Since |v + ℓ/η 0 | 2s -|v| 2s ≪ |v| 2σ min 1, 1 + |t| |v| it easily follows that H B (x, s) is absolutely convergent for ℜ(s) > 1 2 + 1 2 A 1 log |q| 2 |x| (if |x| ≥ 1) and for ℜ(s) > 1 2 -1 2 A 2 log |q| 2 (1/|x|) (if |x| ≤ 1)
and that H(x, s) is bounded by (4.7).

If we set a n = |z| 2 =n x s F (z) then G(s, x) = n≥1 a n n -s and Mellin-Perron's formula gives (for non-integral N)

(4.9) n<N a n = 0 =|z| 2 <N x sq(z) = 1 2πi lim T →∞ c+iT c-iT G(x, s) N s s ds
for any sufficiently large c such that the line ℜ(s) = c is contained in the half-plane of convergence of G(x, s).

We will first use this representation to get upper bounds for the sum 0 =|z| 2 <N x sq(z) . For this purpose we have to know something on the dominant eigenvalue λ(x) of A(x). Lemma 4. If x is sufficiently close to the positive real axis then λ(x) is a simple eigenvalue of A(x) and all other eigenvalues have smaller modulus.

Furthermore, if F is integer valued such that (4.2) holds and if x = 0 is not a positive real number then all eigenvalues β of A(x) are bounded by Proof. Suppose first that x is a positive real number. Then it easily follows that A(x) is a primitive irreducible nonnegative matrix. We just have to observe that for every pair of blocks B, C ∈ N L+1 there exists a Gaussian integer z such that both, B and C, occur in the q-ary digital expansion of z. Hence, all elements of A(x) L+1 are positive and consequently by [24, Theorem 2.1, p. 49] A(x) is primitive and irreducible. Thus, λ(x) > 0 is simple and all other eigenvalues have smaller modulus. By continuity, this property remains true if x is sufficiently close to the positive real axis. Next, suppose that x = |x|e iϕ with 0 < ϕ < 2π is not a positive real number. Since |x g F (B) | = |x| g F (B) [24, Theorem 2.1, p. 36] implies that all eigenvalues β of A(x) are bounded by |β| ≤ λ(|x|). Furthermore, equality |β| = λ(|x|) holds if and only if there exists a complex number µ with |µ| = 1 and a diagonal matrix

D = diag(µ B ) B∈N L+1 with complex numbers µ B of modulus |µ B | = 1 such that A(x) = λ D A(|x|) D -1 .
Without loss of generality we may assume that µ 00•••0 = 1.

We now show that in this case µ = 1 and

µ B = 1 for all B ∈ N L+1 , resp. A(x) = A(|x|). First observe that A 00•••0, 00•••0 (x) = 1 (for all x). Thus, µ = 1. Furthermore, observe that A B,C (x) = A B,C (|x|) = 0 implies µ B = µ C . Obviously, we have A B,C (x) = A B,C (|x|) = 0 if C = (B ′ ,
ℓ) (for some ℓ) and η B = 0. Thus, if B = (η 1 , . . . , η L ) is any block in N L+1 then we can consider the sequence of blocks B 0 = (0, 0, . . . , 0), B 1 = (0, . . . , 0, η 1 ), B 2 = (0, . . . , 0, η 1 , η 2 ), . . . , B L = B and can conclude inductively that

1 = µ B 0 = µ B 1 = • • • = µ B .
However, if (4.2) holds then for every ϕ, 0 < ϕ < 2π, there exists B ∈ N L+1 with e iϕg F (B) = 1 and, thus, x g F (B) = |x| g F (B) . Consequently, all eigenvalues β of A(|x|e iϕ ) are strictly bounded by |β| < λ(|x|).

Next note that the inverse matrix ((I -uA(x)) -1 can be written as

(I -uA(x)) -1 = 1 det (I -uA(x)) (P BC (u, x)) B,C∈N L+1
with polynomials P BC (u, x) having degree in u smaller than D := |N L+1 | = |q| 2L+2 . As above let λ(x) be the dominating eigenvalue of A(x) and λ 2 (x), . . . , λ D (x) the remaining ones (where we assume that x is sufficiently close to the real axis and that all roots are simple.) Then by the partial fraction decomposition we have (4.11)

P BC (u, x) det (I -uA(x)) = C BC (x) 1 -uλ(x) + D j=2 C j,BC (x) 1 -uλ j (x)
for certain (analytic) function C BC (x) and C j,BC (x). This also shows that G(x, s) can be represented as

(4.12) G(x, s) = K(x, s) 1 -1 |q| 2s λ(x) + D j=2 K j (x, s) 1 -1 |q| 2s λ j (x)
, where K(x, s) resp. K j (x, s) are linear combination of the functions H B (x, s) with coefficients that are analytic in x, compare also with (4.20). This shows that (4.8) provides an analytic continuation of G(s, x) to the the range ℜ(s) > log |q| 2 |λ(x)| if x is sufficiently close to 1, say |x -1| ≤ δ. Furthermore, if |x -1| ≥ δ and |ℜ(x) -1| ≤ δ 2 then Lemma 4 shows that all eigenvalues β of A(x) satisfy |β| ≤ λ(|x|)η ′ for some η ′ . Consequently, for all x in that range the function G(x, s) is analytic in the half plane

ℜ(s) > log |q| 2 (λ(|x|) -η ′ ).
With help of this knowledge we are now ready to prove the second part of Theorem 2. The proof method is close to that of [START_REF] Grabner | Harmonic properties of the sum-of-digits function for complex bases[END_REF].

Lemma 5. Suppose that F is integer valued and that (4.2) holds. Then there exists δ > 0 and κ > 0 such that (4.13)

|z| 2 <N x s F (z) ≪ N log |q| 2 λ(|x|)-κ uniformly for |x -1| ≥ δ and |ℜ(x) -1| ≤ δ 2
Proof. Our starting point is formula (4.9). Observe that the integral is not absolutely convergent. However, a slight variation of the Mellin-Perron formula gives (4.14)

S

(2)

N (x) = 0 =|z| 2 <N x sq(z) 1 - |z| 2 N = 1 2πi c+i∞ c-i∞ G(x, s) N s s(s + 1)
ds with an integral that will be absolutely convergent in the range of interest. Suppose now that |x -1| ≥ δ and |ℜ(x) -1| ≤ δ 2 . Then we already know that G(x, s) is analytic for ℜ(s) > log |q| 2 (λ(|x|)η ′ ) and that it can be estimated by

|G(x, s)| ≪ (1 + |t|) 2(1-σ)+η ′′ if σ = ℜ(s) ≥ log |q| 2 (λ(|x|) -η ′ /2) > log |q| 2 λ(|x|) -η ′′′ . Thus, it follows that S (2)
N (x) ≪ N log |q| 2 λ(|x|)-η ′′′ . It is now easy to derive proper upper bounds for

S N (x) = 0 =|z| 2 <N x sq(z)
Observe that for every factor ρ > 1 we have

S N (x) = ρS (2) ρN (x) -S (2)
N (x) ρ -1 + 1 ρ -1 N ≤|z| 2 <ρN x s F (z) 1 - |z| 2 N .
Set c = log |q| 2 λ(|x|)η ′′′ . By adjusting δ 2 we can assume that c < 1.

Finally with

ρ = 1 + N -(1-c)/2
it follows that

S N (x) ≪ N (1+c)/2 N max(A 1 log |q| 2 (1+δ 2 ),A 2 log |q| 2 (1-δ 2 )) .
Since δ 2 can be chosen arbitrarily small it finally follows that

S N (x) ≪ N log |q| 2 λ(|x|)-η ,
where η > 0.

In order to prove the asymptotic expansion (4.1) for complex x (close to 1) we will use the following properties (see also [3, p. 243]). Lemma 6. Suppose that a and c are positive real numbers. Then

1 2πi c+iT c-iT a s ds s -1 ≤ a c πT log a (a > 1), (4.15) 1 2πi c+iT c-iT a s ds s ≤ a c πT log(1/a) (0 < a < 1), (4.16) 1 2πi c+iT c-iT a s ds s - 1 2 ≤ C T (a = 1). (4.17)
Proof. Suppose first that a > 1. By considering the contour integral of the function F (s) = a s /s around the rectangle with vertices -A -iT, c -iT, c + iT, -A + iT and passing A to infinity one directly gets the representation

1 2πi c+iT c-iT a s ds s = Res(a s /s; s = 0) + 1 2πi c -∞ a x+iT x + iT dx + 1 2πi c -∞ a x-iT x -iT dx. Since 1 2πi c -∞ a x±iT x ± iT dx ≤ a c πT log a
we directly obtain the bound in the case a > 1.

The case 0 < a < 1 can be handled in the same way. And finally, in the case a = 1 the integral can be explicitly calculated (and estimated).

For the formulation of the next lemma we use Iverson's notation [[p]

] which is 1 if p is a true proposition and 0 else. Lemma 7. Suppose that ℓ is a positive real number, λ a non-zero complex number c a real number with c > log |q| 2 |λ|. Then we have for all real numbers N > ℓ 2 1 2πi lim

T →∞ c+iT c-iT 1 ℓ 2s 1 -1 |q| 2s λ N s s ds = λ ⌊log |q| 2 (N/ℓ 2 )⌋+1 -1 λ -1 (4.18) - 1 2 λ ⌊ log |q| 2 (N/ℓ 2 )⌋ [[log |q| 2 (N/ℓ 2 ) ∈ Z]]
Furthermore, if c > max{1, log |q| 2 |λ|} and x is sufficiently close to 1 then we have for every set of S of Gaussian integers with 0 ∈ S and all irrational numbers N > 1

1 2πi lim T →∞ c+iT c-iT z∈S x s F (z) 1 |qz+ℓ| 2s -1 |qz| 2s 1 -1 |q| 2s λ N s s ds = 1 1 -λ -1 z∈S x s F (z) λ ⌊log |q| 2 (N/|qz+ℓ| 2 )⌋ -λ ⌊log |q| 2 (N/|qz| 2 )⌋ (4.19) - 1 2 z∈S x s F (z) λ ⌊log |q| 2 (N/|qz+ℓ| 2 )⌋ [[log |q| 2 (N/|qz + ℓ| 2 ) ∈ Z]] + 1 2 z∈S x s F (z) λ ⌊log |q| 2 (N/|qz| 2 )⌋ [[log |q| 2 (N/|qz| 2 ) ∈ Z]] + O (1) .
Proof. By assumption we have |λ/|q| 2s | < 1. Thus, by using a geometric series expansion and Lemma 6 we get for all N > 1 such that log |q| 2 (N/ℓ 2 ) is not an integer

1 2πi c+iT c-iT 1 ℓ 2s 1 -1 |q| 2s λ N s s ds = k≥0 λ k 1 2πi c+iT c-iT N |q| 2k ℓ 2 s ds s = k≤log |q| 2 (N/ℓ 2 ) λ k + O   1 T k≥0 |λ| k N |q| 2k ℓ 2 c log N |q| 2k ℓ 2   = λ ⌊ log |q| 2 (N/ℓ 2 )⌋+1 -1 λ -1 + O 1 T (N/ℓ 2 ) c 1 -
1 |qz+ℓ| 2s 1 -1 |q| 2s λ N s s ds = λ ⌊log |q| 2 (N/|qz+ℓ| 2 )⌋+1 -1 λ -1 + O   1 T k≥0 |λ| k N |q| 2k |qz+ℓ| 2 c log N |q| 2k |qz+ℓ| 2   and if N < |qz + ℓ| 2 then we just have 1 2πi c+iT c-iT 1 |qz+ℓ| 2s 1 -1 |q| 2s λ N s s ds = O   1 T k≥0 |λ| k N |q| 2k |qz+ℓ| 2 c log N |q| 2k |qz+ℓ| 2   .
Furthermore, for given N there are only finitely many pairs (k, z) with

N |q| 2k |qz + ℓ| 2 -1 < 1 2
.

Hence, the series

z∈S k≥0 |λ| k N |q| 2k |qz+ℓ| 2 c log N |q| 2k |qz+ℓ| 2 is convergent if x is sufficiently close to 1. Consequently we get 1 2πi lim T →∞ c+iT c-iT z∈S x s F (z) 1 |qz+ℓ| 2s -1 |qz| 2s 1 -1 |q| 2s λ N s s ds = 1 1 -λ -1 z∈S,|z| 2 <N x s F (z) λ ⌊log |q| 2 (N/|qz+ℓ| 2 )⌋ -λ ⌊log |q| 2 (N/|qz| 2 )⌋ + O (1) .
Finally, since |qz + ℓ| 2 = |qz| 2 (1 + O (1/|z|)) it follows that for x sufficiently close to 1 we have

z∈S,|z| 2 ≥N x s F (z) λ ⌊log |q| 2 (N/|qz+ℓ| 2 )⌋ -λ ⌊log |q| 2 (N/|qz| 2 )⌋ = O (1) .
This proves (4.19) if neither log |q| 2 (N/|qz + ℓ| 2 ) nor log |q| 2 (N/|qz| 2 ) are integers. It is, however, easy to adapt the above calculation in the general case.

We now come back to the representation (4.12) for G(s, x). We already mentioned that K(s, x) and K j (s, x) are linear combinations of the functions H B (x, y) with coefficients that are analytic in x. We make this explicit for K(s, x) in the following form:

K(s, x) = a 2 ℓ=1 c ′ ℓ (x) ℓ 2s (4.20) + a 2 ℓ=1 B ′ ∈L L c ′′ ℓ,B ′ (x) z∈Z[i]\{0} (ε 0 (z),...,ε L-1 (z))=B ′ x s F (z) 1 |qz + ℓ| 2s - 1 |qz| 2s
Hence, we obtain for N > 1

1 2πi lim T →∞ c+iT c-iT K(x, s) 1 -1 |q| 2s λ(x) N s s ds = 1 1 -λ(x) -1 a 2 ℓ=1 c ′ ℓ (x)λ(x) ⌊log |q| 2 N ℓ 2 ⌋ + a 2 ℓ=1 B ′ ∈L L c ′′ ℓ,B ′ (x) 1 -λ(x) -1 z =0 x s F (z) λ(x) log |q| 2 N |qz+ℓ| 2 -λ(x) log |q| 2 N |qz| 2 - 1 2 a 2 ℓ=1 c ′ ℓ (x)λ(x) ⌊log |q| 2 N ℓ 2 ⌋ [[log |q| 2 N ℓ 2 ∈ Z]] - 1 2 a 2 ℓ=1 B ′ ∈L L c ′′ ℓ,B ′ (x) z =0
x s F (z) λ(x)

log |q| 2 N |qz+ℓ| 2 [[log |q| 2 N |qz + ℓ| 2 ∈ Z]] + 1 2 a 2 ℓ=1 B ′ ∈L L c ′′ ℓ,B ′ (x) z =0
x s F (z) λ(x)

log |q| 2 N |qz| 2 [[log |q| 2 N |qz| 2 ∈ Z]] + O (1) ,
where the O (1)-term is uniform for N > 1 and for x in a complex neighbourhood of x = 1. Note that the correction terms vanish if N is, for example, irrational. Actually we will prove in Lemma 8 that these correction terms can be always neglected since they sum up to zero in all cases.

Furthermore, note that the right hand side of this representation is of order O N log |q| 2 ℜ(λ(x)) . Thus, if we do corresponding calculations for K j (x, s) and λ j (x) also get

1 2πi lim T →∞ c+iT c-iT K j (x, s) 1 -1 |q| 2s λ j (x) N s s ds = O N log |q| 2 ℜ(λ j (x) .
Hence, setting

(4.21) Φ(x, t) = λ(x) -t 1 -λ(x) -1 a 2 ℓ=1 c ′ ℓ (x)λ(x) ⌊t-log |q| 2 ℓ 2 ⌋ + a 2 ℓ=1 B ′ ∈L L λ(x) -t c ′′ ℓ,B ′ (x) 1 -λ(x) -1 z =0 x s F (z) λ(x) t-⌊log |q| 2 |qz+ℓ| 2 ⌋ -λ(x) ⌊t-log |q| 2 |qz| 2 ⌋ and (4.22) Φ(x, t) = - λ(x) -t 2 a 2 ℓ=1 c ′ ℓ (x)λ(x) ⌊t-log |q| 2 ℓ 2 ⌋ [[t -log |q| 2 ℓ 2 ∈ Z]] - λ(x) -t 2 a 2 ℓ=1 B ′ ∈L L c ′′ ℓ,B ′ (x) z =0 x s F (z) λ(x) ⌊ t-log |q| 2 |qz+ℓ| 2 ⌋ [[t-log |q| 2 |qz+ℓ| 2 ∈ Z]] + λ(x) -t 2 a 2 ℓ=1 B ′ ∈L L c ′′ ℓ,B ′ (x) z =0 x s F (z) λ(x) ⌊ t-log |q| 2 |qz| 2 ⌋ [[t -log |q| 2 |qz| 2 ∈ Z]]
we end up with the representation (4.23)

S N (x) = Φ(x, log |q| 2 N) + Φ(x, log |q| 2 N) N log |q| 2 λ(x) • 1 + O N -κ ,
where κ > 0 is just the minimal difference between ℜ(λ(x)) and ℜ(λ j (x)) (j ≥ 2) when x varies in a sufficiently small neighbourhood of x = 1. By definition it is clear that Φ(x, t) = Φ(x, t + 1), Φ(x, t) = Φ(x, t + 1) and that Φ(x, t) and Φ(x, t) represent analytic functions in x if t is fixed. However, Φ(x, log |q| 2 N) = 0 if N is irrational. Thus, it is natural to expect that Φ(x, t) = 0 for all t which is in fact true. The next lemma provides this fact and also the continuity of Φ(x, t). The proof of Theorem 2 is then completed.

Lemma 8. The function Φ(x, t) is Hölder continuous in t and analytic for x in a complex neighbourhood of x = 1. Furthermore, Φ(x, t) = 0 for all t.

Remark 7. In particular this shows that Φ(x, t) from Theorem 1 equals Φ(x, t) for real x.

Proof. First assume that x is real. By considering N = |q| 2(n+t) for n = 0, 1, 2 . . . it follows from Theorem 1 and (4.23) that Φ(x, t) = Φ(x, t) + Φ(x, t). Furthermore, we have Φ(x, t) = 0 if t is not of the form t = log |q| 2 mk for some positive integers m and k. (This occurs, for example, if t = log |q| 2 T for some irrational number T .) Since t with this property are dense in [0, 1) it follows that Φ(x, t) is continuous in t if and only if Φ(x, t) = 0 for all t. This observation can be also deduced from the subsequent inequality (4.24) which is also true for complex x. Hence, continuity of the mapping t → Φ(x, t) follows from Φ(x, t) = 0 even if x is a complex number. We now suppose that t ∈ [0, 1) is of the form t = log |q| 2 mk for some positive integers m and k where we assume that k is chosen to be minimal. If s = t is also of that form, that is s = log |q| 2 nj ∈ [0, 1) for positive integers n and j, then we have (for a properly chosen constant c > 0)

|s -t| ≥ c • |q| 2s -|q| 2t ≥ 1 |q| 2(k+j) .
In particular we obtain

|q| 2j ≥ c 1 |q| 2k |s -t| .
Observe that only terms of the form λ(x) -j contribute to Φ(x, s); here n = |qz + ℓ| 2 resp. n = |qz| 2 for some z ∈ Z[i]. Thus, if we fix some ε > 0 there exists δ > 0 such that Φ(x, s) < ε for all s with |s -t| < δ.

Next observe that if t = log |q| 2 mk then for 0 < θ < 1

λ(x) ⌊ (t+θ)-log |q| 2 ℓ 2 ⌋ -λ(x) ⌊ (t-θ)-log |q| 2 ℓ 2 ⌋ 1 -1/λ(x) = λ -k -λ -k-1 1 -1/λ(x) = λ -k = λ(x) ⌊ t-log |q| 2 ℓ 2 ⌋ .
Thus, by a similar reasoning as above we also get

(4.24) Φ(x, t + θ) -Φ(x, t -θ) + 1 2 Φ(x, t) < ε if 0 < θ < δ. Furthermore, by continuity of Φ(x, t) = Φ(x, t) + Φ(x, t) we have |Φ(x, t + θ) -Φ(x, t -θ)| = Φ(x, t + θ) + Φ(x, t + θ) -Φ(x, t -θ) + Φ(x, t -θ) < ε in that range. Consequently Φ(x, t) ≤ 2 Φ(x, t + θ) -Φ(x, t -θ) + 2ε ≤ 2 |Φ(x, t + θ) -Φ(x, t -θ)| + 6ε < 7ε.
Since ε > 0 can be chosen arbitrarily small it follows that Φ(x, t) = 0. Thus, we have shown that Φ(x, t) = 0 for all t if x is a real number close to 1. Since Φ(x, t) is an analytic function in x we obtain Φ(x, t) = 0 for complex x close to 1, too. As mentioned above this implies that Φ(x, t) is continuous in t even if x is a complex number close to 1.

Similarly we can argue to show that Φ(x, t) is Hölder continuous in t. Here we just have to use a quantified version of (4.24). We leave the details to the reader.

A method based on ergodic Z[i]-actions and skew products

In this section we will consider block additive functions s F taking values in an abelian group A, hence one has F : A L+1 → A. The neutral element will be denoted by 0 A . We assume that A is compact metrisable, equipped with its Haar measure λ A and introduce the metrisable compact space Ω :

= A Z[i] . The shift Z[i]-action Σ : ζ → Σ ζ on Ω is defined by setting for all ω : z → ω z and all ζ ∈ Z[i]: (Σ ζ (ω)) z := ω ζ+z .
For any ω ∈ Ω, let consider its orbit closure K ω which is the topological closure of its orbit

O ω := {Σ ζ (ω); ζ ∈ Z[i]} under the shift. Readily K ω is a compact subspace of Ω and Σ ζ (K ω ) = K ω for all ζ ∈ Z[i]. The restriction of Σ ζ on K ω , still denoted by Σ ζ , is a homeomorphism of K ω , defining the shift Z[i]-action Σ : ζ → Σ ζ on K ω .
By definition, the couple K ω := (Σ, K ω ) is the flow associated to ω.

The function s F can be viewed as an element of the compact space Ω := A Z [i] . For short we set K(F ) (resp. K(F )) in place of K s F (resp. K s F ) and we set I(F

) := {s F (z); z ∈ Z[i]}. Lemma 9. Assume that A is a compact metrisable group, then the closure A(F ) of the set I(F ) is a subgroup of A.
Proof. It is clear that the neutral element 0 A of A belong to I(F ) so that, due to compactness, it is enough to prove that for any a and a ′ in A(F ) one has a + a ′ in A(F ). Let U be any neighbourhood of the neutral element 0 A of A and let V be another neighbourhood of 0 A such that V + V ⊂ U. By assumption there exists Gaussian integers z and z ′ such that s

F (z) -a ∈ V and s F (z ′ ) -a ′ ∈ V . Taking z ′′ = z + q length q (z)+L+1 z ′ one gets s F (z ′′ ) -(a + a ′ ) = s F (z) -a + s F (z ′ ) -a ′ ∈ V + V . Hence s F (z ′′ ) -(a + a ′ ) ∈ U proving that a + a ′ belongs to A[F ].
In the next theorem we make use of the following simple result: Lemma 10. For any neighbourhood V of 0 A in A there exists a finite set

B = B(V ) of Z[i] such that for all r ∈ Z[i] there exists b ∈ B such that s F (r + b) ∈ V .
Proof. We may assume that V = -V otherwise replace V by V ∩ (-V ). Since I(F ) is dense in A(F ) and A(F ) is compact there exists an integer

N = N(V ) such that A(F ) ⊆ z,length q (z)≤N s F (z) + V.
Giving any Gaussian integer r we use the q-adic expansion of r to write the decomposition r = r ′ + q N +L+1 t with length q (r ′ ) ≤ N + L + 1 and choose r ′′ with length q (r ′′ ) ≤ N such that -s

F (t) ∈ V + s F (r ′′ ). With b = -r ′ + r ′′ we get s F (r + b) = s F (r ′′ + q N +L+1 t) = s F (r ′′ ) + s F (t) ∈ V.
In addition, from Lemma 1,

length(b) ≤ c + log(|r ′ | + |r ′′ | log |q| ≤ c + log 2 + log |q|(c + N + L + 1) log |q| ≤ c ′ + N + L + 1 .
The proof ends by taking

B := {z ∈ Z[i] ; length q (z) ≤ c ′ + N + L + 1}.
We are ready to prove the main result on the topological structure of K(F ).

Theorem 3. The flow K(F ) is minimal, that is to say if M is any nonempty compact subspace of K(F ) such that Σ ζ (M) ⊂ M for all ζ ∈ Z[i] then M = K(F ).
Proof. Since K(F ) is the orbit closure of s F , it is enough to prove that s F is uniformly recurrent (see [START_REF] Furstenberg | Recurrence in ergodic theory and combinatorial number theory[END_REF]Section 4]). To this aim we have to show that for any neighbourhood W of 0 Ω , the neutral element of Ω, the set S(W ) := {u ∈ Z[i]; Σ u (s F )s F ∈ W } is syndetic, that is to say there is a finite set E such that Z[i] = S(W ) + E. We may restrict to fundamental neighbourhoods that are of the form

W (M, U) = length q (z)≤M {ω ∈ Ω ; ω z ∈ U}
where U is any neighbourhood of 0 A . For the sequel, we introduce a neighbourhood

V of 0 A such that V + V ⊂ U, a finite set B = B(V ) of Z[i]
given by Lemma 10 and let h = max{length q (b) ; b ∈ B}. Let us start with any Gaussian integer z and write the decomposition z = z ′ + q M +L+1 r with length q (z ′ ) ≤ M +L+1. By Lemma 1, length(-z ′ ) ≤ 2c+M +L+1 and there exists r ′ ∈ B such that s F (r + r ′ ) ∈ V . Now chose ζ = -z ′ + q M +L+1 r ′ . By construction z + ζ = q M +L+1 (r + r ′ ) which implies s F (z + ζ + t)s F (t) ∈ V for all Gaussian integers t of length at most M. This means that z + ζ belongs to S(W ) with

length q (ζ) ≤ c + log(|z ′ | + |r ′ ||q| M +L+1 ) log |q| ≤ c ′′ + M + L + 1 + h
were c ′′ is an absolute constant. Therefore ζ belongs to a finite subset of Z[i] and consequently S(W ) is syndetic. Now we introduce tools from ergodic theory to prove rather general distribution results on block-additive functions. We will use ideas discussed in more details in [START_REF] Grabner | Harmonic properties of the sum-of-digits function for complex bases[END_REF] and refer to this paper for a detailed exposition of the method.

The general idea of an approach motivated by ergodic theory is to build a dynamical system (X, T, µ) from the underlying digital expansion. The space X is then a suitably chosen compactification of Z[i], the action T : Z[i] → Aut(X) is simply addition by elements of Z[i]. Since the compactification X carries a natural group structure in our case, µ is chosen as the Haar measure on this group. Since no non-trivial block additive function can be extended to a continuous or even measurable function on X (see Remark 9 below), we use a trick developed by T. Kamae [START_REF] Kamae | Mutual singularity of spectra of dynamical systems given by "sums of digits" to different bases[END_REF], which overcomes this problem by constructing a suitable cocycle (we will introduce this notion below). The fact that the additive function has no extension to X is then reflected by the non-triviality of the cocycle.

Consider the infinite product space K q = {0, 1, . . . , a 2 } N 0 and embed Z[i] by q-adic digital expansion

ι : Z[i] → K q z → (ε 0 (z), ε 1 (z), . . . , ε L (z), 0, 0 . . .).
Then it was proved in [START_REF] Grabner | Harmonic properties of the sum-of-digits function for complex bases[END_REF] that addition in Z[i] can be extended continuously to K q . By this construction K q inherits a group structure by

K q = proj lim n→∞ Z[i]/q n Z[i].
The corresponding Haar measure µ is the infinite product measure of uniform distribution on the digits. The cylinder set of base (x 0 , . . . , x n ) ∈ {0, . . . , a 2 } n+1 is given by

[x 0 , . . . , x n ] := x 0 + x 1 q + • • • + x n q n + q n+1 K q = {z ∈ K q ; ε 0 (z) = x 0 , . . . , ε n (z) = x n } .
The Haar measure of such sets is given by µ([x 0 , . . . , x n ]) = |q| -n-1 . The Gaussian integers Z[i] act on K q by addition

T : Z[i] → Aut(K q ) z → (x → x + z).
This continuous action is uniquely ergodic.

Definition 1. A sequence (Q n ) n∈N of finite subsets of Z[i] is called a Følner sequence, if it has the following properties (1) ∀n : Q n ⊂ Q n+1 (2) There exists a constant K such that ∀n : #(Q n -Q n ) ≤ K#Q n (3) ∀g ∈ Z[i] : lim n→∞ #(Q n △ (g + Q n )) #Q n = 0 (△ denotes the symmetric difference).
Classical examples of such sequences, are the sequence of balls of radius

√ n, Q n = {z ∈ Z[i]; |z| 2 < n}, or the squares Q n = {z ∈ Z[i]; |ℜ(z)| < n, |ℑ(z)| < n}.
Another example more connected to digital expansions are the "discrete q-adic dragons" Q n = {z ∈ Z[i]; length q (z) ≤ n}.

We recall that a point x ∈ X is called (T, µ)-generic (or simply generic, if the underlying action is clear), if

(5.1) ∀f ∈ C(X) : lim n→∞ 1 #Q n z∈Qn f • T z (x) = X f dµ
for a Følner sequence (Q n ) n∈N . By Tempel'man's ergodic theorem (cf.[21, Chapter 6, Theorem 4.4]) µ-almost all points are generic. Clearly, for a uniquely ergodic continuous action every point is generic and even more, the convergence in (5.1) is uniform in x.

For uniquely ergodic non-continuous actions we need additional conditions, which will be developed below, to have the same conclusion. To this aim we introduce the following definition. Definition 2. Let X be a compact metrisable space and T : Z

[i] × X → X a Borel-measurable Z[i]-action. A subset A ⊂ X is called uniformly T - negligible, if ∀ε > 0, ∃g ∈ C(X), g ≥ ½ A : lim sup n→∞ 1 #Q n z∈Qn g • T z ∞ < ε for a Følner sequence (Q n ) n∈N .
Definition 3. Let X be a compact metrisable space and T : Z

[i] × X → X a Borel-measurable Z[i]-action. The action T is called uniformly quasi- continuous, if for every z ∈ Z[i] the set of discontinuity points of T z is uniformly T -negligible.
Remark 8. If T is uniformly quasi-continuous and µ is a T -invariant Borel probability measure on X, then T is µ-continuous.

The following theorem is an adapted version of [23, Annexe, Théorème]. The proof is slightly simplified by the fact that the action is invertible. Theorem 4. Let T be a uniformly quasi-continuous Z[i]-action on the compact metric space X and assume that T is uniquely ergodic with invariant measure λ. Then for any λ-continuous function f we have

(5.2) lim n→∞ 1 #Q n z∈Qn f • T z (x) = X f dλ uniformly in x.
Proof. Let R λ denote the Banach space of real valued λ-continuous functions on X equipped with the uniform norm and let

E = {g -g • T z ; g ∈ R λ , z ∈ Z[i]} .
Then λ defines a linear form on R λ with ker(λ) ⊆ E. We will show that we have equality in fact. Let L : R λ → R be a continuous linear form with E ⊆ ker(L) and L(1) = 1. Define for f ≥ 0

|L|(f ) = sup {L(g); g ∈ R λ , |g| ≤ f } .
Then |L| can be extended to a continuous positive linear form on R λ . Thus |L| determines a measure ℓ on X.

We will now prove that |L| and therefore ℓ is T -invariant. By definition we have for f ≥ 0 Summing up, for every f ∈ R λ and every ε > 0 there exists a k ∈ N, g 1 , . . . , g k ∈ R λ , and z

|L|(f • T z ) = sup {L(g); g ∈ R λ , |g| ≤ f • T z } ≥ sup {L(g • T z ); g • T z ∈ R λ , |g • T z | ≤ f • T z } ≥ |L|(f ),
1 , . . . , z k ∈ Z[i] such that f -λ(f ) - k m=1 (g m -g m • T zm ) ∞ < ε.
Applying the ergodic means to this inequality and using (3) in Definition 1 finishes the proof.

We recall the definition of a cocycle: Definition 4. Let (X, T, µ) be a Z[i]-action on X and A an abelian group. A T -cocycle (or simply a cocycle, if the underlying action T is fixed) is a Borel map a : Z

[i] × X → A such that (i) a(g + h, x) = a(g, T h x) + a(h, x) µ -a.e., (ii) µ 
 g∈Z[i] ({x | T g x = x} ∩ {x | a(g, x) = 0 A })   = 0.
If we assume that T is aperiodic, i.e. µ({x | ∃g = 0, T g x = x}) = 0, then condition (ii) is always satisfied. A cocycle a is called a coboundary, if there exists a Borel map f :

X → A, such that ∀x ∈ X, g ∈ Z[i] : a(g, x) = f (T g x) -f (x).
The skew product (X × A, T a , µ ⊗ λ A ) corresponding to the cocycle a is given by

(5.3) T a : Z[i] → Aut(X × A) z → ((x, b) → (x + z, b + a(z, x))).
Definition 5. An element α ∈ A is said to be an essential value of the cocycle a if for every neighbourhood N(α) of α in A and for every B ∈ B(X) (Borel sets) with µ(B) > 0,

(5.4) µ   g∈Z[i] B ∩ T -1 g (B) ∩ {x | a(g, x) ∈ N(α)}   > 0. Let E(a) = {α ∈ A | α is an essential value of a}.
This definition does not require ergodicity of T . We have the following proposition.

Proposition 2 (cf. [START_REF] Schmidt | Cocycles on ergodic transformation groups[END_REF]). Let a : Z[i] × X → A be a cocycle, then the following properties hold:

(1) If b : Z[i] × X → A is a coboundary then E(a + b) = E(a). (2) E(a) is a closed subgroup of A. (3) a is a coboundary ⇔ E(a) = {0 A }.
Let I be the set of T a -invariant elements in B ⊗ B A and put

I(a) = {β ∈ A | µ ⊗ h A (τ β B △ B) = 0 for every B ∈ I} where τ β : X × A → X × A is given by τ β (x, α) = (x, α + β).
The set of essential values is directly related to the ergodicity of the skew product action T a by the following theorem of K. Schmidt.

Theorem 5 ([25, Theorem 5.2]). Let T be an ergodic action on (X, B, µ) which is assumed to be non-atomic. Then for any cocycle a : G × X → A:

E(a) = I(a). Corollary 6. If T is ergodic, then T a is ergodic ⇔ E(a) = A.
The cocycle suitable for our purposes is defined as

(5.5) a F (z, x) =    lim w→x w∈Z[i]
(s F (w + z)s F (w)) if the limit exists 0 otherwise.

The limit exists, if the carry propagation in the addition x + z terminates after finitely many steps. It was proved in [START_REF] Grabner | Harmonic properties of the sum-of-digits function for complex bases[END_REF] that for almost all x ∈ K q the addition x + z produces only finitely many carries. Thus a F (z, x) is defined for µ-almost all x. Furthermore, since a F (z, •) is constant on cylinder sets defined by the different possible carries in the addition x + z (cf. [START_REF] Grabner | Harmonic properties of the sum-of-digits function for complex bases[END_REF]), a F is also µ-continuous. Furthermore, notice that the set of discontinuity points of a F (z, •) is closed, hence it is also uniformly T -negligible by the unique ergodicity of the continuous action T . Thus we have proved Lemma 11. The skew product action T a F given by (5.3) is uniformly quasicontinuous.

We naturally define Proof. We need the following lemma which is the analog of [5, Lemma 12] but in the case of cocycles for Z[i]-action.

V (a F ) = {a F (z, x) | x ∈ K q , z ∈ Z[i]},
Lemma 12. Let α ∈ A and assume that for any neighbourhood V = V (α) of α in A there exists a constant κ > 0 such that for all non empty cylinder set C of K q there exists ζ ∈ Z[i] such that the inequality

µ(C ∩ T ζ (C) ∩ {x ∈ K q ; a F (ζ, x) ∈ V }) ≥ κµ(C).
holds. Then α ∈ E(a F ). Going back to the proof of Proposition 4, it is enough to prove that a F (y, z 0 ) ∈ E(a F ) for every y, z 0 ∈ Z[i], y = (y 0 , y 1 , . . . , y t ) q . Let C be any non empty cylinder set, say

C = [ε 0 , ε 1 , . . . , ε k ].
Take ζ = q k+L+3 z 0 and consider C 0 = [ε 0 , ε 1 , . . . , ε k , 0, . . . , 0 L+2 , y 0 , y 1 , . . . , y t , 0, . . . , 0 M ] with M = 4 + max(0, length q (z 0 )t). One has µ(C 0 ) = κµ(C) with κ = 3) in Proposition 2 one sees that if s F can be extended to a measurable map on K q , then the cocycle a F is a coboundary, hence s F is trivial i.e., s F (z) = 0 A for all z ∈ Z[i].

Putting together Proposition 4, Corollary 6, and Lemma 11 we obtain Proposition 5. Let s F be a block-additive function taking its values in the compact abelian metrisable group A and let a F be the corresponding cocycle defined by (5.5), and assume that A(F ) = A. Then the skew product T a F is uniquely ergodic and more precisely, for all µ ⊗ λ A -continuous maps f :

X × A → C lim n→∞ 1 #Q n z∈Qn f • T a F z (x, g) = X×A f d(µ ⊗ λ A )
uniformly in (x, g) ∈ K q .

Corollary 7. Let s F be a real valued block additive function, which attains an irrational value. Then (s F (z)) z∈Z[i] is well uniformly distributed modulo 1 with respect to any Følner sequence (Q n ) n∈N , i.e. Proof. The assumption that s F attains an irrational value, clearly implies that V (a F (mod 1)) = R/Z. Using Weyl's criterion (cf. [START_REF] Kuipers | Uniform distribution of sequences[END_REF]) the assertion is equivalent to ∀k ∈ Z \ {0} : lim Proof. After observing that V (a F (mod M)) = Z/MZ, the proof runs along the same lines as the proof of Corollary 7.

  log |q| r⌋ and r < 1. This together with (3.12) implies (3.13) µ x (B(z, r)) ≪ r β(x) with β(x) = log λ(x)log ξ(x) log |q| .

1 H

 1 and a meromorphic continuation of G(x, s) = (G B (x, s)) B∈N L+1 given by(4.8) G(x, s) = I -1 |q| 2s A(x) -(x, s),where A(x) is defined in (3.1).

( 4 . 10 )

 410 |β| < λ(|x|).

  where we have used L(g) = L(g • T z ) by E ⊆ ker(L). Applying the same inequality to f • T -z shows the T invariance.By unique ergodicity we have ℓ = λ. On the other hand |L| -L is also a T -invariant positive linear form. Thus we have |L| -L = aλ with a ≥ 0. Hence L = (1a)λ and by L(1) = 1 we get a = 0 and we have E = ker(L) by the Hahn-Banach theorem.

Proposition 4 .

 4 the closed subgroup V (a F ) of the values of a F . Recalling the definition of the group A(F ) = {s F (z) ; z ∈ Z[i]}, we have readily Proposition 3. The groups generated by the values of s F and a F are equalV (a F ) = A(F ) = {s F (z) ; z ∈ Z[i]} .Let s F be a block-additive function on Z[i] and a F be the corresponding cocycle on K q . Then the set of essential values of a F equals the closed subgroup A(F ) of A generated by the values of s F E(a F ) = A(F ).

Proof of Lemma 12 .

 12 Set for short W (V, ζ) := {x ∈ K q ; a F (ζ, x) ∈ V }. If B is a Borel subset of K q due tothe regularity of the Haar measure, for any ε > 0 (and ε < 1), there exists a non empty cylinder setC such that µ(B ∩ C) ≥ (1ε)µ(C), hence µ(C \ (B ∩ C)) ≤ εµ(C) leading to µ(B ∩ T ζ (B) ∩ W (V, ζ)) ≥ µ(B ∩ C) ∩ (T ζ (B ∩ C)) ∩ W (V, ζ)) ≥ µ(C ∩ T ζ (C) ∩ W (V, ζ)) -2εµ(C) . Choose ζ such that µ(C ∩ T ζ (C) ∩ W (V, ζ)) ≥ κµ(C) and ε < κ/2, then we get µ(B ∩ T ζ (B) ∩ W (V, ζ)) > 0. Hence ζ ∈ E(a F ) as expected.

1 |q|M

 1 +t+L+2 The M digits 0 in the end ensure that there is no carry propagation beyond the k + L + t + M + 4 fixed digits. This means that for any x ∈ C 0 , we havea F (ζ, x) = a F (z 0 , y) and C 0 ⊂ C ∩ T -1ζ (C) . This implies that for any neighbourhood V of a F (z 0 , y) one hasµ(C ∩ T -1 ζ (C) ∩ W (V, ζ)) ≥ κµ(C) and Lemma 12 gives a F (z 0 , y) ∈ E(a F ).Remark 9. By considering both Proposition 3 and (

  #{z ∈ Q n : {s F (z + y)} ∈ I} = λ(I) for every interval I ⊂ [0, 1] ({•} denotes the fractional part) uniformly in y ∈ Z[i].

n→∞ 1 # 1 #Q n z∈Qn χ 0 Corollary 8 .

 1108 Q n z∈Qn e(ks F (z + y)) = 0 uniformly in y ∈ Z[i]. The points (y, 0) are uniformly generic for T a F by Proposition 5. Now, by definition of T a F we haveT a F z (y, 0) = (y + z, a F (z, y)) = (y + z, s F (y + z)s F (y) (mod 1)).Genericity of (y, 0) implieslim n→∞ ⊗ e k (T a F z (y, 0)) = lim n→∞ 1 #Q n z∈Qn e(ks F (y + z)) = 0,where χ 0 denotes the trivial character of K q and e k (•) = e(k•). The convergence is uniform in y ∈ Z[i] Let s F be an integer valued block additive function. Then for any integer M ≥ 2 for which there exists a value s F (z) that is coprime to M the sequence (s F (z)) z∈Z[i] is well uniformly distributed in residue classes modulo M with respect to any Følner sequence(Q n ) n∈N , i.e. lim n→∞ 1 #Q n #{z ∈ Q n : s F (z + y) ≡ m mod M} = 1 Mfor m ∈ {0, 1, . . . , M -1}, uniformly in y ∈ Z[i].

  Similarly we can proceed if log |q| 2 (N/ℓ 2 ) is an integer. Of course, this implies (4.18). Next assume that neither log |q| 2 (N/|qz + ℓ| 2 ) nor log |q| 2 (N/|qz| 2 ) are integers for all z ∈ S. Hence, if N > |qz + ℓ| 2 then we have

		1 |q| 2c |λ|	.
	1	c+iT
	2πi	c-iT

* This author is supported by the Austrian Science Foundation FWF, project S9604, part of the Austrian National Research Network "Analytic Combinatorics and Probabilistic Number Theory". † This author is supported by the Austrian Science Foundation FWF, project S9605, part of the Austrian National Research Network "Analytic Combinatorics and Probabilistic Number Theory". ‡ This author is supported by CNRS-UMR 6632 and ANR AraSSIA NUGET.


Mouhammad Malli
email: mouhammad.malli@insa-rennes.fr

Bachir Habib
email: bachir.habib@insa-rennes.fr

Gheorghe Zaharia

Ghaïs El Zein

Youssef Nasser

Karim Kabalan

New Digital Block Implementation Algorithm for MIMO Channel Hardware Simulator

Keywords: Hardware simulator, FPGA, MIMO channels, LTE, WLAN 802.11 ac, implementation algorithm I

The hardware simulator facilitates the test and validation cycles by replicating channel artifacts in a controllable and repeatable laboratory environment. After a description of the MIMO channel models and the hardware simulator architecture, this paper presents new implementation algorithm of its digital block. The proposed algorithm allows the selection of specific environments and various scenarios, standards (LTE or WLAN 802.11ac) and Doppler speeds to implement the digital block architecture. The digital block architecture is implemented for 2×2 MIMO channel on a Xilinx Virtex-IV FPGA using batch and command line files. The occupation on the FPGA, the accuracy of the output signals and the latencies of the architecture for each configuration are then analyzed.

INTRODUCTION

Multiple-Input Multiple-Output (MIMO) systems offer significant increases in data throughput and link range without additional bandwidth or increased transmit power. Several recent publications have shown an increased MIMO order such as 8×8 and higher [START_REF] Behbahani | Optimizations of a MIMO relay network[END_REF]. This is made possible by advances at all levels of the simulator platforms [START_REF]Xilinx: FPGA, CPLD and EPP solutions and iMPACT User Guide[END_REF].

In practice, the transmitted electromagnetic waves interact with the propagation environment. Thus, they have to be considered in the design of the wireless communication systems. The performance of the channel can be tested by real measurements or by using a hardware simulator. Tests conducted under realistic conditions are expensive and difficult. Moreover, it is not possible to test the worst situations under real conditions. A hardware simulator reproduces the behavior of a radio channel and allows the testing of mobile radio communication systems while remaining in the laboratory.

There are many hardware simulators presented in industry, as Spirent (VR5) [3] and Elektrobit Propsim (F8) [START_REF]Baseband Fading Simulator ABFS -Reduced costs through baseband simulation -Rohde and Schwarz[END_REF]. However, they are very expensive. Thus, a low cost hardware simulator that covers almost all types of environments and considers heterogeneous environments and networks is designed and realized.

With continuing increase of the Field Programmable Gate Array (FPGA) capacity, entire baseband systems can be mapped onto faster FPGAs for more efficient prototyping and testing. As shown in [START_REF] Murphy | An FPGA based rapid prototyping platform for MIMO systems[END_REF], the FPGAs provide the greatest design flexibility and visibility of resource utilization.

The channel models can be obtained by standard channel models, as the 3GPP-LTE [START_REF]Advanced design system -LTE channel model -R4-070872 3[END_REF] and TGn 802.11n [START_REF] Erceg | TGn Channel Models[END_REF], or from measurements conducted with the MIMO channel sounder designed and realized at IETR [START_REF] Farhat | A dual band MIMO channel sounder at 2.2 and 3.5 GHz[END_REF]. In the MIMO context, little experimental results have been obtained regarding time variations, partly due to several limitations of the channel sounding equipment [START_REF] Almers | Survery of channel and Radio propagation models for wireless MIMO systems[END_REF]. However, theoretical models of timevarying channels can be obtained using Rayleigh fading [START_REF] Schumacher | From antenna spacings to theoretical capacitiesguidelines for simulating MIMO systems[END_REF].

In the literature, several architectures of the digital block of the hardware simulator have been proposed and studied in both time and frequency domain. Typically, wireless channels are simulated using Fast Fourier Transform (FFT) or Finite Impulse Response (FIR) filters [START_REF] Picol | Design of the digital block of a hardware simulator for MIMO radio channels[END_REF][START_REF] Eslami | Design and implementation of a scalable channel Emulator for wideband MIMO systems[END_REF][START_REF] Fouladi Fard | A single FPGA filter-based multipath fading emulator[END_REF]. In [START_REF] Habib | Hardware Simulator: Digital Block Design for Time-Varying MIMO Channels with TGn Model B Test[END_REF], it is shown that the time domain architecture is better in terms of occupation on FPGA, precision and latency. Thus, it is considered in this paper.

The main contributions of this paper are:  A simple new implementation algorithm is proposed, designed and realized. It connects the Graphical User Interface (GUI) to the FPGA and implements the digital block file using the required parameters chosen by the user. It uses a simple and flexible method based on batch and command line files [START_REF]Xilinx: FPGA, CPLD and EPP solutions and iMPACT User Guide[END_REF].

 This paper presents a system that simulates almost all types of environments using 2×2 MIMO channels. Moreover, it offers the possibility to simulate heterogeneous networks that switch between environments and standards (for example from LTE to WLAN 802.11ac) in a continuous way.

The rest of this paper is organized as follows. Section II presents the channel models. Section III describes the digital block architecture of the hardware simulator. Section IV presents the proposed implementation algorithm. Section V analyses the accuracy of the output signals. Lastly, Section VI gives a conclusion and some prospects.

II. CHANNEL DESCRIPTION

In this section, the different impulse responses of MIMO propagation channel models that can be used to supply the digital block of the channel simulator are described.

A. Standard Impulse Responses Models

Two standard channel models can be used by the simulator to cover many indoor and outdoor environments: the TGn and the 3GPP-LTE channel models.

1) TGn: There are 6 TGn channel models, labeled from A to F, which cover all the scenarios for WLAN applications. Each model has a number of clusters. Each cluster corresponds to specific tap delays, which overlaps each other in certain cases. WLAN 802.11ac signals are considered with a bandwidth of B = 80 MHz. The sampling frequency and period are f s = 165 MHz and T s = 1/f s respectively. The relative power of each tap of the impulse response for all TGn channel models are presented in [START_REF] Erceg | TGn Channel Models[END_REF] by taking the Line-Of-Sight (LOS) path as reference.

2) 3GPP-LTE:

The 3GPP-LTE channel model is used for mobile wireless applications. Three channel models are considered: pedestrian, vehicular and typical urban models. A detailed description is presented in [START_REF]Advanced design system -LTE channel model -R4-070872 3[END_REF]. LTE signals are considered with B = 20 MHz and f s = 50 MHz.

B. Measured Impulse Responses

Measured impulse responses are obtained by the MIMO channel sounder designed and realized by IETR [START_REF] Farhat | A dual band MIMO channel sounder at 2.2 and 3.5 GHz[END_REF]. Two measurement campaigns were carried out [START_REF] Habib | MIMO Hardware Simulator with Standard Channel Models and Measurement Data at 2.2 and 3.5 GHz[END_REF]: the first on a shipboard at 2.2 GHz, while the second for outdoor-to-indoor scenarios at 3.

C. Time-Varying Channel

To obtain a time-varying channel, a Rayleigh fading solution based on the Kronecker method [START_REF] Schumacher | From antenna spacings to theoretical capacitiesguidelines for simulating MIMO systems[END_REF] is used. The refresh frequency f ref between two successive MIMO profiles depends on the Doppler speed and model used. For indoor environment, the environment speed v varies between 0 to 9 km/h, while for outdoor vehicular environments it can attend 300 km/h. The maximum Doppler frequency shift f d is: [START_REF] Behbahani | Optimizations of a MIMO relay network[END_REF] where c is the celerity and f c is the carrier frequency. f ref is chosen greater than 2f d to respect the Nyquist-Shannon sampling theorem.

D. Heterogeneous Networks

Tests have been made for many scenarios switching between different outdoor and indoor environments, and for heterogeneous networks. These networks provide services through a cellular network using LTE standard and are able to maintain the service when switching to a WLAN 802.11ac. The impulse responses used for these scenarios are either derived from standard channel models or from recorded data based on a measurement campaigns.

III. DIGITAL BLOCK ARCHITECTURE

Four FIR filters are considered to simulate 2×2 MIMO channels. The FIR filter length and the number of used multipliers are determined by the taps of each SISO channel.

To use a limited number of multipliers on the FPGA and to switch from one environment to another, a solution is proposed to control the change of delays by connecting each multiplier to the corresponding cells of the shift register and the memory (RAM). Fig. 1 presents one FIR filter of a length N and with M multipliers (M taps). We have developed our own FIR filter instead of using Xilinx MAC filter to make it possible to reload the filter coefficients. For M = 9 (using TGn model B), the final output is quantified on 34 bits. Due to the use of a 14-bit Digital-to-Analog Converter (DAC), the final output must be truncated. The best solution is the Sliding window Truncation (ST), presented in Fig. 2, which uses the 14 most significant bits. To increase the precision of the output signals, an Auto-Scale Factor solution is used [START_REF] Habib | Accuracy Improvement of MIMO Hardware Simulator using an Auto-Scale Factor[END_REF]. The simulations are made with ISE from Xilinx [START_REF]Xilinx: FPGA, CPLD and EPP solutions and iMPACT User Guide[END_REF].

IV. IMPLEMENTATION ON FPGA Fig. 3 shows the XtremeDSP Virtex-IV board from Xilinx [START_REF]Xilinx: FPGA, CPLD and EPP solutions and iMPACT User Guide[END_REF] used for the implementation of the architecture and the connection between the PCI and the FPGA. In the recent years, communication usually takes larger place by the use of GUI. In this context, a new algorithm that connects the GUI to the digital block of the FPGA for each configuration is realized. It will be able to implement the considered architecture in a simple way, as shown in Fig. 4. The user configures the parameters, starting by choosing a specific environment (indoor, outdoor, outdoor-to-indoor, etc.), the scenarios, a specific Doppler speed, the considered input signals and the clock frequencies. The user has the possibility -----------------------------h(N-1)

n(i) n(i-1) n(i-2) -----------------------------n(i-N+1) h(0) h(1) h(2) ----------------------------- h(N-1) h(0) h(1) h(2) -

0001010011001100001…

Truncation CNA

to use an external, internal Gaussian or Dirac input signals. An external or internal clock can be used. The internal clock provides the T s of WLAN 802.11 or LTE. In the first stage of the simulation, the system checks the parameters to choose the specific BATCH file (.bat). Then, this batch file calls a new command file (.cmd) specific for these parameters. The command file contains the algorithm that implements the digital block file (.bit) into the FPGA. Moreover, a scan is launched to find a boundary. Then, a configuration of the ports is needed before identifying the used system. In the next step, two processes are made. Firstly, the digital block file (.bit) of the clock is assigned to its position in the boundary. Secondly, a searching task is launched to identify the FPGA code which gives the access to implement the digital block file (.bit) of the required environments parameters in its proper position in the boundary. When the simulation is complete, the output signals are shown on the screen of the oscilloscope, as in Fig. 3. This solution for MIMO hardware simulators allows, for each configuration, the implementation of different digital block file, which requires multi-task to be applied. It offers simplicity and flexibility for the user to simulate its required parameters. One negative point of this algorithm is the nonacceptable simulation without a batch file [START_REF]Xilinx: FPGA, CPLD and EPP solutions and iMPACT User Guide[END_REF].

V. RESULTS AND ACCURACY

In order to determine the accuracy of the digital block, a comparison is made between the theoretical and Xilinx output signals. An input Gaussian signal x(t)=x 1 (t)=x 2 (t) is considered:

where W t = 384T s , m x = 3.W t /4 and σ = m x /32. These parameters are chosen in a way to show the effect of each path of the impulse responses on the output signals. The ADC and DAC converters have a full scale [-V m ,V m ], with V m = 1 V. Thus, we consider x m = V m /4. The impulse responses can be presented in baseband with complex values, or as real signals with limited bandwidth B between f c -B/2 and f c + B/2. In this paper, to eliminate the complex multiplication and the f c , the hardware simulation operates between Δ and B + Δ, where Δ = 2 MHz is introduced to prevent spectrum aliasing. To obtain the spectrum of x(t) between [ , +B], it must be multiplied by:



The theoretic output signals are calculated by:   where M ij depends on the number of taps of the channel. We define the error vector for a 2×2 MIMO system as:

The Relative Error (RE) is given for each output sample by: and the Relative Signal-to-Noise Ratio (RSNR) by:

SNR = 20

The Global values of the SNR (GSNR) are necessary to evaluate the accuracy. Thus, they are computed by: Fig. 5 shows a snapshot of the output signal y 1 and the SNR using TGn B (a) and 3GPP-LTE ETU (b). Y Th stands for theoretical output signal while BT for Brutal Truncation. Table I shows the mean GSNR for each output with the occupation on the FPGA for several environments using standard and measured impulse responses. The relative error is high only for small values of the output signals because the Gaussian signal test is close to 0.

VI. CONCLUSION

This paper introduced an algorithm based on batch files to configure the FPGA devices. It considers the implementation of the digital block file of the MIMO hardware simulation into the Xilinx Virtex-IV FPGA. This algorithm connects the GUI of the hardware simulator to the digital block on the FPGA. This algorithm allows the user to select the channel parameters that are used to conclude the appropriate digital block file. The objective of this work is to obtain a hardware simulator system for different environments and scenarios. The accuracy and the occupation on FPGA of the architecture for different channel models has been presented and analyzed.

As a perspective, we aim at implementing of high order 8×8 MIMO channels on more performing FPGA as Virtex-VII. Moreover, several measurement campaigns will be carried out to obtain different impulse responses to cover many types of environments.

  5 GHz. The channel sounder has f s = 200 MHz. To use the measured impulse responses with LTE signals, an algorithm combining each 4 taps to 1 is used, thus f s passes from 200 MHz to 50 MHz.

Fig. 1 .

 1 Fig. 1. FIR filter N with M multipliers for one SISO channel.

Fig. 2 .

 2 Fig. 2. Sliding window truncation, from 34 to 14 bits.

Fig. 3 .

 3 Fig. 3. XtremeDSP Development board Kit-IV for Virtex-IV.

Fig. 4 .

 4 Fig. 4. Implementation algorithm.

Fig. 5 .

 5 Fig. 5. Results for y1 using TGn model B (a) and 3GPP-LTE ETU (b).

TABLE I .

 I MEAN GLOBAL SNR AND OCCUPATION ON FPGA

		GSNR (dB)	Occupation on FPGA Virtex-IV
	Channel	y1	y2	Slices (%)	RAM (%)	DSP (%)
	TGn model B	73.3	73.1	14	5	19
	TGn model C	73.2	72.3	16	5	30
	TGn model D	73.5	73	17	5	38
	TGn model E	73.3	73.1	17	5	38
	TGn model F	73.4	72.1	17	5	38
	LTE model ETU 72.6	73.2	14	5	19
	LTE model EVA 73.2	72.9	14	5	19
	LTE model EPA 73.2	72.2	13	5	15
	Measured Outdoor-to-Indoor	61.7	64.4	21	5	99
	Measured Shipboard	71.4	71.2	20	5	91