1 Introduction

1.1 The problem for binary sequences

For positive integers M and s, a binary sequence \((a_n)\) and a binary pattern

$$\begin{aligned} \mathcal{E}_s=(\varepsilon _0,\ldots ,\varepsilon _{s-1})\in \{0,1\}^s \end{aligned}$$

of length s we denote by \(N(a_n,M,\mathcal{E}_s)\) the number of n with \(0\le n<M\) and \((a_n,a_{n+1},\ldots ,a_{n+s-1})=\mathcal{E}_s.\) The sequence \((a_n)\) is normal if for any fixed s and any pattern \(\mathcal{E}_s\) of length s,

$$\begin{aligned} \lim _{M\rightarrow \infty }\frac{N(a_n,M,\mathcal{E}_s)}{M}=\frac{1}{2^s}. \end{aligned}$$

The Thue–Morse or sum-of-digits sequence \((t_n)\) is defined by

$$\begin{aligned} t_n=\sum _{i=0}^\infty n_i \bmod 2,\quad n=0,1,\ldots \end{aligned}$$

if

$$\begin{aligned} n=\sum _{i=0}^\infty n_i2^i,\quad n_0,n_1,\ldots \in \{0,1\}, \end{aligned}$$

is the binary expansion of n. Recently, Drmota et al. [1] showed that the Thue–Morse sequence along squares, that is, \((t_{n^2})\) is normal. It is conjectured but not proved yet that the subsequence of the Thue–Morse sequence along any polynomial of degree \(d\ge 3\) is normal as well, see [1, Conjecture 1]. Even the weaker problem of determining the frequency of 0 and 1 in the subsequence of the Thue–Morse sequence along any polynomial of degree \(d\ge 3\) seems to be out of reach, see [1, above Conjecture 1].

However, the analog of the latter weaker problem for the Thue–Morse sequence in the finite field setting was settled by Dartyge and Sárközy [2].

1.2 The analog for finite fields

This paper deals with the following analog of the normality problem. Let \(q=p^r\) be the power of a prime p and

$$\begin{aligned} \mathcal{B}=( \beta _1,\ldots ,\beta _r) \end{aligned}$$

be an ordered basis of the finite field \(\varvec{F}_q\) over \(\varvec{F}_p\). Then any \(\xi \in \varvec{F}_q\) has a unique representation

$$\begin{aligned} \xi =\sum _{j=1}^r x_j\beta _j \quad \text{ with } x_j\in \varvec{F}_p,\quad j=1,\ldots ,r. \end{aligned}$$

The coefficients \(x_1,\ldots , x_r\) are called the digits with respect to the basis \(\mathcal{B}\).

Dartyge and Sárközy [2] introduced the Thue–Morse or sum-of-digits function \(T(\xi )\) for the finite field \(\varvec{F}_q\) with respect to the basis \(\mathcal{B}\):

$$\begin{aligned} T(\xi )=\sum _{i=1}^{r}x_i,\quad \xi =x_1\beta _1+\cdots +x_r\beta _r\in \varvec{F}_q. \end{aligned}$$

Note that T is a linear map from \(\varvec{F}_q\) to \(\varvec{F}_p\). Actually, we can take any non-trivial linear map

$$\begin{aligned} T(\xi )=\mathrm{Tr}(\delta \xi ),\quad \delta \in \varvec{F}_q^*, \end{aligned}$$

from \(\varvec{F}_q\) to \(\varvec{F}_p\) without changing our results or proofs below, where the trace Tr is defined by (7).

For a given pattern length s with \(1\le s\le q\), a vector

$$\begin{aligned} \varvec{\alpha }=(\alpha _1,\ldots ,\alpha _s)\in \varvec{F}_q^s, \quad \alpha _{j_1}\not = \alpha _{j_2},\quad 1\le j_1<j_2\le s, \end{aligned}$$

with different coordinates, a polynomial \(f(X)\in \varvec{F}_q[X]\) and a vector \(\mathbf{c} =(c_1,\ldots ,c_s)\in \varvec{F}_p^s\) we put

$$\begin{aligned} \mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)=\{\xi \in \varvec{F}_q : T(f(\xi +\alpha _i))=c_i,~i=1,\ldots ,s\}. \end{aligned}$$

In [2] the Weil bound, see Lemma 1, was used to bound the cardinality of \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)\) for \(s=1\):

Let \(f(X)\in \varvec{F}_q[X]\) be a polynomial of degree d. Then for all \(c \in \varvec{F}_p\)

$$\begin{aligned} \left||\mathcal{T}(c,f)|-p^{r-1}\right|\le (d-1)q^{1/2},\quad \gcd (d,p)=1, \end{aligned}$$
(1)

where

$$\begin{aligned} \mathcal{T}(c,f)=\{\xi \in \varvec{F}_q : T(f(\xi ))=c\}. \end{aligned}$$

Note that the condition \(\gcd (d,p)=1\) can be relaxed to the condition that f(X) is not of the form \(g(X)^p-g(X)+c\) for some \(g(X)\in \varvec{F}_q[X]\) and \(c\in \varvec{F}_q\). For example, \(f(X)=X^p\) is not of the form \(g(X)^p-g(X)+c\) but does not satisfy \(\gcd (d,p)=1\).

Our goal is to prove that, under some natural conditions, the size of \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)\) is asymptotically the same for all \(\mathbf{c} \) and \(\varvec{\alpha }\).

1.3 Results of this paper

First we study monomials and prove the following result in Sect. 4.

Theorem 1

Let d be any integer with \(1\le d<q\) with unique representation

$$\begin{aligned} d=(d_0+d_1p+\cdots +d_{n-1}p^{n-1})\gcd (d,q) \end{aligned}$$

where

$$\begin{aligned} 1 \le n\le r-\frac{\log (\gcd (d,q))}{\log p}, \quad 0\le d_i<p,\quad i=0,\ldots ,n-1,\quad d_0d_{n-1}\ne 0. \end{aligned}$$

Let denote by

$$\begin{aligned} f_d(X)=X^d\in \varvec{F}_q[X] \end{aligned}$$

the monomial of degree d.

1. For \(n\ge 2,\) assume

$$\begin{aligned} d_m=d_{m+1}=\cdots =d_{m+k-1}=p-1 \end{aligned}$$

for some m and k with

$$\begin{aligned} 1\le m\le m+k\le n-1. \end{aligned}$$

For any positive integer

$$\begin{aligned} s\le \left\{ \begin{array}{ll} (d_{m+k}+1)(p^k-p^{k-1}), &{}\quad n\ge 2 \text{ and } k\ge 1,\\ d_0, &{}\quad n=1 \text{ or } k=0,\end{array}\right. \end{aligned}$$
(2)

any vector \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2}\) for \(1\le j_1<j_2\le s,\) and any \(\mathbf{c} \in \varvec{F}_p^s\) we have

$$\begin{aligned} \left||\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_d)|-p^{r-s}\right|\le \left( \frac{d}{\gcd (d,q)}-1\right) q^{1/2}. \end{aligned}$$

2. Conversely, if

$$\begin{aligned} (d_0+1)(d_1+1)\cdots (d_{n-1}+1)\le p, \end{aligned}$$
(3)

