# Generalization of the Lehmer problem over incomplete intervals

## Abstract

Let $$\alpha \geq 2$$, $$m\geq 2$$ be integers, p be an odd prime with $$p\nmid m (m+1 )$$, $$0<\lambda _{1}$$, $$\lambda _{2}\leq 1$$ be real numbers, $$q=p^{\alpha }> \max \{ [ \frac{1}{\lambda _{1}} ], [ \frac{1}{\lambda _{2}} ] \}$$. For any integer n with $$(n,q)=1$$ and a nonnegative integer k, we define

$$M_{\lambda _{1},\lambda _{2}} ( m,n,k;q )=\mathop{\mathop{ \mathop{\mathop{{\sum }'}_{a=1}^{q}\mathop{{\sum }'}_{b=1}^{ [ \lambda _{1}q ]}\mathop{{\sum }'}_{c=1}^{ [\lambda _{2}q ]}}_{ab\equiv 1(\bmod q)}}_{c\equiv a^{m}(\bmod q)}}_{n\nmid b+c} ( b-c )^{2k}.$$

In this paper, we study the arithmetic properties of these generalized Kloosterman sums and give an upper bound estimation for it. By using the upper bound estimation, we discuss the properties of $$M_{\lambda _{1},\lambda _{2}} ( m,n,k;q )$$ and obtain an asymptotic formula.

## 1 Introduction

Let $$q>2$$ be an odd integer. For any integer $$1\leq a$$, $$b\leq q-1$$ with $$(a,q)=1$$, there exists a unique integer $$1\leq c\leq q-1$$ such that $$bc\equiv a (\bmod \ q)$$. Let $$N(a,q)$$ denote the number of solutions of the congruence equation $$bc\equiv a \pmod{q}$$ with $$2\nmid b+c$$ and $$(b,q)=(c,q)=1$$. The classic D. H. Lehmer problem (see F12 in [2]) is to find some nontrivial properties about $$N(1,p)$$, where p is an odd prime. Zhang [10] has given an asymptotic estimate

$$N(1,p)=\frac{p}{2}+O \bigl( p^{\frac{1}{2}}\ln ^{2}p \bigr).$$

In [11], Zhang studied the D. H. Lehmer problem in the general case of an odd number $$q>2$$ and obtained

$$N(1,q)=\frac{1}{2}\varphi ( q )+O \bigl( q^{\frac{1}{2}}d^{2} (q )\ln ^{2}q \bigr),$$

where $$\varphi ( q )$$ is the Euler function and $$d(q)$$ is the divisor function. For further properties of $$N(a,q)$$, Zhang [15] studied the mean square value of the error term $$N(a,q)-\frac{\varphi (q)}{2}$$, which proved that the estimate in [11] is best possible. Lu and Yi [6] generalized the condition “$$2\nmid a+b$$” of the classic Lehmer problem to the general case “$$n\nmid a+b$$”. Let $$\lambda _{1}$$, $$\lambda _{2}$$ be any real number with $$0<\lambda _{1}$$, $$\lambda _{2}\leq 1$$, $$n\geq 2$$ be a fixed integer, c and $$q\geq 3$$ be integers with $$( n,q )= ( c,q )=1$$. They derived

$$\mathop{\mathop{\mathop{{\sum}'}_{a=1}^{ [\lambda _{1}q ]} \mathop{{\sum}'}_{b=1}^{ [\lambda _{2}q ]}}_{ab\equiv c\ (\bmod q)}}_{n\nmid a+b}1= \biggl(1-\frac{1}{n} \biggr)\lambda _{1} \lambda _{2} \varphi (q)+O \bigl(q^{\frac{1}{2}}d^{6}(q)\ln ^{2}q \bigr).$$

In [14], Zhang investigated the distribution behavior of $$\vert a-\bar{a} \vert$$. For any real number $$0< \delta \leq 1$$, he defined

$$S ( q, \delta )=\# \bigl\{ a:1\leq a\leq q-1, ( a,q )=1, \vert a-\bar{a} \vert < \delta q \bigr\}$$

and got an asymptotic formula

$$S ( q,\delta )=\delta ( 2-\delta )\varphi ( q )+O \bigl( q^{\frac{1}{2}}d^{2} ( q ) \ln ^{3} q \bigr).$$

Khan and Shparlinski [4, 5] studied the maximal difference between an integer and its inverse

$$M ( q )=\max \bigl\{ \vert a-\bar{a} \vert :1\leq a \leq q, ( a,q )=1 \bigr\}$$

and proved

$$q-M ( q )=o \bigl(q^{\frac{3}{4}+\epsilon} \bigr)$$

for any $$\epsilon >0$$. Then Xu and Yi [8] generalized the problem in [14], they focused on the distribution behavior of $$\vert a-\bar{a} \vert$$ over incomplete intervals. For any real numbers λ, δ with $$0<\lambda$$, $$\delta \leq 1$$, they studied

$$S (q,\lambda ,\delta )=\# \bigl\{ a:1\leq a\leq \lambda q, ( a,q )=1, \vert a- \bar{a} \vert < \delta q \bigr\}$$

and gave an asymptotic formula for it.

In addition, the research on the mean value distribution of the difference between an integer and its inverse has also aroused the interest of many scholars. Zhang [13] was the first person to explicitly address this issue, he proved

$$\mathop{\mathop{\mathop{{\sum}'}_{a=1}^{q} \mathop{{\sum}'}_{b=1}^{q}}_{ab \equiv 1(\bmod{q})}} (a-b )^{2k} = \frac{\varphi ( q )q^{2k}}{ ( 2k+1 ) ( k+1 )}+O \bigl( 4^{k}q^{\frac{4k+1}{2}} d^{2} ( q )\ln ^{2}q \bigr).$$

Let $$( a^{m} )_{q}$$ represent the minimum positive residue of the integer $$a^{m}$$ modulo q, that is, $$1\leq b\leq q$$ is an integer with $$b\equiv a^{m}(\bmod \ q)$$. Xu [7] generalized the problem in [13] and studied the distribution of the differences $$\vert a- ( a^{m} )_{q} \vert$$ over incomplete intervals $$[ 1, [ \lambda q ] ]$$ with $$0<\lambda \leq 1$$. He defined

$$M_{\lambda _{1},\lambda _{2}} ( m,k;q )=\mathop{\mathop{ \mathop{{\sum}'}_{a=1}^{ [ \lambda _{1} q ]} \mathop{{\sum}'}_{b=1}^{ [ \lambda _{2}q ]}}_{b\equiv a^{m}(\bmod {q})}} (a-b )^{2k}$$

and obtained a sharp asymptotic formula

\begin{aligned}& M_{\lambda _{1},\lambda _{2}} ( m,k;q ) \\& \quad = \bigl( \lambda _{1}^{2k+2}+\lambda _{2}^{2k+2}- ( \lambda _{1}- \lambda _{2} ) ^{2k+2} \bigr) \frac{\varphi ( q )q^{2k}}{ ( 2k+2 ) ( 2k+1 )}+O_{ \lambda _{1},\lambda _{2},k} \bigl( q^{2k+\frac{1}{2}}m^{\omega ( q )}d ( q )\ln ^{2}q \bigr). \end{aligned}

Let ā denote the inverse of a modulo q, and a is called a D. H. Lehmer number if $$2\nmid a+\bar{a}$$. Zhang [12] studied the even power mean of the distance between a and ā with a Lehmer number and proved

$$M(k;q)=\mathop{\mathop{\mathop{{\sum}'}_{a=1}^{q} \mathop{{\sum}'}_{b=1}^{q}}_{ab \equiv 1(\bmod {q})}}_{2\nmid a+b} (a-b )^{2k} = \frac{\varphi ( q )q^{2k}}{ ( 2k+1 ) ( 2k+2 )}+O \bigl( 4^{k}q^{\frac{4k+1}{2}} d^{2} ( q )\ln ^{2}q \bigr).$$

In 2014, Xu and Zhang [9] considered the high-dimensional case. Let $$0< \lambda _{1},\ldots , \lambda _{k+1}\leq 1$$ be real numbers, $$q\geq \max \{ [ \frac{1}{\lambda _{i}} ]:1\leq i \leq k+1 \}$$ be a positive integer with $$( a,q )=1$$. For any nonnegative integer m, they considered the distribution of the 2mth powers of $$b_{1}\cdots b_{k}-c$$ and obtained an asymptotic formula for

$$\mathop{\mathop{\mathop{{\sum}'}_{b_{1}=1}^{ [\lambda _{1}q ]} \cdots \mathop{{\sum}'}_{b_{k}=1}^{ [\lambda _{k}q ]} \mathop{{\sum}'}_{b_{k+1}=1}^{ [\lambda _{k+1}q ]}}_{b_{1} \cdots b_{k}c\equiv a(\bmod q)}}_{2\nmid b_{1}+\cdots +b_{k}+c} ( b_{1}\cdots b_{k}-c )^{2m}.$$

Han, Xu, Yi, and Zhang [3] recently generalized the problem in [9]. They studied the high-dimensional D. H. Lehmer problem

$$\mathop{\mathop{\mathop{{\sum}'}_{b_{1}=1}^{ [\lambda _{1}q ]} \mathop{{\sum}'}_{b_{2}=1}^{ [\lambda _{2}q ]} \cdots \mathop{{\sum}'}_{b_{k+1}=1}^{ [\lambda _{k+1}q ]}}_{b_{1}b_{2} \cdots b_{k+1}\equiv a(\bmod q)}}_{n\nmid b_{1}+b_{2}+\cdots +b_{k+1}} ( b_{1}\cdots b_{t}-b_{t+1} \cdots b_{k+1} )^{m}$$

and gave an asymptotic formula for it.

In this paper, we generalize the problem in [7, 12] and study the difference between ā and $$( a^{m} )_{q}$$ with $$n\nmid \bar{a}+ (a^{m} )_{q}$$. Let $$m\geq 2$$, $$\alpha \geq 2$$ be integers, p be an odd prime with $$p\nmid m ( m+1 )$$, $$0<\lambda _{1}$$, $$\lambda _{2}\leq 1$$ be real numbers, $$q=p^{\alpha }> \max \{ [ \frac{1}{\lambda _{1}} ], [ \frac{1}{\lambda _{2}} ] \}$$, n be an integer with $$(n,q)=1$$, k be a nonnegative integer. For any integer $$a\in [1,q)$$ with $$(a,q)=1$$, we define

$$M_{\lambda _{1},\lambda _{2}} ( m,n,k;q )=\mathop{\mathop{ \mathop{\mathop{{\sum }'}_{a=1}^{q}\mathop{{\sum }'}_{b=1}^{ [ \lambda _{1}q ]}\mathop{{\sum }'}_{c=1}^{ [\lambda _{2}q ]}}_{ab\equiv 1(\bmod q)}}_{c\equiv a^{m}(\bmod q)}}_{n\nmid b+c} ( b-c )^{2k}.$$

The main purpose of this paper is to study the asymptotic properties of $$M_{\lambda _{1},\lambda _{2}} ( m,n,k;q )$$ by using the estimation for the generalized Kloosterman sums and properties of trigonometric sums.

We will prove the following result.

### Theorem 1

Let $$m\geq 2$$, $$\alpha \geq 2$$ be integers, p be an odd prime with $$p\nmid m ( m+1 )$$, $$0<\lambda _{1}$$, $$\lambda _{2}\leq 1$$ be real numbers, $$q=p^{\alpha }> \max \{ [ \frac{1}{\lambda _{1}} ], [ \frac{1}{\lambda _{2}} ] \}$$, n be an integer with $$(n,q)=1$$, k be a nonnegative integer. For any integer $$a\in [1,q)$$ with $$(a,q)=1$$, we have

\begin{aligned} M_{\lambda _{1},\lambda _{2}} ( m,n,k;q ) =& \biggl( 1- \frac{1}{n} \biggr) \bigl( \lambda _{1}^{2k+2} +\lambda _{2}^{2k+2}- ( \lambda _{1}- \lambda _{2} )^{2k+2} \bigr) \frac{\varphi ( q )q^{2k}}{ ( 2k+2 ) ( 2k+1 )} \\ & {}+O \bigl( (m+1 )q^{2k+\frac{1}{2}} d ( q ) \ln ^{2}q \bigr), \end{aligned}

where $$\varphi ( q )$$ is the Euler function and $$d(q)$$ is the divisor function.

Let

$$F_{q} (m,n )=\# \bigl\{ a:1\leq a\leq q-1, ( a,q )=1, n\nmid \bar{a} + \bigl( a^{m} \bigr)_{q} \bigr\} ,$$

it is clear that $$M_{1,1} (m,n,0;q )=F_{q} (m,n )$$, so we can get the following corollary.

### Corollary 1

Let $$m\geq 2$$, $$\alpha \geq 2$$ be integers, p be an odd prime with $$p\nmid m ( m+1 )$$, $$q=p^{\alpha }>2$$, n be an integer with $$(n,q)=1$$. We have

$$F_{q} ( m,n )= \biggl( 1-\frac{1}{n} \biggr)\varphi ( q )+O \bigl( (m+1 )q^{\frac{1}{2}}d ( q )\ln ^{2}q \bigr).$$

Taking $$n=2$$, we get the following result.

### Corollary 2

Let $$m\geq 2$$, $$\alpha \geq 2$$ be integers, p be an odd prime with $$p\nmid m ( m+1 )$$, $$0<\lambda _{1}$$, $$\lambda _{2}\leq 1$$ be real numbers, $$q=p^{\alpha }> \max \{ [ \frac{1}{\lambda _{1}} ], [ \frac{1}{\lambda _{2}} ] \}$$, k be a nonnegative integer. For any integer $$a\in [1,q)$$ with $$(a,q)=1$$, we have

\begin{aligned} M_{\lambda _{1},\lambda _{2}} ( m,2,k;q ) =&\mathop{ \mathop{\mathop{\mathop{{\sum }'}_{a=1}^{q}\mathop{{\sum }'}_{b=1}^{ [\lambda _{1}q ]}\mathop{{\sum }'}_{c=1}^{ [\lambda _{2}q ]}}_{ab\equiv 1(\bmod q)}}_{c\equiv a^{m}(\bmod q)}}_{2\nmid b+c} ( b-c )^{2k} \\ =& \frac{\varphi ( q )q^{2k}}{2 ( 2k+2 ) ( 2k+1 )} \bigl( \lambda _{1}^{2k+2} +\lambda _{2}^{2k+2}- ( \lambda _{1}- \lambda _{2} )^{2k+2} \bigr) \\ & {}+O \bigl( (m+1 )q^{2k+\frac{1}{2}} d ( q ) \ln ^{2}q \bigr). \end{aligned}

## 2 Some lemmas

### Lemma 1

Let $$\frac{1}{2}\alpha \leqslant \beta < \alpha$$, $$a=p^{\beta }v+u$$, and $$( u,p )=1$$. Then

$$\bar{a}\equiv \bar{u}-p^{\beta } \bar{u}^{2}v \pmod {p^{\alpha }}.$$

### Proof

See Lemma 1 in [1]. □

### Lemma 2

Let α be an odd number, $$\beta =\frac{1}{2} ( \alpha -1 )$$, $$a=p^{\beta }v+u$$, and $$( u,p )=1$$. Then

$$\bar{a}\equiv \bar{u}-p^{\beta }\bar{u}^{2}v+p^{2\beta } \bar{u}^{3}v^{2} \pmod{p^{\alpha }}.$$

### Proof

See Lemma 5 in [1]. □

### Lemma 3

Let q and i be integers with $$q>2$$, $$i\geqslant 0$$. Let r and l be integers with $$1\leqslant r\leqslant q$$, $$1\leqslant l\leqslant n$$. Let $$0<\lambda \leqslant 1$$ be a real number. For any given integer $$n\geqslant 2$$, we have

$$\sum_{d=1}^{ [ \lambda q ]}d^{i}e \biggl(d \frac{-rn+ql}{qn} \biggr)=\textstyle\begin{cases} \frac{ ( \lambda q )^{i+1}}{i+1}+O ( ( \lambda q )^{i} ), & qn\mid -rn+ql, \\ O ( \frac{ ( \lambda q )^{i}}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } ), & qn\nmid -rn+ql. \end{cases}$$

### Proof

See Lemma 2.1 in [3]. □

### Lemma 4

Let p be an odd prime. Then

$$\biggl\vert \sum_{0\leqslant t< p^{\beta +1}} e \bigl( at^{2}p^{-1}+htp^{- \beta -1} \bigr) \biggr\vert =\textstyle\begin{cases} p^{\beta +\frac{1}{2}}, \quad p^{\beta }\mid h,p\nmid a, \\ 0 ,\quad p^{\beta }\nmid h . \end{cases}$$

### Proof

See Lemma 7 in [1]. □

### Lemma 5

Let r, s be integers and p be an odd prime with $$(r,s,p )=1$$. For any positive integers $$m\geqslant 2$$ and $$\alpha \geqslant 2$$, $$p\nmid m (m+1 )$$, we define

$$S_{m} \bigl( r,s,p^{\alpha } \bigr) =\sum _{a=1}^{p^{\alpha }}{'} e \biggl( \frac{r\bar{a}+sa^{m}}{p^{\alpha}} \biggr),$$

then

$$\bigl\vert S_{m} \bigl( r,s,p^{\alpha } \bigr) \bigr\vert \leqslant ( m+1 )p^{\frac{\alpha }{2}}.$$

### Proof

Let $$\frac{1}{2}\alpha \leqslant \beta < \alpha$$, $$a=p^{\beta }v+u$$, and $$( u,p )=1$$, we can write

$$S_{m} \bigl( r,s,p^{\alpha } \bigr)=\mathop{\displaystyle \sum _{u=1}^{p^{ \beta }}}_{p\nmid u}\displaystyle \sum_{0\leqslant v< p^{\alpha - \beta }}e \biggl( \frac{r \overline{ (p^{\beta }v+u )}+ s ( p^{\beta }v+u )^{m}}{p^{\alpha }} \biggr).$$

(1) If $$2\mid \alpha$$, then take $$\beta = \frac{\alpha }{2}$$. From Lemma 1, we obtain

\begin{aligned} S_{m} \bigl( r,s,p^{\alpha } \bigr)&=\mathop{\displaystyle \sum _{u=1}^{p^{ \beta }}}_{p\nmid u}\displaystyle \sum_{0\leqslant v< p^{\alpha - \beta }}e \biggl( \frac{r ( \bar{u}-p^{\beta }\bar{u}^{2}v )+ s ( p^{\beta }v+u )^{m}}{p^{\alpha }} \biggr) \\ &=\mathop{\displaystyle \sum_{u=1}^{p^{\beta }}}_{p\nmid u}e \biggl( \frac{r\bar{u}+su^{m}}{p^{\alpha }} \biggr)\displaystyle \sum _{0 \leqslant v< p^{\alpha -\beta }}e \biggl( \frac{msu^{m-1}p^{\beta }v-rp^{\beta }\bar{u}^{2}v}{p^{\alpha }} \biggr) \\ &=\mathop{\displaystyle \sum_{u=1}^{p^{\beta }}}_{p\nmid u}e \biggl( \frac{r\bar{u}+su^{m}}{p^{\alpha }} \biggr)\displaystyle \sum _{0 \leqslant v< p^{\alpha -\beta }}e \biggl( \frac{ ( msu^{m-1} -r\bar{u}^{2} )v}{p^{\alpha -\beta }} \biggr) \\ &=\mathop{\displaystyle \sum_{u=1}^{p^{\beta }}}_{p\nmid u}e \biggl( \frac{r\bar{u}+su^{m}}{p^{\alpha }} \biggr)\displaystyle \sum _{0 \leqslant v< p^{\alpha -\beta }}e \biggl( \frac{ ( ms -r\bar{u}^{m+1} )u^{m-1}v}{p^{\alpha -\beta }} \biggr). \end{aligned}

By the trigonometric identity

$$\sum_{a=1}^{q}e \biggl( \frac{ra}{q} \biggr)=\textstyle\begin{cases} q, & q\mid r ; \\ 0, & q\nmid r , \end{cases}$$

we can see that the inner sum in the above formula will vanish unless $$msu^{m+1}\equiv r (\bmod \ {p^{\alpha -\beta }})$$, so we can write

$$\bigl\vert S_{m} \bigl( r,s,p^{\alpha } \bigr) \bigr\vert \leqslant p^{ \alpha -\beta}\mathop{\displaystyle \sum_{u=1}^{p^{\beta}}}_{ \substack{p\nmid u\\msu^{m+1}\equiv r (\bmod {p^{\alpha -\beta }})}}1=p^{ \beta} \mathop{\displaystyle \sum_{u=1}^{p^{\alpha -\beta}}}_{ \substack{p\nmid u\\msu^{m+1}\equiv r (\bmod {p^{\alpha -\beta }})}}1.$$

Now we consider the number of solutions to $$msu^{m+1}\equiv r(\bmod \ {p^{\alpha -\beta }})$$. Because $$p\nmid m (m+1 )$$, each solution of $$msu^{m+1}\equiv r(\bmod \ {p})$$ can be uniquely extended to the solution of $$msu^{m+1}\equiv r(\bmod \ {p^{\alpha -\beta }})$$ and vice versa. Therefore there are at most $$m+1$$ solutions of $$msu^{m+1}\equiv r(\bmod \ {p^{\alpha -\beta }})$$. We obtain

$$\bigl\vert S_{m} \bigl( r,s,p^{\alpha } \bigr) \bigr\vert \leqslant (m+1 )p^{\frac{\alpha}{2}}.$$

(2) If $$2\nmid \alpha$$, then take $$\beta = \frac{1}{2} (\alpha -1 )$$. From Lemma 2, we have

\begin{aligned} S_{m} \bigl( r,s,p^{\alpha } \bigr)&=\mathop{\displaystyle \sum _{u=1}^{p^{ \beta }}}_{p\nmid u}\displaystyle \sum_{0\leqslant v< p^{\alpha - \beta }}e \biggl( \frac{r\overline{ (p^{\beta }v+u )}+ s ( p^{\beta }v+u )^{m}}{p^{\alpha }} \biggr) \\ &=\mathop{\displaystyle \sum_{u=1}^{p^{\beta }}}_{p\nmid u} \displaystyle \sum_{0\leqslant v< p^{\beta +1}}e \biggl( \frac{r ( \bar{u}-p^{\beta}\bar{u}^{2}v+p^{2\beta}\bar{u}^{3}v^{2} )+s ( p^{\beta }v+u )^{m}}{p^{\alpha }} \biggr) \\ &=\mathop{\displaystyle \sum_{u=1}^{p^{\beta }}}_{p\nmid u}e \biggl( \frac{r\bar{u}+su^{m}}{p^{\alpha }} \biggr)F ( s ), \end{aligned}

where

\begin{aligned} F ( s )&=\displaystyle \sum_{0\leqslant v< p^{\beta +1 }}e \biggl( \frac{ ( smu^{m-1} -r\bar{u}^{2} )p^{\beta }v+ ( \frac{1}{2}sm ( m-1 )u^{m-2}+r\bar{u}^{3} )p^{2\beta }v^{2}}{p^{\alpha }} \biggr) \\ &=\displaystyle \sum_{0\leqslant v< p^{\beta +1 }}e \biggl( \frac{ ( sm -r\bar{u}^{m+1} )u^{m-1}v}{p^{\beta +1}} \biggr)e \biggl( \frac{ ( \frac{1}{2}sm ( m-1 )+r\bar{u}^{m+1} )u^{m-2}v^{2}}{p} \biggr). \end{aligned}

From Lemma 4, $$|F(s)|$$ will vanish unless $$p^{\beta +1}\mid sm-r\bar{u}^{m+1}$$ and $$p\nmid \frac{1}{2}sm ( m-1 )+r\bar{u}^{m+1}$$, i.e., $$sm \equiv r\bar{u}^{m+1}(\bmod \ {p^{\beta +1}})$$ and $$\frac{1}{2}sm ( m-1 )+r\bar{u}^{m+1}\not \equiv 0(\bmod \ {p})$$.

If $$sm\equiv r\bar{u}^{m+1}(\bmod{p^{\beta +1}})$$ is valid, then we find that

\begin{aligned} \frac{1}{2}sm ( m-1 )+r\bar{u}^{m+1}&\equiv \frac{1}{2}sm(m-1)+sm \\ &\equiv \frac{1}{2}sm(m+1) \bigl(\bmod \ {p^{\beta +1}}\bigr) \\ &\not \equiv 0(\bmod \ {p}). \end{aligned}

This yields

$$\bigl\vert F ( s ) \bigr\vert \leqslant p^{\beta +\frac{1}{2}}.$$

Therefore

$$\bigl\vert S_{m} \bigl( r,s,p^{\alpha } \bigr) \bigr\vert \leqslant p^{ \beta +\frac{1}{2}}\mathop{\displaystyle \sum_{u=1}^{p^{\beta }}}_{ \substack{p\nmid u\\smu^{m+1}\equiv r(\bmod {p^{\beta +1}})}}1 \leqslant ( m+1 )p^{\frac{\alpha }{2}}.$$

So the lemma is proved. □

### Lemma 6

Let r, s be integers and p be a prime. For any positive integer $$m\geqslant 2$$, if $$( r,s,p^{\alpha } ) =p^{h}$$, then we have

$$S_{m} \bigl( r,s,p^{\alpha } \bigr)=p^{h}S_{m} \bigl( rp^{-h} ,sp^{-h},p^{ \alpha -h} \bigr).$$

### Proof

We have $$( r,s,p^{\alpha } )=p^{h}$$ with $$0\leqslant h\leqslant \alpha$$. The case $$h=\alpha$$ is trivial, so we let $$h< \alpha$$, $$a=p^{\beta}v+u$$, where $$\beta =\alpha -h$$, we can write

\begin{aligned} S_{m} \bigl( r,s,p^{\alpha } \bigr)&=\sum _{a=1}^{p^{\alpha }}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{p^{\alpha }} \biggr) \\ &=\mathop{\sum_{u=1}^{p^{\beta }}}_{p\nmid u} \sum_{0\leqslant v< p^{h}}e \biggl( \frac{r\overline{ ( p^{\beta }v+u )}+s ( p^{\beta } v+u )^{m}}{p^{\alpha }} \biggr) \\ &=\mathop{\sum_{u=1}^{p^{\beta }}}_{p\nmid u} \sum_{0\leqslant v< p^{h}}e \biggl( \frac{r\overline{ ( p^{\beta }v+u )}+su^{m}}{p^{\alpha }} \biggr) \\ &=\mathop{\sum_{u=1}^{p^{\beta }}}_{p\nmid u} \sum_{0\leqslant v< p^{h}}e \biggl( \frac{rp^{-h}\overline{ ( p^{\beta }v+u )}+sp^{-h}u^{m}}{p^{\beta }} \biggr), \end{aligned}

and we know

$$\overline{p^{\beta }v+u}\equiv \bar{u}\bigl(\bmod \ {p^{\beta }} \bigr)\quad \text{if } p\nmid u,$$

where $$\overline{ p^{\beta }v+u }$$ denotes the integer satisfying $$1\leq \overline{ p^{\beta }v+u }\leq p^{\alpha}$$, $$\overline{ (p^{\beta }v+u )}\cdot (p^{\beta }v+u ) \equiv 1(\bmod \ {p^{\alpha }})$$, ū denotes the integer satisfying $$1\leq \bar{u}\leq p^{\beta}$$, $$u\bar{u}\equiv 1(\bmod \ {p^{\beta }})$$. Therefore we have

\begin{aligned} S_{m} \bigl( r,s,p^{\alpha } \bigr)&=\mathop{\sum _{u=1}^{p^{\beta }}}_{p \nmid u}\sum _{0\leqslant v< p^{h}}e \biggl( \frac{rp^{-h}\bar{u}+sp^{-h}u^{m}}{p^{\beta }} \biggr) \\ &=p^{h}\mathop{\sum_{u=1}^{p^{\beta }}}_{p\nmid u}e \biggl( \frac{rp^{-h}\bar{u}+sp^{-h}u^{m}}{p^{\beta }} \biggr) \\ &=p^{h}\mathop{\sum_{u=1}^{p^{\beta }}}_{p\nmid u}e \biggl( \frac{rp^{-h}\bar{u}+sp^{-h}u^{m}}{p^{\alpha -h }} \biggr), \end{aligned}

that is,

$$S_{m} \bigl( r,s,p^{\alpha } \bigr)=p^{h}S_{m} \bigl( rp^{-h},sp^{-h},p^{ \alpha -h } \bigr).$$

□

### Lemma 7

Let r, s be integers and p be an odd prime. For any positive integers $$m\geqslant 2$$ and $$\alpha \geqslant 2$$, $$p\nmid m(m+1)$$, $$q=p^{\alpha}$$, we have

$$\bigl\vert S_{m} ( r,s,q ) \bigr\vert = \Biggl\vert \sum _{a=1}^{q}{'} e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \Biggr\vert \leqslant ( m+1 ) ( r,s,q )^{\frac{1}{2}}q^{\frac{1}{2}}.$$

### Proof

It follows from Lemmas 5 and 6. □

### Lemma 8

Let $$\alpha \geqslant 2$$, $$m\geqslant 2$$ be integers, p be an odd prime with $$p\nmid m (m+1 )$$, $$q=p^{\alpha}$$. Then we have

\begin{aligned}& \sum_{l=1}^{n-1} \frac{1}{ \vert \sin \frac{\pi (-qn+ql )}{qn} \vert ^{2}} \ll n^{2} , \end{aligned}
(1)
\begin{aligned}& \sum_{s=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi s}{q} \vert }\ll (m+1)q^{ \frac{3}{2}}d ( q )\ln q , \end{aligned}
(2)
\begin{aligned}& \sum_{r=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi r}{q} \vert }\ll (m+1)q^{\frac{3}{2}}d ( q )\ln q , \end{aligned}
(3)
\begin{aligned}& \sum_{r=1}^{q-1}\sum _{s=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi r}{q} \vert } \frac{1}{ \vert \sin \frac{\pi s}{q} \vert }\ll (m+1)q^{\frac{5}{2}}d ( q )\ln ^{2}q , \end{aligned}
(4)
\begin{aligned}& \sum_{l=1}^{n-1}\sum _{s=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -qn+ql ) }{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -sn+ql ) }{qn} \vert } \ll n(m+1)q^{\frac{3}{2}}d ( q )\ln q\ln n , \end{aligned}
(5)
\begin{aligned}& \sum_{l=1}^{n-1}\sum _{r=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -rn+ql ) }{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert } \ll n(m+1)q^{\frac{3}{2}}d ( q )\ln q\ln n , \end{aligned}
(6)

and

$$\sum_{l=1}^{n-1}\sum _{r=1}^{q-1}\sum_{s=1}^{q-1} \Biggl\vert \sum_{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -sn+ql )}{qn} \vert } \ll n(m+1)q^{\frac{5}{2}}d ( q )\ln ^{2}q ,$$
(7)

where “$$f(x)\ll g(x)$$” means that there exists a constant $$C>0$$ such that $$|f(x)|\leq Cg(x)$$.

### Proof

Here we only prove inequalities (6) and (7), the others can be obtained by the same method. To prove (6), using Lemma 7 and the inequality

$$\frac{2}{\pi}\leqslant \frac{\sin x}{x}\quad \text{if } \vert x \vert \leqslant \frac{\pi}{2},$$

we can write

\begin{aligned} &\sum_{l=1}^{n-1}\sum _{r=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -rn+ql ) }{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert } \\ &\quad \leqslant ( m+1 )q^{\frac{1}{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1} ( r,q )^{\frac{1}{2}} \frac{1}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert } \\ &\quad \ll (m+1)q^{\frac{1}{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1}(r,q)^{ \frac{1}{2}} \frac{qn}{ \vert -rn+ql \vert }\frac{n}{l} \\ &\quad \ll n(m+1)q^{\frac{3}{2}}\sum_{d\mid q}d^{-\frac{1}{2}} \sum_{l=1}^{n-1} \frac{1}{l}\sum _{r=1}^{\frac{q-1}{d}}\frac{1}{r} \\ &\quad \ll n(m+1)q^{\frac{3}{2}}d (q )\ln q\ln n. \end{aligned}

To prove (7), we can write

\begin{aligned} &\sum_{l=1}^{n-1}\sum _{r=1}^{q-1}\sum_{s=1}^{q-1} \Biggl\vert \sum_{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -sn+ql )}{qn} \vert } \\ &\quad \leqslant ( m+1 )q^{\frac{1}{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1}\sum _{s=1}^{q-1} ( r,s,q )^{ \frac{1}{2}} \frac{1}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -sn+ql )}{qn} \vert } \\ &\quad \ll (m+1)q^{\frac{1}{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1} \sum _{s=1}^{q-1}(r,s,q)^{\frac{1}{2}} \frac{qn}{ \vert -rn+ql \vert } \frac{qn}{ \vert -sn+ql \vert } \\ &\quad \ll (m+1)q^{\frac{5}{2}}\sum_{d\mid q}d^{-\frac{3}{2}} \sum_{l=1}^{n-1} \sum _{r=1}^{\frac{q-1}{d}}\sum_{s=1}^{\frac{q-1}{d}} \frac{1}{rs} \\ &\quad \ll n(m+1)q^{\frac{5}{2}}d (q )\ln ^{2}q. \end{aligned}

This proves Lemma 8. □

### Lemma 9

Let m, $$\alpha \geqslant 2$$ be positive constants, p be an odd prime with $$p\nmid m (m+1 )$$, $$0<\lambda _{1}, \lambda _{2}\leqslant 1$$ be real numbers, $$q=p^{\alpha}>\max \{ [ \frac{1}{\lambda _{1}} ], [ \frac{1}{\lambda _{2}} ] \}$$, n be an integer with $$(n,q )=1$$. Then, for any integer $$a\in [1,q )$$ with $$(a,q )=1$$, we have

$$\mathop{\mathop{\mathop{\mathop{{\sum}'}_{a=1}^{q} \mathop{{\sum}'}_{b=1}^{ [\lambda _{1}q ]}\mathop{{\sum }'}_{c=1}^{ [\lambda _{2}q ]}}_{ab\equiv 1(\bmod q)}}_{c\equiv a^{m}(\bmod q)}}_{n\mid b+c}b^{i}c^{j}= \frac{\lambda _{1}^{i+1}\lambda _{2}^{j+1}\varphi ( q )q^{i+j}}{ ( i+1 ) ( j+1 )n}+O \bigl( (m+1)q^{i+j+ \frac{1}{2}} d ( q )\ln ^{2}q \bigr).$$

### Proof

\begin{aligned} &\mathop{\mathop{\mathop{\mathop{{\sum}'}_{a=1}^{q} \mathop{{\sum}'}_{b=1}^{ [\lambda _{1}q ]}\mathop{{\sum }'}_{c=1}^{ [\lambda _{2}q ]}}_{ab\equiv 1(\bmod q)}}_{c\equiv a^{m}(\bmod q)}}_{n\mid b+c}b^{i}c^{j} \\ &\quad =\frac{1}{nq^{2}}\sum_{l=1}^{n}\sum _{r=1}^{q}\sum_{s=1}^{q} \mathop{\mathop{\mathop{{\sum}'}_{a=1}^{q} \mathop{{\sum}'}_{b=1}^{q} \mathop{{\sum }'}_{c=1}^{q}}_{ab\equiv 1(\bmod q)}}_{c\equiv a^{m}( \bmod q)} \sum_{d=1}^{ [ \lambda _{1}q ] }\sum _{f=1}^{ [ \lambda _{2}q ] }d^{i}f^{j}e \biggl( \frac{r ( b-d )}{q} \biggr)e \biggl( \frac{s ( c-f )}{q} \biggr)e \biggl( \frac{l ( d+f )}{n} \biggr) \\ &\quad =\frac{1}{nq^{2}}\sum_{l=1}^{n}\sum _{r=1}^{q}\sum_{s=1}^{q} \sum_{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr)\sum_{d=1}^{ [ \lambda _{1} q ]}d^{i}e \biggl( \frac{-rn+lq}{qn} d \biggr)\sum_{f=1}^{ [ \lambda _{2} q ]}f^{j}e \biggl( \frac{-sn+lq}{qn} f \biggr). \end{aligned}

We divide the above summation over l, r, and s into the following eight cases:

1. (1)

$$l=n$$, $$r=s=q$$;

2. (2)

$$l=n$$, $$r=q, 1\leqslant s\leqslant q-1$$;

3. (3)

$$l=n, 1\leqslant r\leqslant q-1$$, $$s=q$$;

4. (4)

$$l=n, 1\leqslant r,s\leqslant q-1$$;

5. (5)

$$1\leqslant l\leqslant n-1, r=s=q$$;

6. (6)

$$1\leqslant l\leqslant n-1, r=q, 1\leqslant s\leqslant q-1$$;

7. (7)

$$1\leqslant l\leqslant n-1, 1\leqslant r\leqslant q-1, s=q$$;

8. (8)

$$1\leqslant l\leqslant n-1$$, $$1\leqslant r$$, $$s\leqslant q-1$$.

Therefore we can write

\begin{aligned} &\mathop{\mathop{\mathop{\mathop{{\sum}'}_{a=1}^{q} \mathop{{\sum}'}_{b=1}^{ [\lambda _{1}q ]}\mathop{{\sum }'}_{c=1}^{ [\lambda _{2}q ]}}_{ab\equiv 1(\bmod q)}}_{c\equiv a^{m}(\bmod q)}}_{n\mid b+c}b^{i}c^{j} \\ &\quad=\frac{\varphi ( q )}{nq^{2}}\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i} \sum_{f=1}^{ [ \lambda _{2}q ]}f^{j} \\ &\quad\quad {}+\frac{1}{nq^{2}}\sum_{s=1}^{q-1} \sum_{a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr)\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i} \sum_{f=1}^{ [ \lambda _{2} q ]}f^{j}e \biggl( \frac{-sf}{q} \biggr) \\ &\quad\quad {}+\frac{1}{nq^{2}}\sum_{r=1}^{q-1} \sum_{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr)\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i}e \biggl( \frac{-rd}{q} \biggr)\sum_{f=1}^{ [ \lambda _{2}q ]}f^{j} \\ &\quad\quad {}+\frac{1}{nq^{2}}\sum_{r=1}^{q-1} \sum_{s=1}^{q-1}\sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr)\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i}e \biggl( \frac{-rd}{q} \biggr)\sum_{f=1}^{ [ \lambda _{2} q ]}f^{j}e \biggl( \frac{-sf}{q} \biggr) \\ &\quad\quad {}+\frac{\varphi ( q )}{nq^{2}}\sum_{l=1}^{n-1} \sum_{d=1}^{ [ \lambda _{1}q ]}d^{i}e \biggl( \frac{-qn+lq}{qn} d \biggr)\sum_{f=1}^{ [ \lambda _{2} q ]}f^{j}e \biggl( \frac{-qn+lq}{qn}f \biggr) \\ &\quad\quad {}+\frac{1}{nq^{2}}\sum_{l=1}^{n-1} \sum_{s=1}^{q-1}\sum _{a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr)\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i}e \biggl( \frac{-qn+lq}{qn} d \biggr)\sum_{f=1}^{ [ \lambda _{2} q ]}f^{j}e \biggl( \frac{-sn+lq}{qn}f \biggr) \\ &\quad\quad {}+\frac{1}{nq^{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1}\sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr)\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i}e \biggl( \frac{-rn+lq}{qn} d \biggr)\sum_{f=1}^{ [ \lambda _{2} q ]}f^{j}e \biggl( \frac{-qn+lq}{qn}f \biggr) \\ &\quad\quad {}+\frac{1}{nq^{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1}\sum _{s=1}^{q-1} \sum_{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr)\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i}e \biggl( \frac{-rn+lq}{qn} d \biggr)\sum_{f=1}^{ [ \lambda _{2} q ]}f^{j}e \biggl( \frac{-sn+lq}{qn}f \biggr). \end{aligned}

From Lemma 3, we know

$$\frac{\varphi ( q )}{nq^{2}}\sum_{d=1}^{ [ \lambda _{1}q ]}d^{i} \sum_{f=1}^{ [ \lambda _{2}q ]}f^{j}= \frac{\lambda _{1}^{i+1}\lambda _{2}^{j+1}\varphi ( q )q^{i+j}}{ ( i+1 ) ( j+1 )n}+O \bigl( q^{i+j} \bigr),$$

while the other terms are

\begin{aligned} &\ll \frac{1}{nq^{2}}\sum_{s=1}^{q-1} \sum_{a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr) \frac{ ( \lambda _{1}q )^{i+1}}{i+1} \frac{ ( \lambda _{2} q )^{j}}{ \vert \sin \frac{\pi s}{q} \vert } \\ &\quad {}+\frac{1}{nq^{2}}\sum_{r=1}^{q-1} \sum_{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr) \frac{ ( \lambda _{1}q )^{i}}{ \vert \sin \frac{\pi r}{q} \vert } \frac{ ( \lambda _{2}q )^{j+1}}{j+1} \\ &\quad {}+\frac{1}{nq^{2}}\sum_{r=1}^{q-1} \sum_{s=1}^{q-1}\sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \frac{ ( \lambda _{1}q )^{i}}{ \vert \sin \frac{\pi r}{q} \vert } \frac{ ( \lambda _{2}q )^{j}}{ \vert \sin \frac{\pi s}{q} \vert } \\ &\quad {}+\frac{\varphi ( q )}{nq^{2}}\sum_{l=1}^{n-1} \frac{ ( \lambda _{1} q )^{i} ( \lambda _{2} q )^{j}}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert ^{2}} \\ &\quad {}+\frac{1}{nq^{2}}\sum_{l=1}^{n-1} \sum_{s=1}^{q-1}\sum _{a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr) \frac{ ( \lambda _{1} q )^{i}}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert } \frac{ ( \lambda _{2}q )^{j}}{ \vert \sin \frac{\pi ( -sn+ql )}{qn} \vert } \\ &\quad {}+\frac{1}{nq^{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1}\sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr) \frac{ ( \lambda _{1} q )^{i}}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{ ( \lambda _{2}q )^{j}}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert } \\ &\quad {}+\frac{1}{nq^{2}}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1}\sum _{s=1}^{q-1} \sum_{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \frac{ ( \lambda _{1} q )^{i}}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{ ( \lambda _{2}q )^{j}}{ \vert \sin \frac{\pi ( -sn+ql )}{qn} \vert } \\ &\ll _{\lambda _{1},\lambda _{2},i,j} n^{-1}q^{i+j-1}\sum _{s=1}^{q-1} \Biggl\vert \sum _{ a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi s}{q} \vert } \\ &\quad {}+n^{-1}q^{i+j-1}\sum_{r=1}^{q-1} \Biggl\vert \sum_{ a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi r}{q} \vert } \\ &\quad {}+n^{-1}q^{i+j-2}\sum_{r=1}^{q-1} \sum_{s=1}^{q-1} \Biggl\vert \sum _{ a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi r}{q} \vert } \frac{1}{ \vert \sin \frac{\pi s}{q} \vert } \\ &\quad {}+n^{-1}q^{i+j-1}\sum_{l=1}^{n-1} \frac{1}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert ^{2}} \\ &\quad {}+n^{-1}q^{i+j-2}\sum_{l=1}^{n-1} \sum_{s=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -sn+ql )}{qn} \vert } \\ &\quad {}+n^{-1}q^{i+j-2}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -qn+ql )}{qn} \vert } \\ &\quad {}+n^{-1}q^{i+j-2}\sum_{l=1}^{n-1} \sum_{r=1}^{q-1}\sum _{s=1}^{q-1} \Biggl\vert \sum _{a=1}^{q}{'}e \biggl( \frac{r\bar{a}+sa^{m}}{q} \biggr) \Biggr\vert \frac{1}{ \vert \sin \frac{\pi ( -rn+ql )}{qn} \vert } \frac{1}{ \vert \sin \frac{\pi ( -sn+ql )}{qn} \vert }. \end{aligned}

Using Lemma 8, we know the above formula is $$\ll (m+1)q^{i+j+\frac{1}{2}}d ( q ) \ln ^{2}q$$.

Therefore

$$\mathop{\displaystyle \sum_{a=1}^{q}{'} \displaystyle \sum_{b=1}^{ [\lambda _{1}q ]}{'} \displaystyle \sum_{c=1}^{ [ \lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)\\n\mid b+c}}b^{i}c^{j}= \frac{\lambda _{1}^{i+1}\lambda _{2}^{j+1}\varphi ( q )q^{i+j}}{ ( i+1 ) ( j+1 )n}+O \bigl( (m+1)q^{i+j+ \frac{1}{2}} d ( q )\ln ^{2}q \bigr).$$

This proves Lemma 9. □

## 3 Proof of the theorem

In this section, we will prove Theorem 1. Observe that

$$\mathop{\displaystyle \sum_{a=1}^{q}{'} \displaystyle \sum_{b=1}^{ [\lambda _{1}q ]}{'} \displaystyle \sum_{c=1}^{ [ \lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)\\n\nmid b+c}} ( b-c )^{2k}=\mathop{\displaystyle \sum_{a=1}^{q}{'} \displaystyle \sum_{b=1}^{ [\lambda _{1}q ]}{'} \displaystyle \sum_{c=1}^{ [\lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)}} ( b-c )^{2k}-\mathop{\displaystyle \sum_{a=1}^{q}{'} \displaystyle \sum_{b=1}^{ [\lambda _{1}q ]}{'} \displaystyle \sum_{c=1}^{ [\lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)\\n\mid b+c}} ( b-c )^{2k}.$$
(8)

Firstly, we expand the first term in (8). Using the binomial theorem,

$$\mathop{\displaystyle \sum_{a=1}^{q}{'} \displaystyle \sum_{b=1}^{ [\lambda _{1}q ]}{'} \displaystyle \sum_{c=1}^{ [ \lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)}} ( b-c )^{2k}=\sum_{i=0}^{2k} \begin{pmatrix} 2k \\ i \end{pmatrix} ( -1 )^{i}\mathop{\sum _{a=1}^{q}{'}\sum _{b=1}^{ [ \lambda _{1}q ]}{'}\sum _{c=1}^{ [ \lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)}}b^{2k-i}c^{i}.$$

The same way as in the proof of Lemma 9, we can write

$$\mathop{\sum_{a=1}^{q}{'}\sum _{b=1}^{ [ \lambda _{1}q ]}{'} \sum _{c=1}^{ [ \lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)}}b^{2k-i}c^{i}= \frac{\lambda _{1}^{2k-i+1}\lambda _{2}^{i+1}\varphi ( q )q^{2k}}{ ( i+1 ) ( 2k-i+1 )}+O \bigl( (m+1)q^{2k+\frac{1}{2}}d ( q )\ln ^{2}q \bigr).$$

Note that

\begin{aligned} & \sum_{i=0}^{2k} \begin{pmatrix} 2k \\ i \end{pmatrix} ( -1 )^{i} \frac{\lambda _{1}^{2k-i+1}\lambda _{2}^{i+1}}{ ( i+1 ) ( 2k-i+1 )} \\ &\quad =\frac{1}{ ( 2k+2 ) ( 2k+1 )}\sum_{i=0}^{2k} \begin{pmatrix} 2k+2 \\ i+1 \end{pmatrix} ( -1 )^{i}\lambda _{1}^{2k-i+1} \lambda _{2}^{i+1} \\ &\quad =\frac{-1}{ ( 2k+2 ) ( 2k+1 )}\left ( \sum_{i=0}^{2k+2} \begin{pmatrix} 2k+2 \\ i \end{pmatrix} ( -1 )^{i}\lambda _{1}^{2k+2-i} \lambda _{2}^{i}- \lambda _{1}^{2k+2}- \lambda _{2}^{2k+2} \right ) \\ &\quad =\frac{1}{ ( 2k+2 ) ( 2k+1 )} \bigl( \lambda _{1}^{2k+2}+\lambda _{2}^{2k+2}- ( \lambda _{1}-\lambda _{2} )^{2k+2} \bigr). \end{aligned}

Therefore we obtain

\begin{aligned}& \mathop{\displaystyle \sum_{a=1}^{q}{'} \displaystyle \sum_{b=1}^{ [\lambda _{1}q ]}{'} \displaystyle \sum_{c=1}^{ [ \lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)}} ( b-c )^{2k} \\& \quad = \frac{\varphi ( q )q^{2k}}{ ( 2k+2 ) ( 2k+1 )} \bigl( \lambda _{1}^{2k+2}+\lambda _{2}^{2k+2}- ( \lambda _{1}-\lambda _{2} )^{2k+2} \bigr) \\& \qquad {}+O \bigl( (m+1) q^{2k+\frac{1}{2}}d ( q )\ln ^{2}q \bigr) . \end{aligned}
(9)

Similarly, using Lemma 9 we have

\begin{aligned}& \mathop{\displaystyle \sum_{a=1}^{q}{'} \displaystyle \sum_{b=1}^{ [\lambda _{1}q ]}{'} \displaystyle \sum_{c=1}^{ [ \lambda _{2}q ]}{'}}_{ \substack{ab\equiv 1(\bmod q)\\c\equiv a^{m}(\bmod q)\\n\mid b+c}} ( b-c )^{2k} \\& \quad = \frac{\varphi ( q )q^{2k}}{ ( 2k+2 ) ( 2k+1 )n} \bigl( \lambda _{1}^{2k+2}+ \lambda _{2}^{2k+2}- ( \lambda _{1}-\lambda _{2} )^{2k+2} \bigr) \\& \qquad {}+O \bigl((m+1) q^{2k+\frac{1}{2}} d ( q )\ln ^{2}q \bigr) . \end{aligned}
(10)

From formulas (8), (9), and (10), Theorem 1 follows.

## References

1. Estermann, T.: On Kloosterman’s sum. Mathematika 8, 83–86 (1961)

2. Guy, R.K.: Unsolved Problems in Number Theory. Springer, New York (1981)

3. Han, D., Xu, Z.F., Yi, Y., Zhang, T.P.: A note on high-dimensional D. H. Lehmer problem. Taiwan. J. Math. 25, 1137–1157 (2021)

4. Khan, M.R.: An optimization with a modular constraint. Am. Math. Mon. 108, 374–375 (2001)

5. Khan, M.R., Shparlinski, I.E.: On the maximal difference between an element and its inverse modulo n. Period. Math. Hung. 47, 111–117 (2003)

6. Lu, Y.M., Yi, Y.: On the generalization of the D. H. Lehmer problem. Acta Math. Sin. Engl. Ser. 25, 1269–1274 (2009)

7. Xu, Z.F.: On the difference between an integer and its m-th power mod n. Sci. China Math. 56, 1597–1606 (2013)

8. Xu, Z.F., Yi, Y.: Difference between an integer and its inverse on an incomplete interval. Sci. China Math. 41, 669–679 (2011)

9. Xu, Z.F., Zhang, T.P.: High-dimensional D. H. Lehmer problem over short intervals. Abstr. Appl. Anal. 30, 213–228 (2014)

10. Zhang, W.P.: On a problem of D. H. Lehmer and its generalization. Compos. Math. 86, 307–316 (1993)

11. Zhang, W.P.: A problem of D. H. Lehmer and its generalization ii. Compos. Math. 91, 47–56 (1994)

12. Zhang, W.P.: On the difference between a D. H. Lehmer number and its inverse modulo q. Acta Arith. 68, 255–263 (1994)

13. Zhang, W.P.: On the difference between an integer and its inverse modulo n. J. Number Theory 52, 1–6 (1995)

14. Zhang, W.P.: On the distribution of inverses modulo n. J. Number Theory 61, 301–310 (1996)

15. Zhang, W.P., Xu, Z.B., Yi, Y.: A problem of D. H. Lehmer and its mean square value formula. J. Number Theory 103, 197–213 (2003)

## Acknowledgements

The authors are grateful to the anonymous referee for very helpful and detailed comments.

## Funding

This work is supported by the N.S.F. (11971381, 12371007) of P.R. China and Shaanxi Fundamental Science Research Project for Mathematics and Physics (Grant No. 22JSY007).

## Author information

Authors

### Contributions

ZL wrote the main manuscript text and DH participated in the research and summary of the study. All authors reviewed the manuscript.

### Corresponding author

Correspondence to Di Han.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and permissions

Liu, Z., Han, D. Generalization of the Lehmer problem over incomplete intervals. J Inequal Appl 2023, 128 (2023). https://doi.org/10.1186/s13660-023-03034-9