In this section, our main goal is to prove Theorem 1, which is one of our key tool in establishing several important results of this article. Recalling the example of Shparlinski in [23, Section 1], we already noticed in Sect. 1.1 that, condition (a) of Theorem 1 is needed if \(\omega (x)\) is irreducible in \({\mathbb {F}}_p[x].\) We shall discuss more about this condition later in Remark 1.
Now, we illustrate with an example that all of the \(\gcd (\tau _i,\tau _j)'s\) cannot be too large. In other words, we need condition (b) (or some other condition) to obtain a non trivial bound in Theorem 1. For example, let \(r=2\) and g be a generator of \({\mathbb {F}}_{\ell ^2}^*.\) Then, consider the sequence
$$\begin{aligned} s_n=\,\mathrm{Tr}\left( {g^{n(\ell ^2+1)/2} - g^n}\right) , \end{aligned}$$
with characteristic polynomial \((x-g)(x-g^{\ell })(x-g^{(\ell ^2+1)/2})(x-g^{\ell (\ell ^2+1)/2})\). Note that
$$\begin{aligned} \tau _2=\,\mathrm{ord}\,{g}=\ell ^2-1~\mathrm{and}~\tau _1 = \,\mathrm{ord}\,{g^{(\ell ^2+1)/2}} =\tfrac{\ell ^2-1}{\gcd (\ell ^2-1,(\ell ^2+1)/2)}. \end{aligned}$$
It is easy to see that \(\gcd (\ell ^2-1,(\ell ^2+1)/2)=1,\) so \(\gcd (\tau _1,\tau _2)= \ell ^2 - 1.\) On another hand we note that \(\gcd (\tau _1,\ell -1)=\ell -1.\) Then, one can show that
$$\begin{aligned} \sum _{n =1}^{\ell ^2 -1} {\mathbf {e}}_{\ell }\left( {s_n}\right)&= \sum _{n=1}^{\ell ^2 -1} {\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {g^{n(\ell ^2+1)/2} - g^n}\right) }\right) \\&= \sum _{n=1}^{(\ell ^2 -1)/2} {\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {g^{2n(\ell ^2+1)/2} - g^{2n}}\right) }\right) \\&\quad + \,\sum _{n=1}^{(\ell ^2 -1)/2} {\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {g^{(2n-1)(\ell ^2+1)/2} - g^{2n-1}}\right) }\right) \\&= \frac{\ell ^2-1}{2} + \sum _{n=1}^{(\ell ^2 -1)/2} {\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {-2g^{2n-1}}\right) }\right) = \frac{\ell ^2-1}{2} + \sum _{h \in H}{\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {-2gh}\right) }\right) , \end{aligned}$$
where \(H=\langle g^2 \rangle .\)
Let p be any prime and q be any power of p. Then, the classical theorem about additive sums for one-variable polynomial, due to A. Weil (see [17, Theorem 3.2]), states that, for a given polynomial \(f(x)\in {\mathbb {F}}_q[x]\) with degree d, \(d < q,\) \(\gcd (d,q) = 1\) and a nontrivial additive character \(\psi \) in \({\mathbb {F}}_q,\) we have
$$\begin{aligned} \left| \sum _{x \in {\mathbb {F}}_q}\psi (f(x))\right| \le (d-1)\sqrt{q}. \end{aligned}$$
(13)
Consider
$$\begin{aligned} 1 + 2 \sum _{h \in H}{\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {-2gh}\right) }\right) = \sum _{x \in {\mathbb {F}}_{\ell ^2}}\psi (x^2), \end{aligned}$$
where \(\psi (\omega )= {\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {-2g \omega }\right) }\right) \) is a nonzero additive character of \({\mathbb {F}}_{\ell ^2}.\) Applying (13) with \(f(x) = x^2\), it follows that
$$\begin{aligned} \left| \sum _{h\in H} {\mathbf {e}}_{\ell }\left( {\,\mathrm{Tr}\left( {-2gh}\right) }\right) \right| \le \left| \sum _{x \in {\mathbb {F}}_{\ell ^2} } \psi ({ x^2})\right| \le \ell . \end{aligned}$$
Therefore, the linear recurrence sequence \(\{s_n\}\) satisfies
$$\begin{aligned} \sum _{n =1}^{\ell ^2 -1} {\mathbf {e}}_{\ell }\left( {s_n}\right) = \frac{\ell ^2-1}{2} + O(\ell ). \end{aligned}$$
We now need to discuss some necessary background. Let K be a finite field of characteristic p and F be an extension of K with \([F:K]=r.\) The trace function \(\,\mathrm{Tr}_{F/K} : F \rightarrow K\) is defined by
$$\begin{aligned} \,\mathrm{Tr}_{F/K}(z)= z + z^p + \cdots +z^{p^{r-1}}, \qquad z\in F. \end{aligned}$$
The following properties of \(\,\mathrm{Tr}_{F/K}(z)\) are well known.
$$\begin{aligned} \,\mathrm{Tr}_{F/K}(az + w)&= a\,\mathrm{Tr}_{F/K}(z) + \,\mathrm{Tr}_{F/K}(w), \quad \mathrm{for}\ \mathrm{all}\ a \in K, \, z,w\in F. \end{aligned}$$
(14)
$$\begin{aligned} \,\mathrm{Tr}_{F/K}(a)&=ra, \quad \mathrm{for}\ \mathrm{any} \quad a \in K. \end{aligned}$$
(15)
$$\begin{aligned} \,\mathrm{Tr}_{F/K}(z^p)&= \,\mathrm{Tr}_{F/K}(z), \quad \mathrm{for}\ \mathrm{any} \quad z \in F. \end{aligned}$$
(16)
Throughout this section, \(F={\mathbb {F}}_q\), \(K={\mathbb {F}}_p\) with \(q=p^r\) and we will simply write \(\,\mathrm{Tr}\left( {z}\right) \) instead \(\,\mathrm{Tr}_{F/K}(z)\).
Let \(\{s_n\}\) be a linear recurrence sequence of order \(r\ge 1\) in \({\mathbb {F}}_p\) with characteristic polynomial \(\omega (x)\) in \({\mathbb {F}}_p[x].\) It is well known that nth-term can be written in terms of the roots of the characteristic polynomial, see Theorem 6.21 in [18]. Therefore, if the roots \(\alpha _0, \ldots , \alpha _{r-1}\) of \(\omega (x)\) are all distinct in its splitting field, then
$$\begin{aligned} s_n= \sum _{i=0}^{r-1} \beta _i \alpha _i^n, \quad \mathrm{for}\ \, n=0,1,2,\ldots , \end{aligned}$$
(17)
where \(\beta _0,\ldots ,\beta _{r-1}\) are uniquely determined by initial values \(s_0, \ldots , s_{r-1},\) and belong to the splitting field of \(\omega (x)\) over \({\mathbb {F}}_p.\) If the characteristic polynomial \(\omega (x)\) is irreducible and \(\alpha \) is a root, then its r distinct conjugates are
$$\begin{aligned} \alpha , \alpha ^{p}, \ldots , \alpha ^{p^{r-2}}, \alpha ^{p^{r-1}}. \end{aligned}$$
Hence, the coefficients \(s_n\) are given by
$$\begin{aligned} s_n=\sum _{i=0}^{r-1}\beta _i \alpha ^{p^in}, \qquad n=0,1,2,3,\ldots \, . \end{aligned}$$
One of our main tools is the bound for Gauss sum in finite fields given by Bourgain and Chang [3, Theorem 2]. This will be required to prove Theorem 1. Assume that for a given \(\alpha \in {\mathbb {F}}_{q}\) and \(\varepsilon >0,\)
such that \(\,\mathrm{ord}\,{\alpha }=t\) satisfies
$$\begin{aligned} t > p^{\varepsilon } \quad \mathrm{and} \quad \max _{\begin{array}{c} 1\le d< r \\ d |r \end{array}} \gcd (t, p^d - 1) < t p^{-\varepsilon }. \end{aligned}$$
(18)
Then, there exists a \(\delta =\delta (\varepsilon )>0\) such that for any nontrivial additive character \(\psi \) of \({\mathbb {F}}_q,\) we have
$$\begin{aligned} \left| \sum _{n \le t} \psi (\alpha ^n) \right| \le t p^{-\delta }. \end{aligned}$$
Note that the second assumption in (18) implies the first one whenever \(r\ge 2\).
Proof of Theorem 1
We proceed by induction over \(\nu .\) Before that, following properties (14) and (15) of trace function we write
$$\begin{aligned} s_{n}&=\,\mathrm{Tr}\left( {r^{-1}s_{n}}\right) =r^{-1}\,\mathrm{Tr}\left( {\sum _{i=1}^{\nu } (\beta _{i,0}\alpha _i^n + \cdots + \beta _{i,r-1}\alpha _i^{p^{r-1}n})}\right) \\&=r^{-1} \sum _{i=1}^{\nu } \sum _{j=0}^{r-1} \,\mathrm{Tr}\left( {\beta _{i,j} \alpha _i^{p^{j}n}}\right) . \end{aligned}$$
By the assumption, \([{\mathbb {F}}_p(\alpha _i):{\mathbb {F}}_p]=r\) for any \(1\le i\le \nu .\) In other words, any such \(\alpha _i\) is in \({\mathbb {F}}_{p^r}.\) We then have, \(r=[{\mathbb {F}}_p(\alpha _1, \ldots , \alpha _{\nu }):{\mathbb {F}}_p]\) and \(z^{p^r}=z\) for any \(z \in {\mathbb {F}}_p(\alpha _1, \ldots , \alpha _{\nu }).\) In addition, from (16) it follows that, \(\,\mathrm{Tr}\left( {z^p}\right) =\,\mathrm{Tr}\left( {z}\right) \) for any \(z\in {\mathbb {F}}_p(\alpha _1, \ldots , \alpha _{\nu }).\) Then, for each pair (i, j), raising each argument \(\beta _{i,j}\alpha _i^{p^jn}\) to the power \(p^{r-j}\)
$$\begin{aligned} \,\mathrm{Tr}\left( {\beta _{i,j}\alpha _i^{p^jn}}\right) =\,\mathrm{Tr}\left( {\beta _{i,j}^{p^{r-j}} \alpha _i^{p^jn \cdot p^{r-j}}}\right) = \,\mathrm{Tr}\left( {\beta _{i,j}^{p^{r-j}} \alpha _i^{p^rn}}\right) = \,\mathrm{Tr}\left( {\beta _{i,j}^{p^{r-j}}\alpha _i^{n}}\right) . \end{aligned}$$
This implies that
$$\begin{aligned} s_{n}&= r^{-1} \sum _{i=1}^{\nu } \sum _{j=0}^{r-1} \,\mathrm{Tr}\left( { \beta _{i,j}^{p^{r-j}} \alpha _i^{n}}\right) = r^{-1} \sum _{i=1}^{\nu } \,\mathrm{Tr}\left( { \left( \sum _{j=0}^{r-1} \beta _{i,j}^{p^{r-i}}\right) \alpha _i^{n}}\right) \nonumber \\&= \,\mathrm{Tr}\left( {\gamma _1 \alpha _1^n }\right) + \cdots + \,\mathrm{Tr}\left( {\gamma _{\nu } \alpha _{\nu }^n}\right) , \end{aligned}$$
(19)
where \(\gamma _i = r^{-1}\sum _{j=0}^{r-1} \beta _{i,j}^{p^{r-i}},\) for each \(1 \le i \le \nu .\)
The case \(\nu = 1\) follows from Bourgain and Chang [3, Theorem 2]. We shall now proceed inductively, and \(\nu =2\) will be the base case. We start by denoting \(h=\mathrm{gcd}(\tau _1,\tau _2).\) It is clear that \(\mathrm{lcm}(\tau _1, \tau _2)=\tau _1 \tau _2/h\) is a period of \(s_n,\) then
$$\begin{aligned} \left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_n}\right) \right| =\frac{\tau }{\tau _1 \tau _2/h}\left| \sum _{n\le \tfrac{\tau _1 \tau _2}{h}} {\mathbf {e}}_p\left( {\xi s_n}\right) \right| . \end{aligned}$$
Hence, it is enough to prove that
$$\begin{aligned} \left| \sum _{n\le \tfrac{\tau _1 \tau _2}{h}} {\mathbf {e}}_p\left( {\xi s_n}\right) \right| \le \frac{\tau _1 \tau _2}{h} p^{-\delta }, \quad \mathrm{with}\ \, (\xi ,p)=1, \end{aligned}$$
for some \(\delta = \delta (\varepsilon )>0.\) Dividing the range of the sum \(n \le \tau _1 \tau _2/ h\) into the form \(n = m h + u_0 \) with \(m\le \tau _1\tau _2 / h^2\) and \(0\le u_0 \le h-1,\) we have
$$\begin{aligned} \left| \sum _{n\le \tfrac{\tau _1 \tau _2}{h}} {\mathbf {e}}_p\left( {\xi s_n}\right) \right|&=\left| \sum _{u_0=0}^{h-1}\sum _{n\le \tfrac{\tau _1 \tau _2}{h^2}} {\mathbf {e}}_p\left( {\xi s_{nh + u_0}}\right) \right| \le \sum _{u_0=0}^{h-1} \left| \sum _{n\le \tfrac{\tau _1 \tau _2}{h^2}} {\mathbf {e}}_p\left( {\xi s_{nh + u_0}}\right) \right| \nonumber \\&\le h \times \max _{0 \le u_0 \le h-1} \left| \sum _{n\le \tau _1 \tau _2/h^2}{\mathbf {e}}_p\left( {\xi s_{nh + u_0}}\right) \right| . \end{aligned}$$
(20)
Let \((n_1,n_2)\) be a tuple with \(n_i\le \frac{\tau _i}{h}.\) Since \(\gcd (\tfrac{\tau _1}{h},\tfrac{\tau _2}{h})=1\), by Chinese remainder theorem, there exist integers \(m_1,m_2\) with \(\gcd (m_1, \tfrac{\tau _1}{h})= \gcd (m_2,\tfrac{\tau _2}{h})=1, \) such that
$$\begin{aligned} \left| \left\{ n \,\left( \mathrm{mod}\,\tfrac{\tau _1 \tau _2}{h^2}\right) \,:\, 1\le n \le \frac{\tau _1 \tau _2}{h^2} \right\} \right| =\left| \left\{ n_1 m_1 \tfrac{\tau _2}{h} +n_{2} m_{2} \tfrac{\tau _1}{h} \,\left( \mathrm{mod}\,\tfrac{\tau _1 \tau _2}{ h^2}\right) :\, 1\le n_i \le \frac{\tau _i}{h} \right\} \right| .\nonumber \\ \end{aligned}$$
(21)
Moreover, the pair \((m_1, m_2 )\) has the following property: given \((n_1, n_{2}),\) with \(1\le n_i\le \tau _i/h,\) then \(n = n_1 m_1 \tfrac{\tau _2}{h} +n_{2} m_{2} \tfrac{\tau _1}{h}\) satisfies
$$\begin{aligned} n \equiv n_1 \,\left( \mathrm{mod}\,\tfrac{\tau _1}{h}\right) \; \mathrm{and}\ \, n \equiv n_2 \,\left( \mathrm{mod} \,\tfrac{\tau _2}{h}\right) , \end{aligned}$$
and n is unique modulo \(\tfrac{\tau _1\tau _2}{h^2}.\) Since \(\tfrac{\tau _1}{h}= \,\mathrm{ord}\,{\alpha _1^h}\) and \(\tfrac{\tau _2}{h} =\,\mathrm{ord}\,{\alpha _2^h}\), then
$$\begin{aligned} \alpha _i^{hn} = \alpha _i^{h\left( n_1 m_1 \tfrac{\tau _2}{h} +n_{2} m_{2} \tfrac{\tau _{1}}{h}\right) } = \alpha _i^{hn_i}, \quad 1 \le i \le 2. \end{aligned}$$
(22)
Combining (21) and (22), we have
$$\begin{aligned} \left| \sum _{n\le \tfrac{\tau _1 \tau _2}{h^2}}{\mathbf {e}}_p\left( {\xi s_{nh+u_0}}\right) \right|&= \left| \sum _{n_1\le \tfrac{\tau _1 }{h}} {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\xi \gamma _1 \alpha _1^{n_1h + u_0} }\right) }\right) \right| \nonumber \\&\quad \times \,\left| \sum _{n_2\le \tfrac{ \tau _2}{h}} {\mathbf {e}}_p\left( { \,\mathrm{Tr}\left( {\xi \gamma _{2} \alpha _{2}^{n_{2}h+u_0}}\right) }\right) \right| \nonumber \\&=\left| \sum _{n_1\le \tfrac{\tau _1 }{h}} {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\gamma '_1 \alpha _1^{n_1h} }\right) }\right) \right| \times \left| \sum _{n_2\le \tfrac{ \tau _2}{h}} {\mathbf {e}}_p\left( { \,\mathrm{Tr}\left( {\gamma '_{2} \alpha _{2}^{n_{2}h}}\right) }\right) \right| , \end{aligned}$$
(23)
with \(\gamma '_1=\xi \gamma _1 \alpha _1^{u_0}, \gamma '_2 =\xi \gamma _2\alpha _2^{u_0} \) in \({\mathbb {F}}_p(\alpha _1, \alpha _2).\) Since \(\{s_n\}\) is a nonzero sequence, therefore \(\gamma '_i \ne 0,\) at least for some \(1\le i \le 2.\) First, let us assume that \(\gamma '_1, \gamma '_2 \ne 0.\)
Each \({\mathbf {e}}_p\left( { \,\mathrm{Tr}\left( {\xi \gamma '_{i} z}\right) }\right) \) corresponds to a nontrivial additive character, say \(\psi _i(z),\) in \({\mathbb {F}}_p(\alpha _i)={\mathbb {F}}_{p^r}.\) In order to satisfy condition (18), we first recall assumptions \(h < p^{\varepsilon '},\) \(\varepsilon> \varepsilon '>0\) and \(\max _{\begin{array}{c} d< r \\ d | r \end{array}} \gcd (\tau _i, p^d-1) < \tau _i p^{-\varepsilon }\) for some \(i \in \{1,2\}.\) Without loss of generality, let us assume that \(i=1.\) Then, for any d|r with \(1\le d < r\), we have
$$\begin{aligned} \gcd \left( \tfrac{\tau _1}{h} , p^d - 1 \right) \le \gcd (\tau _1, p^d -1)< \tau _1 p^{-\varepsilon } <\frac{\tau _1}{h}p^{-(\varepsilon -\varepsilon ')}. \end{aligned}$$
Therefore, by Bourgain and Chang [3, Theorem 2] it follows that
$$\begin{aligned} \left| \sum _{n_1 \le \tau _1/h}{\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\gamma '_1 \alpha _1^{n_1h} }\right) }\right) \right| =\left| \sum _{n_1 \le \tau _1/h}\psi _1({ \alpha _1^{n_1h} }) \right| \le \frac{\tau _1}{h}p^{-\delta }. \end{aligned}$$
On the other hand, bounding trivially we have
$$\begin{aligned} \left| \sum _{n_2 \le \tau _2/h}{\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\gamma '_2 \alpha _2^{n_2h} }\right) }\right) \right| =\left| \sum _{n_2 \le \tau _2/h}\psi _2({ \alpha _2^{n_2h} }) \right| \le \frac{\tau _2}{h}. \end{aligned}$$
Thus, combining above equations with (20) and (23) we get
$$\begin{aligned} \max _{\xi \in {\mathbb {F}}_p^*} \left| \sum _{n \le \frac{\tau _1\tau _2}{h}} {\mathbf {e}}_p\left( {\xi s_{n}}\right) \right| \le h \times \frac{\tau _1 \tau _2}{h^2}p^{-\delta } =\frac{\tau _1 \tau _2}{h}p^{-\delta }. \end{aligned}$$
Now, let us assume that one of the \(\lambda _i'=0,\) say for \(i=2\). Arguing exactly as few lines above, it follows from assumption (a) that
$$\begin{aligned} \left| \sum _{n_1 \le \tau _1/h}{\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\gamma '_1 \alpha _1^{n_1h}}\right) }\right) \right| \le \frac{\tau _1}{h}p^{-\delta }, \quad \mathrm{and} \quad \left| \sum _{n_2 \le \tau _2/h} {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\gamma '_2 \alpha _2^{n_2h} }\right) }\right) \right| = \frac{\tau _2}{h}. \end{aligned}$$
Hence, the desired bound follows. This conclude the case \(\nu =2.\)
Now, we proceed by induction over \(\nu ,\) and assume Theorem 1 to be true up to \(\nu -1.\) We follow the idea due to Garaev [9, Section 4.4]. Considering (19) and periodicity, for any \(t\ge 1\) we get
$$\begin{aligned} \tau \left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_n}\right) \right| ^{2t}&= \sum _{m\le \tau }\left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_{m+n}}\right) \right| ^{2t} \\&= \sum _{m\le \tau }\left| \sum _{n \le \tau } {\mathbf {e}}_p\left( {\xi (\,\mathrm{Tr}\left( {\gamma _1 \alpha _1^{m+n} }\right) + \cdots + \,\mathrm{Tr}\left( {\gamma _{\nu } \alpha _{\nu }^{m+n}}\right) )}\right) \right| ^{2t} \\&\le \sum _{n_1\le \tau } \cdots \sum _{n_{2t}\le \tau } \left| \sum _{m\le \tau } {\mathbf {e}}_p\left( {\xi \sum _{i=1}^{\nu } \,\mathrm{Tr}\left( {\gamma _i\alpha _i^{m}\left( \alpha _i^{n_1} + \cdots - \alpha _i^{n_{2t}}\right) }\right) }\right) \right| . \end{aligned}$$
Raising to the power 2t, and applying Cauchy–Schwarz, we have
$$\begin{aligned} \tau ^{2t}\left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_n}\right) \right| ^{4t^2}&\le {\tau ^{2t(2t-1)}}\\&\quad \times \,\sum _{n_1\le \tau } \cdots \sum _{n_{2t}\le \tau }\left| \sum _{m\le \tau } {\mathbf {e}}_p\left( {\xi \sum _{i=1}^{\nu } \,\mathrm{Tr}\left( {\gamma _i\alpha _i^{m} \left( \alpha _i^{n_1}+ \cdots - \alpha _i^{n_{2t}}\right) }\right) }\right) \right| ^{2t}. \end{aligned}$$
Given \((\lambda _1 ,\cdots , \lambda _{\nu }) \in {\mathbb {F}}_q^{\nu },\) let \(J_t(\lambda _1 ,\cdots , \lambda _{\nu })\) denote the number of solutions of the system
$$\begin{aligned} \left\{ \begin{array}{ccc} \alpha _1^{n_1} + \cdots + \alpha _{1}^{n_t} &{} = &{} \alpha _{1}^{n_{t+1}} + \cdots + \alpha _1^{n_{2t}} + \lambda _1 \\ \vdots \qquad \vdots &{} &{} \vdots \qquad \vdots \qquad \vdots \\ \alpha _{\nu }^{n_1}+ \cdots + \alpha _{\nu }^{n_t} &{}=&{} \alpha _{\nu }^{n_{t+1}} + \cdots +\alpha _{\nu }^{n_{2t}} + \lambda _{\nu } \end{array}\right. \end{aligned}$$
with \(1 \le n_1, \cdots , n_{2t} \le \tau .\) Therefore,
$$\begin{aligned} \left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_n}\right) \right| ^{4t^2}&\le \tau ^{4t^2-4t} \sum _{\lambda _1 \in {\mathbb {F}}_q} \cdots \sum _{\lambda _{\nu } \in {\mathbb {F}}_q} J_t(\lambda _1 ,\cdots , \lambda _{\nu })\nonumber \\&\quad \times \,\left| \sum _{m\le \tau } {\mathbf {e}}_p\left( { \xi \sum _{i=1}^{\nu } \,\mathrm{Tr}\left( {\gamma _i \lambda _i \alpha _i^{m}}\right) }\right) \right| ^{2t}. \end{aligned}$$
(24)
Note that writing \(J_{\nu }(\lambda _1 \cdots , \lambda _{\nu })\) in terms of character sums, it follows that
$$\begin{aligned} J_{t}(\lambda _1 \cdots , \lambda _{\nu })&= \frac{1}{q^{\nu }}\sum _{x_1 \in {{\mathbb {F}}}_{q} } \cdots \sum _{x_{\nu } \in {{\mathbb {F}}}_{q}} \left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {x_1 \alpha _1^n}\right) }\right) \cdots {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {x_{\nu } \alpha _{\nu }^n}\right) }\right) \right| ^{2t} \\&\quad \times {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {x_1 \lambda _1}\right) }\right) \cdots {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {x_{\nu } \alpha _{\nu }^n}\right) }\right) \\&\le \frac{1}{q^{\nu }}\sum _{x_1 \in {{\mathbb {F}}}_{q} } \cdots \sum _{x_{\nu } \in {{\mathbb {F}}}_{q}} \left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {x_1 \alpha _1^n}\right) }\right) \cdots {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {x_{\nu } \alpha _{\nu }^n}\right) }\right) \right| ^{2t} \\&\le J_{t}(0, \ldots , 0) =:J_{t,\nu }. \end{aligned}$$
In particular, we note that \(J_{t,\nu } \le J_{t,\nu -1}.\) From (24), it follows that
$$\begin{aligned}&\left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_n}\right) \right| ^{4t^2}\\&\quad \le \tau ^{4t^2-4t} J_{t,\nu } \sum _{m_1\le \tau } \cdots \sum _{m_{2t}\le \tau } \sum _{\lambda _1 \in {\mathbb {F}}_q} \cdots \sum _{\lambda _{\nu } \in {\mathbb {F}}_q} {\mathbf {e}}_p\left( {\sum _{i=1}^{\nu } \,\mathrm{Tr}\left( {\xi \gamma _i\lambda _i (\alpha _i^{m_1} + \cdots -\alpha _i^{m_{2t}})}\right) }\right) \,. \end{aligned}$$
Note that \(a \gamma \lambda ,\) with \(a\gamma \ne 0,\) runs over \(\lambda \in {\mathbb {F}}_q\), then \({\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {a \theta \lambda z}\right) }\right) \) runs through all additive characters \(\psi \) in \(\widehat{{\mathbb {F}}}_{q},\) evaluated at z. Then, the above expression can be written as
$$\begin{aligned} \left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_n}\right) \right| ^{4t^2}&\le \tau ^{4t^2-4t} J_{t,\nu } \sum _{m_1\le \tau } \cdots \sum _{m_{2t}\le \tau } \prod _{i=1}^{\nu } \left( \sum _{x \in {{\mathbb {F}}}_q} {\mathbf {e}}_p\left( {x(\alpha _i^{m_1} +\cdots - \alpha _i^{m_{2t}})}\right) \right) \nonumber \\&\le \tau ^{4t^2-4t} q^{\nu } J^2_{t,\nu } \le \tau ^{4t^2-4t} q^{\nu } J^2_{t,\nu -1}. \end{aligned}$$
(25)
We now require an estimate for \(J_{t,\nu -1},\) and write
$$\begin{aligned} J_{t,\nu -1}&= \frac{1}{q^{\nu -1}}\sum _{\lambda _1 \in {\mathbb {F}}_q} \cdots \sum _{\lambda _{\nu -1} \in {\mathbb {F}}_q } \left| \sum _{m \le \tau } {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\lambda _1 \alpha _1^m +\cdots + \lambda _{\nu -1}\alpha _{\nu -1}^m}\right) }\right) \right| ^{2t} \nonumber \\&= \frac{\tau ^{2t}}{q^{\nu -1}} +O\left( \left( \max _{\begin{array}{c} (\lambda _1, \ldots , \lambda _{\nu -1}) \in {\mathbb {F}}_q^{\nu -1} \\ (\lambda _1, \ldots , \lambda _{\nu -1}) \ne 0 \end{array}} \left| \sum _{m\le \tau } {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\lambda _1 \alpha _1^m +\cdots + \lambda _{\nu -1}\alpha _{\nu -1}^m}\right) }\right) \right| \right) ^{2t}\right) . \end{aligned}$$
(26)
Finally, we note that \(s'_m=\,\mathrm{Tr}\left( {\lambda _1 \alpha _1^m + \cdots +\lambda _{\nu -1}\alpha _{\nu -1}^m}\right) \) defines a linear recurrence sequence with period \(\tau '\) dividing \(\tau ,\) which in particular satisfies induction hypothesis. Therefore
$$\begin{aligned} \left| \sum _{m\le \tau } {\mathbf {e}}_p\left( {\,\mathrm{Tr}\left( {\lambda _1 \alpha _1^m + \cdots + \lambda _{\nu -1}\alpha _{\nu -1}^m}\right) }\right) \right| \le \tau p^{-\delta '}, \end{aligned}$$
for some \(\delta '=\delta '(\varepsilon )>0.\) Now, taking \(t>d(\nu -1)/ 2\delta '\) (where \(d=[{\mathbb {F}}_q:{\mathbb {F}}_p]\)) and combining with (26), we get
$$\begin{aligned} J_{t,\nu -1} \ll \frac{\tau ^{2t}}{q^{\nu -1}}. \end{aligned}$$
We conclude the proof combining the above estimate with (25) to getFootnote 2
$$\begin{aligned} \max _{\xi \in {\mathbb {F}}_p^*}\left| \sum _{n\le \tau } {\mathbf {e}}_p\left( {\xi s_n}\right) \right| \le \tau p^{-\delta }, \quad \mathrm{with} \quad \delta =\tfrac{d(\nu -2)}{4t^2}. \end{aligned}$$
The following is an immediate corollary of this theorem which will be quite handy in establishing several results in Sects. 3 and 6.
Corollary 6
Suppose that \(\{ s_n\}\) is a nonzero linear recurrence sequence of order \(r\ge 2\) such that its characteristic polynomial \(\omega (x)\) is irreducible in \({\mathbb {F}}_p[x].\) If its period \(\tau \) satisfies
$$\begin{aligned} \max _{\begin{array}{c} d< r \\ d| r \end{array}} \gcd ({\tau }, p^d-1) < {\tau } \, p^{-\varepsilon }, \end{aligned}$$
then there exists a \(\delta =\delta (\varepsilon )>0\) such that
$$\begin{aligned} \max _{\xi \in {\mathbb {F}}_p^*} \left| \sum _{n \le \tau }{\mathbf {e}}_p\left( {\xi s_n}\right) \right| \le \tau { p^{-\delta }}. \end{aligned}$$
Remark 1
It is possible to relax the condition (a) by assuming that
$$\begin{aligned} \max _{\begin{array}{c} d< r \\ d| r \end{array}} \gcd (\tau _i, p^d-1) < \tau _i p^{-\varepsilon } \end{aligned}$$
holds for some \(1\le i\le \nu \) for which \(\lambda _i'\ne 0,\) where \(\lambda _i'\) is defined in the proof of Theorem 1. Also, note that \(\lambda _i'=0\) if and only if \(\lambda _i=0.\)
Since \(\{s_n\}\) is a nonzero linear recurrence sequence, there exists some \(1\le i\le \nu \) for which \(\lambda _i\ne 0.\) We discussed in Sect. 1.1 that why (a) (or some other condition) is needed to prove the irreducible case of Theorem 2. Now, for the reducible case, some of the \(\lambda _i\) could be 0. For the worst case scenario, let us assume that only one of them is nonzero, say for \(i=1.\) Then, it follows from (19) that, we are back to considering the irreducible case and then we need the condition (a) for \(i=1.\) In particular, we need (a) (or some other condition) for each irreducible component of the underlying \(\omega (x)\).