for any integer s with

$$\begin{aligned} q\ge s\ge (d_0+1)(d_1+1)\cdots (d_{n-1}+1), \end{aligned}$$
(4)

there is a vector \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2}\), \(1\le j_1<j_2\le s,\) and a vector \(\mathbf{c} \in \varvec{F}_p^s\) for which \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_d)\) is empty.

3. For any s with

$$\begin{aligned} q\ge s>((d_0+1)(d_1+1)\cdots (d_{n-1}+1)-1)r \end{aligned}$$
(5)

and any vector \(\varvec{\alpha }\in \varvec{F}_q^s\) there is a vector \(\mathbf{c} \in \varvec{F}_p^s\) for which \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_d)\) is empty.

For \(d<p\) we have the following dichotomy:

Corollary 1

Assume \(1\le d<p\).

For \(s\le d\) we have for any vector \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2}\), \(1\le j_1<j_2\le s,\) and any \(\mathbf{c} \in \varvec{F}_p^s\)

$$\begin{aligned} \left||\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_d)|-p^{r-s}\right|\le (d-1)q^{1/2}. \end{aligned}$$

For s with \(q\ge s>d\) there is a vector \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_1}\), \(1\le j_1<j_2\le s,\) and a vector \(\mathbf{c} \in \varvec{F}_p^s\) for which \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_d)\) is empty.

Theorem 1 provides two asymptotic formulas for \(|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },X^d)|\) for \(r\rightarrow \infty \) and \(p\rightarrow \infty \), respectively.

Assume that p, j, n, \(d=(d_0+d_1p+\cdots +d_{n-1} p^{n-1})p^j\) and s satisfying (2) are fixed. Then we have

$$\begin{aligned} \lim _{r\rightarrow \infty }\frac{|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_d)|}{p^{r-s}}=1 \end{aligned}$$

for any vectors \(\mathbf{c} \in \varvec{F}_p^s\) and \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2}\), \(1\le j_1<j_2\le s\). We may say that \(T(f_d)\) is r-normal if (2) is satisfied.

Assume that \(j=0\) and d, r and s are fixed with \(1\le s\le \min \{d,\lfloor (r-1)/2\rfloor \}\). Then we have

$$\begin{aligned} \lim _{p\rightarrow \infty }\frac{|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_d)|}{p^{r-s}}=1 \end{aligned}$$

for any \(\mathbf{c} \in \varvec{F}_p^s\) and \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2}\), \(1\le j_1<j_2\le s\). We may say that \(T(f_d)\) is p-normal for \(1\le s\le \min \{d,\lfloor (r-1)/2\rfloor \}\).

Theorem 1 is only non-trivial for small degrees. However, for very large degrees we prove the following non-trivial result in Sect. 5.

Theorem 2

Let \(f_{q-1-d}(X)=X^{q-1-d}\) be a monomial of degree \(q-1-d\) with \(1\le d< q-1\). Then for any \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2}\), \(1\le j_1<j_2\le s,\) and any \(\mathbf{c} \in \varvec{F}_p^s,\) we have

$$\begin{aligned} \mid \mid \mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_{q-1-d})\mid -p^{r-s}\mid \le \left( \left( \frac{d}{\gcd (d,q)}+1\right) s-2\right) q^{1/2}+s+1. \end{aligned}$$

Note that with the convention \(0^{-1}=0\) we have

$$\begin{aligned} \xi ^{q-1-d}=\xi ^{-d}\quad \text{ for } \text{ any } \xi \in \varvec{F}_q \end{aligned}$$

and can identify the monomial \(f_{q-1-d}(X)=X^{q-1-d}\) with the rational function \(f_{-d}(X)=X^{-d}\). However, the latter representation is independent of q and we can state two asymptotic formulas for \(|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_{-d})|\) as well.

For any fixed d, p and s we have

$$\begin{aligned} \lim _{r\rightarrow \infty }\frac{|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_{-d})|}{p^{r-s}}=1, \end{aligned}$$

that is, \(T(f_{-d})\) is r-normal.

For any fixed d, s and r with \(1\le s\le \lfloor (r-1)/2\rfloor \) we have

$$\begin{aligned} \lim _{p\rightarrow \infty }\frac{|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_{-d})|}{p^{r-s}}=1, \end{aligned}$$

that is, \(T(f_{-d})\) is p-normal for \(1\le s\le \lfloor (r-1)/2\rfloor \).

Finally, we extend our results to arbitrary polynomials in Sect. 6.

Theorem 3

Let d be any integer with \(1\le d<q\) and \(\gcd (d,q)=1\). Let \(f(X)\in \varvec{F}_q[X]\) be any polynomial of degree d.

1. Denote \(d_0\equiv d\bmod p,\) \(1\le d_0<p\). For any integer s with

$$\begin{aligned} 1\le s\le d_0, \end{aligned}$$

any \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2},\) \(1\le j_1<j_2\le s,\) and any \(\mathbf{c} \in \varvec{F}_p^s\) we have

$$\begin{aligned} \left||\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)|-p^{r-s}\right|\le (d-1)q^{1/2}. \end{aligned}$$

2. Conversely, if \(f(X)\in \varvec{F}_p[X]\) and \(d<p,\) then for any integer s with

$$\begin{aligned} q\ge s\ge d+1, \end{aligned}$$

there is \(\varvec{\alpha }\in \varvec{F}_q^s\) with \(\alpha _{j_1}\not = \alpha _{j_2},\) \(1\le j_1<j_2\le s,\) and \(\mathbf{c} \in \varvec{F}_p^s\) for which \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)\) is empty.

3. For any \(f(X)\in \varvec{F}_q[X],\) any s with

$$\begin{aligned} q \ge s>dr \end{aligned}$$

and any \(\varvec{\alpha }\in \varvec{F}_q^s\) there is a vector \(\mathbf{c} \in \varvec{F}_p^s\) for which \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)\) is empty.

We give examples of degree d with \(\gcd (d,p)>1\) and \(\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)=\emptyset \) for any \(s\ge 1\) in Sect. 7.1.

Again, for \(f(X)\in \varvec{F}_p[X]\) and \(1\le d<p\) we have a dichotomy.

Moreover, for any fixed d, p and s with \(\gcd (d,q)=1\) and \(1\le s\le d_0\) and any \(f(X)\in \varvec{F}_p[X]\) of degree d, T(f) is r-normal. Note that any \(f(X)\in \varvec{F}_p[X]\) is an element of \(\varvec{F}_{p^{r}}[X]\) for \(r=1,2,\ldots \)

For fixed d, r and s with \(1\le s\le \min \{d,\lfloor (r-1)/2\rfloor \}\) and any \(f(X)\in \mathbf{Z} {[}X{]}\) of degree d, T(f) is p-normal. Here \(f(X)\in \mathbf{Z} {[}X{]}\) can be identified with an element of \(\varvec{F}_p[X]\) for all primes p.

We start with a section on preliminary results used in the proofs. Then we show that

$$\begin{aligned} \left||\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)|-p^{r-s}\right|\le (\deg (f)-1)q^{1/2} \end{aligned}$$
(6)

under certain conditions in Sect. 3. In Sects. 4 to 6 we show that these conditions are fulfilled under the assumptions of our theorems. We finish the paper with some remarks on related work in Sect. 7.

2 Preliminary results

We start with the Weil bound, see [3, Theorem 5.38 and comments below], [4, Theorem 2E] or [5].

Lemma 1

Let \(\psi \) be the additive canonical character of the finite field \(\varvec{F}_q,\) and f(X) be a polynomial of degree \(d\ge 1\) over \(\varvec{F}_q,\) which is not of the form \(g(X)^p-g(X)+c\) for some polynomial \(g(X)\in \varvec{F}_q[X]\) and \(c\in \varvec{F}_q\). Then we have

$$\begin{aligned} \left|\sum _{\xi \in \varvec{F}_q}\psi \left( f(\xi )\right) \right|\le (d-1)q^{1/2}. \end{aligned}$$

We also use the analog of the Weil bound for rational functions

$$\begin{aligned} \frac{f(X)}{g(X)}\in \varvec{F}_q(X) \end{aligned}$$

of Moreno and Moreno [6, Theorem 2]. We only need the special case that \(\deg (f)\le \deg (g)\).

Lemma 2

Let \(\psi \) be a nontrivial additive character of \(\varvec{F}_q\) and let \(\frac{f(X)}{g(X)}\in \varvec{F}_q(X)\) be a rational function over \(\varvec{F}_q\). Let s be the number of distinct roots of the polynomial g(X) in the algebraic closure \(\overline{\varvec{F}_q}\) of \(\varvec{F}_q\). Suppose that \(\frac{f(X)}{g(X)}\) is not of the form \(H(X)^p-H(X),\) where H(X) is a rational function over \(\overline{\varvec{F}_q}\). If \(\deg (f)\le \deg (g),\) then we have

$$\begin{aligned} \left|\sum _{\xi \in \varvec{F}_q, g(\xi )\not =0}\psi \left( \frac{f(\xi )}{g(\xi )}\right) \right|\le (\deg (g)+s-2)\sqrt{q}+1. \end{aligned}$$

Note that \(g(X)^p-g(X)+c\) with \(g(X)\in \varvec{F}_q(X)\) and \(c\in \varvec{F}_q\) can be written as \(h(X)^p-h(X)\) for \(h(X)=g(X)+\gamma \in \overline{\varvec{F}_q}(X),\) where \(\gamma \in \overline{\varvec{F}_q}\) is a zero of the polynomial \(X^p-X-c\).

Next we state Lucas’ congruence, see [7] or [8, Lemma 6.3.10].

Lemma 3

Let p be a prime. If m and n are two natural numbers with p-adic expansions

$$\begin{aligned} m=m_{r-1}p^{r-1}+m_{r-2}p^{r-2}+\cdots +m_1p+m_0,\quad 0 \le m_0,\ldots ,m_{r-1}< p, \end{aligned}$$

and

$$\begin{aligned} n=n_{r-1}p^{r-1}+n_{r-2}p^{r-2}+\cdots + n_1p+n_0,\quad 0 \le n_0,\ldots ,n_{r-1}< p, \end{aligned}$$

then we have

$$\begin{aligned} {m \atopwithdelims ()n} \equiv \prod _{j=0}^{r-1} {m_j \atopwithdelims ()n_j} \mod p. \end{aligned}$$

As a consequence of Lucas’ congruence we can count the number of nonzero binomials coefficients \({m\atopwithdelims ()n }\bmod p\) for fixed m. Indeed, by Lucas’ congruence

$$\begin{aligned} {m \atopwithdelims ()n} \not \equiv 0 \mod p \text{ if } \text{ and } \text{ only } \text{ if } {m_j \atopwithdelims ()n_j} \not \equiv 0 \mod p \text{ for } j=0,\ldots ,r-1, \end{aligned}$$

or equivalently,

$$\begin{aligned} 0\le n_j\le m_j\quad \text{ for } j=0,\ldots ,r-1. \end{aligned}$$

Therefore, we have the following result of Fine [9, Theorem 2]:

Lemma 4

Let p be a prime and m an integer with p-adic expansion

$$\begin{aligned} m=m_{r-1}p^{r-1}+m_{r-2}p^{r-2}+\cdots + m_1p+m_0, \quad 0\le m_0,\ldots ,m_{r-1}<p. \end{aligned}$$

Then the number of nonzero binomial coefficients \({m \atopwithdelims ()n}\bmod p\) with \(0\le n\le m\) is

$$\begin{aligned} \prod _{j=0}^{r-1}(m_j+1). \end{aligned}$$

3 Trace, dual basis and exponential sums

Let

$$\begin{aligned} \mathrm{Tr}( \xi )=\sum _{i=0}^{r-1}\xi ^{p^i}\in \varvec{F}_p \end{aligned}$$
(7)

denote the (absolute) trace of \(\xi \in \varvec{F}_q\). Let \((\delta _1,\ldots ,\delta _r)\) denote the (existent and unique) dual basis of the basis \(\mathcal{B} =( \beta _1,\ldots ,\beta _r)\) of \(\varvec{F}_q\), see for example [3], that is,

$$\begin{aligned} \mathrm{Tr}(\delta _i\beta _j)= {\left\{ \begin{array}{ll} 1 &{} \mathrm{if}\ i=j,\\ 0 &{} \mathrm{if}\ i\not =j, \end{array}\right. } \quad 1\le i,j\le r. \end{aligned}$$

Then we have

$$\begin{aligned} \mathrm{Tr}(\delta _i\xi )=x_i\quad \text{ for } \text{ any }\quad \xi =\sum _{j=1}^r x_j \beta _j\in \varvec{F}_q\quad \text{ with } x_j\in \varvec{F}_p, \end{aligned}$$

and

$$\begin{aligned} T(\xi )=\mathrm{Tr}(\delta \xi ),\quad \text{ where } \delta =\sum _{i=1}^r\delta _i. \end{aligned}$$

Note that

$$\begin{aligned} \delta \ne 0 \end{aligned}$$

since \(\delta _1,\ldots ,\delta _r\) are linearly independent. Note that we don’t have to restrict ourselves to this special choice of \(\delta \) and T but can deal with any non-trivial linear map

$$\begin{aligned} T(\xi )=\mathrm{Tr}(\delta \xi ),\quad \delta \in \varvec{F}_q^*, \end{aligned}$$

from \(\varvec{F}_q\) to \(\varvec{F}_p\).

Put

$$\begin{aligned} e_p(x)=\exp \left( \frac{2\pi i x}{p}\right) \quad \text{ for } x\in \varvec{F}_p. \end{aligned}$$

Since

$$\begin{aligned} \sum _{a\in \varvec{F}_p}e_p(ax)=\left\{ \begin{array}{cc} 0,&{} x\ne 0,\\ p, &{} x=0,\end{array}\right. \quad x\in \varvec{F}_p, \end{aligned}$$

we get

$$\begin{aligned} |\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)|= & {} \frac{1}{p^s} \sum _{\xi \in \varvec{F}_q}\prod _{i=1}^s\sum _{a\in \varvec{F}_p}e_p\left( a (T(f(\xi +\alpha _i))-c_i)\right) \\= & {} \frac{1}{p^s} \sum _{a_1,\ldots ,a_s\in \varvec{F}_p} \sum _{\xi \in \varvec{F}_q}e_p\left( \sum _{i=1}^sa_i (T(f(\xi +\alpha _i))-c_i)\right) . \end{aligned}$$

Separating the term for \(a_1=\cdots =a_s=0\) we get

$$\begin{aligned} \left||\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f)|-p^{r-s}\right|\le \max _{(a_1,\ldots ,a_s)\ne (0,\ldots ,0)} \left|\sum _{\xi \in \varvec{F}_q} \psi (F_{a_1,\ldots ,a_s}(\xi ))\right|, \end{aligned}$$
(8)

where

$$\begin{aligned} \psi (\xi )=e_p(\mathrm{Tr}(\xi )) \end{aligned}$$

denotes the additive canonical character of \(\varvec{F}_q\) and

$$\begin{aligned} F_{a_1,\ldots ,a_s}(X)=\delta \sum _{i=1}^sa_if(X+\alpha _i). \end{aligned}$$
(9)

If \(F_{a_1,\ldots ,a_s}(X)\) is not of the form \(g(X)^p-g(X)+c\) for any \((a_1,\ldots ,a_s)\ne (0,\ldots ,0)\), then the Weil bound, Lemma 1, can be applied and yields (6).

4 Monomials \(f_d(X)=X^d\)

Now we study the special case

$$\begin{aligned} f(X)=f_{dp^j}(X)=X^{dp^j} \quad \text{ with }\quad \gcd (d,p)=1 \text{ and } j=0,1,\ldots \end{aligned}$$

Put \(\varvec{\alpha }^k=(\alpha _1^k,\ldots ,\alpha _s^k)\). Since \((X+\alpha )^{dp^j}=(X^{p^j}+\alpha ^{p^j})^d\) and \(\xi \mapsto \xi ^{p^j}\) permutes \(\varvec{F}_q\) we have

$$\begin{aligned} \left|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_{dp^j})\right|=\left|\mathcal{T}(\mathbf{c} ,\varvec{\alpha }^{p^j},f_d)\right|\end{aligned}$$

and we may assume \(j=0\). Since

$$\begin{aligned} \xi ^q=\xi \quad \text{ for } \text{ all } \xi \in \varvec{F}_q \end{aligned}$$

we may restrict ourselves to the case \(d<q\).

To prove the first part of Theorem 1 we have to show that (6) is applicable. By (9) with

$$\begin{aligned} f(X)=f_d(X)=X^d \end{aligned}$$

we have

$$\begin{aligned} F_{a_1,\ldots ,a_s}(X)=\delta \sum _{i=1}^sa_i(X+\alpha _i)^d \end{aligned}$$

and thus

$$\begin{aligned} F'_{a_1,\ldots ,a_s}(X)=\delta d \sum _{\ell =0}^{d-1} {d-1\atopwithdelims ()\ell } \left( \sum _{i=1}^sa_i\alpha _i^\ell \right) X^{d-\ell -1}. \end{aligned}$$
(10)

Assume that for some \((a_1,\ldots ,a_s)\in \varvec{F}_p^s\setminus \{(0,\ldots ,0)\}\) we have

$$\begin{aligned} F_{a_1,\ldots ,a_s}(X)=g(X)^p-g(X)+c \end{aligned}$$

for some polynomial \(g(X)\in \varvec{F}_q[X]\) and some constant \(c\in \varvec{F}_q\). We have

$$\begin{aligned} \text{ either } F_{a_1,\ldots ,a_s}(X)= const \quad \text{ or }\quad 1\le \deg (F_{a_1,\ldots ,a_s})\equiv 0\bmod p \end{aligned}$$
(11)

and

$$\begin{aligned} F'_{a_1,\ldots ,a_s}(X)=-g'(X). \end{aligned}$$

Then either

$$\begin{aligned}&F'_{a_1,\ldots ,a_s}(X)= 0, \end{aligned}$$
(12)
$$\begin{aligned}&\deg (F'_{a_1,\ldots ,a_s})< \deg (g)= \frac{\deg (F_{a_1,\ldots ,a_s})}{p}. \end{aligned}$$
(13)

Let

$$\begin{aligned} d=d_0+d_1p+\cdots +d_{r-1}p^{r-1},\quad 0\le d_0,\ldots ,d_{r-1}<p,\quad d_0\not =0, \end{aligned}$$

be the p-adic expansion of d. Assume that there are \(k\ge 0\) consecutive digits

$$\begin{aligned} d_m=d_{m+1}=\cdots =d_{m+k-1}=p-1,\quad 1\le m\le m+k\le r-1, \end{aligned}$$

of maximal size and

$$\begin{aligned} s\le \left\{ \begin{array}{ll} (d_{m+k}+1)(p^k-p^{k-1}), &{}\quad k\ge 1,\\ d_0, &{}\quad k=0.\end{array}\right. \end{aligned}$$

Note that \(\deg (F_{a_1,\ldots ,a_s})\le d-d_0\) by (11) with the convention \(\deg (0)=-1\). In both cases, (12) and (13), the coefficients of \(F'_{a_1,\ldots ,a_s}(X)\) at \(X^{d-1-\ell }\) are zero for \(\ell =0,\ldots ,d-(d-d_0)/p-1\). Since \(\delta d\not = 0\) we get from (10)

$$\begin{aligned} {d-1 \atopwithdelims ()\ell } \left( \sum _{i=1}^s a_i\alpha _i^\ell \right) =0,\quad \ell =0,\ldots ,d-(d-d_0)/p-1. \end{aligned}$$
(14)

By Lucas’ congruence, Lemma 3, we have

$$\begin{aligned} {d-1 \atopwithdelims ()\ell }\equiv {d_0-1\atopwithdelims ()\ell }\not \equiv 0\bmod p,\quad \ell =0,\ldots ,d_0-1, \end{aligned}$$
(15)

as well as

$$\begin{aligned} {d-1\atopwithdelims ()p^m\ell }\not \equiv 0\bmod p,\quad \ell =0,\ldots ,(d_{m+k}+1)p^k-1, \end{aligned}$$
(16)

since

$$\begin{aligned} d-1= e_0+(p-1)(p^m+\cdots +p^{m+k-1})+d_{m+k}p^{m+k}+e_1p^{m+k+1} \end{aligned}$$

for some

$$\begin{aligned} 0\le e_0<p^m,\quad 0\le e_1<p^{r-k-m-1}, \end{aligned}$$

and

$$\begin{aligned} p^m\ell = \ell _0p^m+\cdots +\ell _{k-1}p^{m+k-1}+\ell _kp^{m+k} \end{aligned}$$

for some

$$\begin{aligned} 0\le \ell _0,\ldots ,\ell _{k-1}<p,\quad 0\le \ell _k\le d_{m+k}, \end{aligned}$$

and any \(0\le \ell \le (d_{m+k}+1)p^k-1\).

Note that

$$\begin{aligned} d-\frac{d-d_0}{p}-1\ge & {} (d-1)\left( 1-\frac{1}{p}\right) \ge ((d_{m+k}+1)p^k-1)\left( 1-\frac{1}{p}\right) p^m\\\ge & {} ((d_{m+k}+1)(p^k-p^{k-1})-1)p^m,\quad k\ge 1. \end{aligned}$$

Combining (14) with (15) and (16), respectively, we get

$$\begin{aligned} \sum _{i=1}^s a_i\alpha _i^{\ell }=0, \quad \ell =0,\dots d_0-1, \end{aligned}$$
(17)

and

$$\begin{aligned} \sum _{i=1}^s a_i\alpha _i^{p^m\ell } , \quad \ell =0,\ldots ,(d_{m+k}+1)(p^k-p^{k-1})-1,\quad k\ge 1, \end{aligned}$$
(18)

respectively.

Hence, if \(s\le d_0\) (\(n=1\) or \(k=0\)) or \(s\le (d_{m+k}+1)(p^k-p^{k-1})\) (\(n\ge 2\) and \(k\ge 1\)), the \(s \times s\) coefficient matrix of the equations for \(\ell =0,\ldots ,s-1\) of (17) or (18), respectively, is an invertible Vandermonde matrix and we get

$$\begin{aligned} a_i=0,\quad i=1,\ldots ,s, \end{aligned}$$

contradicting \((a_1,\ldots ,a_s)\in \varvec{F}_p^s\setminus \{(0,\ldots ,0)\}\). For the second case we used that \(\xi \mapsto \xi ^{p^m}\) permutes \(\varvec{F}_q\) and the \(\alpha _i^{p^m}\), \(i=1,\ldots ,s\), are pairwise distinct.

Proof of the second part of Theorem 1: now assume \(d<p^n\) for some n with \(1\le n\le r\), that is, \(d_n=\cdots =d_{r-1}=0\), and assume (3) and (4). Let D be the number of binomial coefficients \({d\atopwithdelims ()\ell }\), \(\ell =1,\ldots ,d\), which are nonzero modulo p. By Lemma 4 we have

$$\begin{aligned} D=(d_0+1)\cdots (d_{n-1}+1)-1. \end{aligned}$$

For any \(\alpha \in \varvec{F}_q\) the polynomial

$$\begin{aligned} (X+\alpha )^d-\alpha ^d=\sum _{\ell =0}^{d-1} {d\atopwithdelims ()\ell }\alpha ^\ell X^{d-\ell } \end{aligned}$$

is in the vector space generated by the monomials \(X^{d-\ell }\) with nonzero \({d\atopwithdelims ()\ell }\bmod p\), \(\ell =0,\ldots ,d-1\), of dimension D. For \(D<s\le q\) and any \((\alpha _1,\ldots ,\alpha _s)\in \varvec{F}_q^s\) there is a nontrivial linear combination

$$\begin{aligned} \sum _{i=1}^s\rho _i\left( (X+\alpha _i)^d-\alpha _i^d\right) = 0 \end{aligned}$$

of the zero polynomial with \((\rho _1,\ldots ,\rho _s)\in \varvec{F}_q^s\setminus \{(0,\ldots ,0)\}\). If \(D<s\le p\) and we take \(\alpha _i\in \varvec{F}_p\), \(i=1,\ldots ,s\), then we may assume \(\rho _i=a_i\in \varvec{F}_p\) and

$$\begin{aligned} \sum _{i=1}^s a_i \mathrm{Tr}\left( \delta \left( (\xi +\alpha _i)^d-\alpha _i^d\right) \right) =0\quad \text{ for } \text{ all } \xi \in \varvec{F}_q. \end{aligned}$$

Taking \((a_1,\ldots ,a_s)\in \varvec{F}_p^s\setminus \{(0,\ldots ,0)\}\) from the previous step, the vector space of solutions \((c_1,\ldots ,c_s)\in \varvec{F}_p^s\) of the equation

$$\begin{aligned} a_1c_1+\cdots +a_sc_s=0 \end{aligned}$$

is of dimension \(s-1\). More precisely, the mapping

$$\begin{aligned} \varphi :\varvec{F}_p^ s \rightarrow \varvec{F}_p, \quad \varphi (_1,\ldots ,c_s)=a_1c_1+\cdots +a_sc_s \end{aligned}$$

is surjective since \((a_1,\ldots ,a_s)\) is not the zero vector. By the rank-nullity theorem its kernel is of dimension \(s-1\).

That is, not all \(\mathbf{c} =(c_1,\ldots ,c_s)\in \varvec{F}_p^s\) are attained as

$$\begin{aligned} \mathbf{c} =\left( \mathrm{Tr}\left( \delta \left( (\xi +\alpha _i)^d-\alpha _i^d\right) \right) \right) _{i=1}^s \end{aligned}$$

for any \(\xi \in \varvec{F}_q\), namely those \(\mathbf{c} \) which are not in the kernel of \(\varphi \). We can extend this argument to \(s>p\) by extending \((a_1,\ldots ,a_p)\in \varvec{F}_p^p\setminus \{(0,\ldots ,0)\}\) to \((a_1,\ldots ,a_p,0,\ldots ,0)\in \varvec{F}_p^s\setminus \{(0,\ldots ,0)\}\).

Proof of the third part of Theorem 1: now we drop the condition (3) but then s has to satisfy the stronger condition (5) instead of (4). We extend the definition of the trace to polynomials \(f(X)\in \varvec{F}_{p^r}[X]\),

$$\begin{aligned} \mathrm{Tr}(f(X))=\sum _{j=0}^{r-1} f(X)^{p^j}. \end{aligned}$$

For each \(\alpha \in \varvec{F}_q\) we have

$$\begin{aligned} \mathrm{Tr}(\delta ((X+\alpha )^d-\alpha ^d))=\sum _{\ell =0}^{d-1} {d\atopwithdelims ()\ell } \mathrm{Tr}(\delta \alpha ^\ell X^{d-\ell }), \end{aligned}$$

since the trace is \(\varvec{F}_p\)-linear, and thus it lies in the \(\varvec{F}_p\)-linear space generated by the polynomials \(\mathrm{Tr}(\beta _i X^{d-\ell })\) with nonzero \({d\atopwithdelims ()\ell }\) modulo p, \(i=1,\ldots ,r\), \(\ell =1,\ldots ,d\), of dimension at most Dr, where \(\{\beta _1,\ldots ,\beta _r\}\) is a basis of \(\varvec{F}_q\) over \(\varvec{F}_p\). Now let \(s> Dr\), then for any \(\varvec{\alpha }=\left( \alpha _1,\dots \alpha _s \right) \in \varvec{F}_q^s\) consider the set of polynomials

$$\begin{aligned} \left\{ \mathrm{Tr}(\delta ((X+\alpha _i)^d-\alpha _i^d)): i=1,\ldots ,s \right\} . \end{aligned}$$

Since \(s>Dr\) there is a nontrivial \(\varvec{F}_p\)-linear combination

$$\begin{aligned} \sum _{i=1}^{s}a_i\mathrm{Tr}(\delta ((X+\alpha _i)^d-\alpha _i^d)) = 0 \end{aligned}$$

of the zero polynomial. Now consider the linear subspace of solutions \((c_1,\ldots ,c_s)\in \varvec{F}_p^s\) of the equation \(a_1c_1+\cdots +a_sc_s=0\) which is of dimension \(s-1\). Let \(\mathbf{c} \in \varvec{F}_p^s\) be a point which does not lie in this linear subspace, then \(\mathbf{c} \) is not attained as \(\mathbf{c} =(\mathrm{Tr}(\delta ((\xi +\alpha _i)^d-\alpha _i^d)))_{i=1}^s\) for any \(\xi \in \varvec{F}_q\).

5 Rational functions \(f_{-d}(X)=X^{-d}\)

Let \(f_{q-d-1}(X)=X^{q-1-d}\) be a monomial of degree \(q-d-1\), where \(1\le d< q-1\). With the convention \(0^{-1}=0\) we can identify \(f_{q-d-1}(X)\) with the rational function \(f_{-d}(X)=X^{-d}\). Let \(\gcd (d,q)=p^j\). Since

$$\begin{aligned} (X+\alpha )^{-p^j}=(X^{p^j}+\alpha ^{p^j})^{-1} \end{aligned}$$

and \(\xi \mapsto \xi ^{p^j}\) permutes \(\varvec{F}_q\) we have

$$\begin{aligned} \left|\mathcal{T}(\mathbf{c} ,\varvec{\alpha },f_{-dp^j})\right|=\left|\mathcal{T}(\mathbf{c} ,\varvec{\alpha }^{p^j},f_{-d})\right|\end{aligned}$$

and may restrict ourselves to the case \(\gcd (d,q)=1\), that is,

$$\begin{aligned} d=d_0+t_1p, \quad \text{ where } 1 \le d_0<p. \end{aligned}$$

We first show that there is no nonzero s-tuple

$$\begin{aligned} (a_1,\ldots ,a_s)\in \varvec{F}_p^s\setminus \{(0,\ldots ,0)\} \end{aligned}$$

such that

$$\begin{aligned} F_{a_1,\dots ,a_s}(X)=\sum _{i=1}^sa_i(X+\alpha _i)^{-d}=H(X)^p-H(X) \end{aligned}$$

for any rational function \(H(X)\in \overline{\varvec{F}_p}(X)\). We have

$$\begin{aligned} F_{a_1,\dots ,a_s}(X)=\frac{f(X)}{g(X)}, \end{aligned}$$

where

$$\begin{aligned} f(X)=\delta \sum _{j=1}^sa_j\prod _{i\not =j}(X+\alpha _i)^d \end{aligned}$$

and

$$\begin{aligned} g(X)=\prod _{i=1}^s(X+\alpha _i)^d. \end{aligned}$$

Suppose to the contrary that there exists a rational function

$$\begin{aligned} H(X)=\frac{u(X)}{v(X)}\in \overline{\varvec{F}_p}(X)\quad \text{ with } \gcd (u,v)=1\quad \text{ and }\quad v(X) \text{ is } \text{ monic } \end{aligned}$$

satisfying

$$\begin{aligned} F_{a_1,\ldots ,a_s}(X)=H(X)^p-H(X). \end{aligned}$$

Therefore, we have

$$\begin{aligned} \frac{f(X)}{g(X)}=\frac{u(X)^p}{v(X)^p}-\frac{u(X)}{v(X)}. \end{aligned}$$
(19)

Clearing denominators we obtain

$$\begin{aligned} f(X)v(X)^p=(u(X)^p-u(X)v(X)^{p-1})g(X) \end{aligned}$$

and thus \(v(X)^p\) divides g(X), hence

$$\begin{aligned} v(X)=\prod _{i=1}^s (X+\alpha _i)^{e_i}\quad \text{ for } \text{ some } 0\le e_i\le t_1,\quad i=1,\ldots ,s. \end{aligned}$$

Now by taking derivatives of both sides of (19) and clearing denominators we get

$$\begin{aligned} (f'(X)g(X)-f(X)g'(X))v(X)^2=(u(X)v'(X)-u'(X)v(X))g(X)^2. \end{aligned}$$
(20)

Without loss of generality we may assume \(a_1\ne 0\), thus

$$\begin{aligned} f(-\alpha _1)= \delta a_1\prod _{i=2}^s(\alpha _i-\alpha _1)^d\ne 0 \end{aligned}$$

and

$$\begin{aligned} X+\alpha _1 \text{ does } \text{ not } \text{ divide } f(X). \end{aligned}$$

Moreover, \((X+\alpha _1)^{d-1}\) and \((X+\alpha _1)^d\) are the largest powers dividing \(g'(X)\) and g(X), respectively, that is,

$$\begin{aligned} (X+\alpha _1)^{d-1+2e_1} \end{aligned}$$

is the largest power of \((X+\alpha _1)\) dividing the left hand side of (20). Observing that \(g(X)^2\) and thus the right hand side of (20) is divisible by

$$\begin{aligned} (X+\alpha _1)^{2d} \end{aligned}$$

we get

$$\begin{aligned} d-1+2e_1\ge 2d \end{aligned}$$

and thus

$$\begin{aligned} e_1\ge \frac{d+1}{2}> \frac{t_1p}{2}\ge t_1, \end{aligned}$$

which is a contradiction.

We showed that the conditions of Lemma 2 are satisfied and Theorem 2 follows from (8) and Lemma 2 since

$$\begin{aligned} \left|\sum _{\xi \in \varvec{F}_q}\psi (F_{a_1,\ldots ,a_s}(\xi ))\right|\le \left|\sum _{\xi \in \varvec{F}_q\setminus -\varvec{\alpha }}\psi (F_{a_1,\ldots ,a_s}(\xi ))\right|+s, \end{aligned}$$

where \(-\varvec{\alpha }=\{-\alpha _1,\ldots ,-\alpha _s\}\).

6 Arbitrary polynomials

In this section we prove Theorem 3.

Let

$$\begin{aligned} f(X)=\sum _{j=0}^d \gamma _jX^j\in \varvec{F}_q[X],\quad \gamma _d\ne 0, \end{aligned}$$

be a polynomial of degree

$$\begin{aligned} d=d_0+t_1p,\quad 1\le d_0<p,\quad 0\le t_1<q/p. \end{aligned}$$

Proof of the first part: we have to show that (6) is applicable, that is, the polynomial \(F_{a_1,\ldots ,a_s}(X)\) defined by (9) is not of the form \(g(X)^p-g(X)+c\) for any \((a_1,\ldots ,a_s)\ne (0,\ldots ,0)\).

Suppose the contrary that there exists an s-tuple

$$\begin{aligned} (a_1,\ldots ,a_s)\in \varvec{F}_p^s\setminus \{(0,\ldots ,0)\} \end{aligned}$$

such that the polynomial

$$\begin{aligned} F_{a_1,\ldots ,a_s}(X)=\delta \sum _{\ell =0}^d\left( \sum _{j=\ell }^d\sum _{i=1}^sa_i\gamma _j {j \atopwithdelims ()\ell }\alpha _i^{j-\ell } \right) X^{\ell } \end{aligned}$$

can be written as

$$\begin{aligned} g(X)^p-g(X)+c\quad \text{ for } \text{ some } g(X)\in \varvec{F}_q[X]\quad \text{ and }\quad c \in \varvec{F}_q. \end{aligned}$$

We have either

$$\begin{aligned} F_{a_1,\dots ,a_s}(X)= 0 \end{aligned}$$

or

$$\begin{aligned} \deg (F_{a_1,\ldots ,a_s})\equiv 0\bmod p. \end{aligned}$$

Hence,

$$\begin{aligned} \deg (F_{a_1,\dots ,a_s}) \le d-d_0, \end{aligned}$$

where we used the convention \(\deg (0)=-1\). We conclude that the coefficients \(\delta R_\ell \) of \(F_{a_1,\dots ,a_s}(X)\) at \(X^{\ell }\) vanish for \(\ell =d-d_0+1,\dots , d\). Since \(\delta \not = 0\) we have

$$\begin{aligned} R_{\ell }=\sum _{j=\ell }^d\sum _{i=1}^sa_i\gamma _j {j \atopwithdelims ()\ell }\alpha _i^{j-\ell }=0,\quad \ell =(d-d_0)+1,\ldots ,d. \end{aligned}$$
(21)

Note that by Lucas’ congruence, Lemma 3,

$$\begin{aligned} {d\atopwithdelims ()r}\equiv {d_0\atopwithdelims ()r}\not \equiv 0\bmod p,\quad r=0,\ldots ,d_0. \end{aligned}$$
(22)

Define \(T_\ell \), \(\ell =0,\ldots d_0-1\), recursively by

$$\begin{aligned} T_0=R_d \end{aligned}$$

and

$$\begin{aligned} T_{\ell }=R_{d-\ell }-\gamma _d^{-1}\sum _{r=0}^{\ell -1}\gamma _{d-\ell +r} {r+d-\ell \atopwithdelims ()d-\ell }{d \atopwithdelims ()r}^{-1}T_r, \end{aligned}$$
(23)

for \(\ell =1, \ldots , d_0-1\). Next we show that

$$\begin{aligned} T_{\ell }=\gamma _d{d \atopwithdelims ()\ell }\sum _{i=1}^sa_i\alpha _i^\ell =0, \quad \ell = 0, \ldots , d_0-1. \end{aligned}$$
(24)

For \(\ell =0\) the formula follows from (21) and for \(\ell =1,\ldots ,d_0-1\) from (23) we get by induction

$$\begin{aligned} T_{\ell }=R_{d-\ell }-\sum _{r=0}^{\ell -1}\gamma _{d-\ell +r}{r+d-\ell \atopwithdelims ()d-\ell } \sum _{i=1}^sa_i\alpha _i^r \end{aligned}$$

and from (21)

$$\begin{aligned} T_\ell =\gamma _d{d\atopwithdelims ()\ell }\sum _{i=1}^s a_i \alpha _i^\ell . \end{aligned}$$

Moreover, we get

$$\begin{aligned} T_\ell =0,\quad \ell =0,\ldots ,d_0-1, \end{aligned}$$

from (21), (23) again by induction.

By (24) and (22) we get since \(\gamma _d\ne 0\),

$$\begin{aligned} \sum _{i=1}^sa_i\alpha _i^{\ell }=0,\quad \ell =0,\ldots ,d_0-1. \end{aligned}$$

Thus for \(s\le d_0\), the \((s\times s)\)-coefficient matrix

$$\begin{aligned} \left( \alpha _i^\ell \right) _{i=1,\ldots ,s,\ell =0,1,\ldots ,s-1} \end{aligned}$$

of the system of the first s equations is a regular Vandermonde matrix and we get \((a_1,\ldots ,a_s)=(0,\ldots ,0)\), which is a contradiction.

For the second part of Theorem 3 we assume \(f(X)\in \varvec{F}_p[X]\) and notice that for any \(\alpha \in \varvec{F}_q\) the element \(f(X+\alpha )-f(\alpha )\) is in the vector space generated by the monomials \(X^i\), \(i=1,\ldots ,d\), of dimension d.

If \(d<s\le p\), we can choose any \(\varvec{\alpha }\in \varvec{F}_p^s\). Then

$$\begin{aligned} f(X+\alpha _i)-f(\alpha _i), \quad i=1,\ldots ,s, \end{aligned}$$

are linearly dependent over \(\varvec{F}_p\) as well as

$$\begin{aligned} \mathrm{Tr}(\delta (f(X+\alpha _i)-f(\alpha _i))), \quad i=1,\ldots ,s, \end{aligned}$$

that is,

$$\begin{aligned} \sum _{i=1}^sa_i\mathrm{Tr}(\delta (f(X+\alpha _i)-f(\alpha _i)))=0 \end{aligned}$$

for some \((a_1,\ldots ,a_s)\in \varvec{F}_p^s\setminus \{(0,\ldots ,0)\}\) and the result follows since not all \((c_1,\ldots ,c_s)\in \varvec{F}_p^s\) satisfy \(a_1c_1+\cdots +a_sc_s=0\).

If \(d<p\) and \(s>p\), we can choose \((a_1,\dots , a_p) \in \varvec{F}_p^p \setminus \{(0,\ldots ,0)\}\) as in the case \(s=p\) and extend it to \((a_1,\dots , a_p,a_{p+1},\ldots ,a_s)\in \varvec{F}^s_p \setminus \{(0,\ldots ,0)\}\) with \(a_{p+1}=\cdots =a_s=0\).

Proof of the third part of Theorem 3: recall that \(\{\beta _1,\ldots ,\beta _r\}\) is a basis of \(\varvec{F}_q\) over \(\varvec{F}_p\). Each \(\delta (f(X+\alpha )-f(\alpha ))\) lies in the \(\varvec{F}_p\)-vector space generated by

$$\begin{aligned} \delta \beta _jX^i, \quad j=1,\ldots ,r,\quad i=1,\ldots ,d, \end{aligned}$$

of dimension dr. The dimension of the vector space generated by

$$\begin{aligned} \mathrm{Tr}(\delta \beta _jX^i)\quad j=1,\ldots ,r, \quad i=1,\ldots ,d, \end{aligned}$$

is at most dr. If \(q\ge s>dr\), there is a nontrivial linear combination

$$\begin{aligned} \sum _{i=1}^sa_i \mathrm{Tr}(\delta (f(X+\alpha _i)-f(\alpha _i)))=0 \end{aligned}$$

for any \(\varvec{\alpha }\in \varvec{F}_q^s\) and the result follows.

7 Final remarks

7.1 Examples for \(\gcd (d,p)>1\) and \(\mathcal{T}(\mathbf{c} ,\alpha ,f)=\emptyset \)

Now we provide an example that if we drop the condition on s in part 1 of Theorem 3, the restriction \(\gcd (d,q)=1\), that is \(d_0\ge 1\), is needed.

Choose any f(X) of the form

$$\begin{aligned} f(X)=\delta ^{-1}(g(X)^p-g(X)+c)\quad \text{ for } \text{ some } g(X)\in \varvec{F}_q[X]\quad \text{ and }\quad c\in \varvec{F}_q. \end{aligned}$$

Then we obtain

$$\begin{aligned} T(f(\xi +\alpha _1))= & {} \mathrm{Tr}(\delta f(\xi +\alpha _1))\\= & {} \mathrm{Tr}(g(\xi +\alpha _1)^p-g(\xi +\alpha _1)+c)=\mathrm{Tr}(c) \end{aligned}$$

for all \(\xi \in \varvec{F}_q\), that is, any vector \((c_1,\ldots ,c_r)\in \varvec{F}_p^r\) with \(c_1\ne \mathrm{Tr}(c)\) is not attained as \((T(f(\xi +\alpha _i)))_{i=1}^s\).

We conclude that for polynomials of degree d with \(\gcd (d,p)>1\), the bound of Theorem 3 may not hold for all s. However, by Theorem 1, for monomials the restriction \(\gcd (d,p)=1\) is not needed.

7.2 Missing digits and subsets

For subsets \(\mathcal{D}\) of \(\varvec{F}_p\), the closely related problem of estimating the number of \(\xi \in \varvec{F}_q\) with

$$\begin{aligned} f(\xi )\in \{d_1\beta _1+\cdots +d_r\beta _r :d_1,\ldots ,d_r\in \mathcal{D}\} \end{aligned}$$

was studied in [10,11,12], that is, \(f(\xi )\) ’misses’ the digits in \(\varvec{F}_p\setminus \mathcal{D}\). It is straightforward to extend these results combining our approach with certain bounds on character sums to estimate the number of \(\xi \in \varvec{F}_q\) with

$$\begin{aligned} f(\xi +\alpha _i)\in \{d_1\beta _1+\cdots +d_r\beta _r: d_1,\ldots ,d_r\in \mathcal{D}\},\quad i=1,\ldots ,s. \end{aligned}$$

For example, for \(\mathcal{D}=\{0,\ldots ,t-1\}\) we can use the bound on exponential sums of [13].

Instead of restricting the set of digits we may restrict the set of \(\xi \). That is, for a subset \(\mathcal{S}\) of \(\varvec{F}_q\) we are interested in the number of solutions \(\xi \in \mathcal{S}\) of

$$\begin{aligned} (T(f(\xi +\alpha _1)),\ldots ,T(f(\xi +\alpha _s)))=\mathbf{c} \end{aligned}$$

for any fixed \(\mathbf{c} \in \varvec{F}_p^s\). Typical choices of \(\mathcal{S}\) are ‘boxes’ [13, 14] and ’consecutive’ elements [15].

7.3 Optimality and prescribed digits

Swaenepoel [16] improved the bound (1) of [2] in the case when the polynomial f(X) has degree 2 or is a monomial. In particular, for \(s=1\) and \(d=2\) the improved bound of [16] is optimal. She also generalized (1) to several polynomials with \(\varvec{F}_p\)-linearly independent leading coefficients [16, Theorem 1.5].

Moreover, in [17] Swaenepoel studied the number of solutions \(\xi \in \varvec{F}_q\) for which some of the digits of \(f(\xi )\) are prescribed, that is, for given \(\mathcal{I}\subset \{1,\ldots ,r\}\) and given \(c_i\in \varvec{F}_p\), \(i\in \mathcal{I}\), the number of \(\xi \in \varvec{F}_q\) with

$$\begin{aligned} \mathrm{Tr}(\delta _if(\xi ))=c_i, \quad i\in \mathcal{I}. \end{aligned}$$

7.4 Related work on pseudorandom number generators

Some of the ideas of the proofs in this paper are based on earlier work on nonlinear, in particular, inversive pseudorandom number generators, see [18,19,20].

More precisely, in [20] the q-periodic sequence \((\eta _n)\) over \(\varvec{F}_q\) defined by

$$\begin{aligned} \eta _{n_1+n_2p+\cdots +n_rp^{r-1}}=f(n_1\beta _1+\cdots +n_r\beta _r),\quad 0\le n_1,\ldots ,n_r<p, \end{aligned}$$

passes the s-dimensional lattice test if s polynomials of the form

$$\begin{aligned} f(X+\alpha _j)-f(\alpha _j),\quad j=1,\ldots ,s, \end{aligned}$$

are \(\varvec{F}_q\)-linearly independent. However, in the proofs of this paper we need that they are linearly independent (resp. dependent) over \(\varvec{F}_p\).

To prove Theorem 2 for \(d<p\), the method of [19] can be easily adjusted using [19, Lemma 2]. However, for \(d\ge p\) we had to use a different approach since [19, Lemma 2] is not applicable in this case.

Finally, in the proof of [18, Theorem 4] we showed that polynomials of the form \(F_{a_1,\ldots ,a_s}(X)\) can only be identical 0 if \(a_1=\cdots =a_s=0\). However, in the proof of Theorem 3 we had to show that \(F_{a_1,\ldots ,a_s}(X)\) is not of the form \(g(X)^p-g(X)+c\) and we had to modify the idea of [18].

7.5 Rudin–Shapiro function

The Rudin–Shapiro sequence \((r_n)\) is defined by

$$\begin{aligned} r_n=\sum _{i=0}^\infty n_in_{i+1},\quad n=0,1,\ldots \end{aligned}$$

if

$$\begin{aligned} n=\sum _{i=0}^\infty n_i2^i,\quad n_0,n_1,\ldots \in \{0,1\}. \end{aligned}$$

Müllner showed that the Rudin–Shapiro sequence along squares \((r_{n^2})\) is normal [21].

The Rudin–Shapiro function \(R(\xi )\) for the finite field \(\varvec{F}_q\) with respect to the ordered basis \((\beta _1,\ldots ,\beta _r)\) is defined as

$$\begin{aligned} R(\xi )=\sum _{i=1}^{r-1}x_ix_{i+1},\quad \xi =x_1\beta _1+x_2\beta _2+\cdots +x_r\beta _r,\quad x_1,\ldots ,x_r\in \varvec{F}_p. \end{aligned}$$

For \(f(X)\in \varvec{F}_q[X]\) and \(c\in \varvec{F}_p\) let

$$\begin{aligned} \mathcal{R}(c,f)=\left\{ \xi \in \varvec{F}_q: R(f(\xi ))=c \right\} . \end{aligned}$$

It seems to be not possible to use character sums to estimate the size of \(\mathcal{R}(c,f)\). However, in [22] the Hooley–Katz Theorem, see [23, Theorem 7.1.14] or [24] was used to show that if \(d=\deg (f)\ge 1\),

$$\begin{aligned} \left|\mathcal{R}(c,f)-p^{r-1}\right|\le C_{r,d}p^{\frac{3r+1}{4}}, \end{aligned}$$

where \(C_{r,d}\) is a constant depending only on r and d. In particular, we have for fixed d and \(r\ge 6\),

$$\begin{aligned} \lim _{p\rightarrow \infty }\frac{|\mathcal{R}(c,f)|}{p^{r-1}}=1, \end{aligned}$$

that is, R(f) is p-normal for \(s=1\) and \(r\ge 6\).

However, we are not aware of a result on the r-normality of R(f).