Exponential and character sums with Mersenne numbers

William D. Banks Dept. of Mathematics, University of Missouri Columbia, MO 65211, USA [email protected] John B. Friedlander Dept. of Mathematics, University of Toronto Toronto, Ontario M5S 3G3, Canada [email protected] Moubariz Z. Garaev Instituto de Matem´aticas Universidad Nacional Aut´onoma de M´exico C.P. 58089, Morelia, Michoac´an, M´exico [email protected] Igor E. Shparlinski Dept. of Computing, Macquarie University Sydney, NSW 2109, Australia [email protected]

Dedicated to the memory of Alf van der Poorten

1 Abstract

We give new bounds on sums of the form

Λ(n) exp(2πiagn/m) and Λ(n)χ(gn + a), 6 6 nXN nXN where Λ is the von Mangoldt function, m is a natural number, a and g are coprime to m, and χ is a multiplicative character modulo m. In particular, our results yield bounds on the sums

exp(2πiaMp/m) and χ(Mp) 6 6 pXN pXN p with Mersenne numbers Mp = 2 − 1, where p is prime.

AMS Subject Classification Numbers: 11L07, 11L20.

1 Introduction

Let m be an arbitrary natural number, and let a and g be integers that are coprime to m. Our aim in the present note is to give bounds on exponential sums and multiplicative character sums of the form

n n Sm(a; N)= Λ(n)em(ag ) and Tm(χ, a; N)= Λ(n)χ(g + a), 6 6 nXN nXN where em is the additive character modulo m defined by

em(x) = exp(2πix/m) (x ∈ R), and χ is a nontrivial multiplicative character modulo m. As usual, Λ denotes the von Mangoldt function given by

log p if n is a power of the prime p, Λ(n)= (0 if n is not a prime power.

2 Let t denote the multiplicative of g modulo m, i.e., the smallest natural number such that gt ≡ 1 (mod m). For the exponential sums defined above, Banks et al [1] have established the following bound as N →∞:

max Sm(a; N) gcd(a,m)=1 11 5 5 5 7 Nt− 32 m 16 + N 6 t 48 m 24 N o(1) for all m > 1, (1) 6 − 1 1 5 2 1 o(1) (Nt 6 q 8 + N 6 t 9 q 6 N  if m = q is prime. Furthermore, as previously observed in [2, Lemma 2], using a bound of Garaev [7] one can improve (1) for a prime m = q as follows:

− 1 1 5 2 1 o(1) max Sq(a; N) 6 Nt 4 q 8 + N 6 t 9 q 6 N . (2) gcd(a,q)=1  We remark that an even stronger bound which is valid for almost all primes q has been obtained by Garaev and Shparlinski [10]. In this paper, using bounds for single and bilinear exponential sums from [1] and exploiting an idea of Garaev [8] to handle double sums over a certain “hyperbolic” region, we give improvements of both (1) and (2). As for the multiplicative character sums defined above, in an earlier work [3] we have presented a bound on Tm(χ, a; N) in the case that m = q is prime, but our proof contains a gap (see [3, Theorem 12]; the condition that the intervals of summation in our double sums contain distinct elements modulo t does not necessary hold). In the present note, although we do not completely recover [3, Theorem 12], we derive a bound that is nontrivial over a range that is only slightly shorter (also in the case of prime m = q). We note that, using our results in the case g = 2 together with partial summation, one obtains nontrivial bounds on the sums

em(aMp) and χ(Mp) (3) p6N p6N p Xprime p Xprime

p with Mersenne numbers Mp =2 − 1, where p is prime. In particular, we see from (1) and (2) that the sums Sm(a; N) admit a nontrivial estimate if, for some fixed ε> 0, we have

t > m10/11+ε and N > t5/8m7/4+ε (4)

3 for general m, and we improve this to

t > q1/2+ε and N > t4/3q1+ε (5) for the case of prime m = q. By comparison, our new estimates for Sm(a; N) given herein are, for gen- eral m, stronger than those given previously, although they are nontrivial only under the same condition (4). For the case of prime m = q they are not only stronger but also extend the region (5) to

t > q1/2+ε and N > t1/2q5/4+ε. (6)

Our bound on Tq(χ, a; N) is also nontrivial under the same condition (6). Throughout the paper, the implied constants in the symbol ‘≪’ may depend on the parameter ε (when present) but are absolute otherwise (we recall that the notation A ≪ B is equivalent to the assertion that |A| 6 cB for some constant c > 0). As a consequence, all of our results below are uniform in all parameters other than ε. In particular, our bounds are uniform over all integers a coprime to the modulus m and over all integers g with the same multiplicative order t modulo m.

2 Preparation

2.1 Vaughan’s bound We need the following result of Vaughan [15], which is stated here in the form given in [4, Chapter 24].

Lemma 1. For any complex-valued function f(n) and any real numbers U,V > 1 with UV 6 N, we have

Λ(n)f(n) ≪ Σ1 + Σ2 + Σ3 + Σ4, 6 nXN

4 where

Σ1 = Λ(n)f(n) ,

n6U X

Σ2 = (log UV ) f(kℓ) ,

k6UV ℓ6N/k X X

Σ3 = (log N) max f (kℓ) , w>0 k6V w<ℓ6N/k X X

Σ4 = Λ(ℓ) (d) f(kℓ) . ! kℓ6N d | k k>V,X ℓ>U dX6V

2.2 Bounds on exponential sums As in [1] we need bounds on exponential sums with exponential functions over consecutive integers. The following statement is [1, Lemma 2.2]; it follows immediately from a result of Korobov [14, Theorem 10, Chapter 1] (see also the proof of [13, Lemma 2]). Lemma 2. Suppose that ϑ is coprime to m, and let T be the multiplicative order of ϑ modulo m. Then, for any H1

n −1 1 +ε em(aϑ ) ≪ (H2 − H1)T +1 m 2 .

H1

kℓ − 1 1 − 1 1 21 5 +ε αk βℓ em(ag ) ≪ AB Kt 2 + K 2 Lt 2 + L 2 t 32 m 16 , k6K ℓ6L X X   where A = max |αk| and B = max |βℓ|. (7) k6K ℓ6L

5 In the special case that m = q is a prime number, a stronger bound follows immediately from [1, Lemma 2.7], but one can do better using an improved version of that estimate due to Garaev and Karatsuba [9]. Lemma 4. Suppose that q ∤ g, and let t be the multiplicative order of g K modulo q. Let K, L be natural numbers. Then, for any two sequences (αk)k=1 L and (βℓ)ℓ=1 of complex numbers and any integer a not divisible by q, we have

kℓ − 1 1 − 1 3 1 1 +ε αk βℓ eq(ag ) ≪ AB Kt 2 + K 2 Lt 4 + L 4 t 2 q 8 , k6K ℓ6L X X   where A and B are defined by (7). Proof. In the case that K, L 6 t, an application of [9, Corollary 3] (with the choice k = 1) yields the bound

kℓ 1 3 1 1 +ε αk βℓ eq(ag ) ≪ ABK 2 L 4 t 2 q 8 . 6 6 kXK Xℓ L For arbitrary values of K and L, we split the double sums into at most (Kt−1 +1)(Lt−1 + 1) double sums with at most min{K, t} min{L, t} terms, deriving the bound

kℓ −1 −1 1 3 1 1 +ε αk βℓ eq(ag ) ≪ (Kt + 1)(Lt + 1) min{K, t} 2 min{L, t} 4 t 2 q 8 . 6 6 kXK Xℓ L Since 1 1 1 (Kt−1 + 1) min{K, t} 2 6 Kt− 2 + K 2 and 3 1 3 (Lt−1 + 1) min{L, t} 4 6 Lt− 4 + L 4 , the result follows. ⊓⊔ Next, we use an idea of Garaev [8] to derive a variant of Lemma 3 in which the summation limits over ℓ depend on the parameter k. Lemma 5. Let the notation be as in Lemma 3. For any two sequences K K (Lk)k=1 and (Mk)k=1 of nonnegative integers such that Mk < Lk 6 L for each k, we have

kℓ − 1 1 − 1 1 21 5 ε αk βℓ em(ag ) ≪ AB Kt 2 + K 2 Lt 2 + L 2 t 32 m 16 (mL) . k6K M <ℓ6L X kX k   6 Proof. For each inner sum we have

kℓ kℓ 1 βℓ em(ag )= βℓ em(ag ) eL(r(ℓ − s)) L 1 1 Mk<ℓ6Lk ℓ6L MK

βℓ,r = βℓ eL(rℓ), it follows that e kℓ 1 kℓ e αk βℓ em(ag )= αk,rβℓ,r em(ag ). 1 1 |r| +1 k6K Mk<ℓ6Lk 6 k6K ℓ6L X X − 2 L

Lemma 6. Let the notation be as in Lemma 4. For any two sequences K K (Lk)k=1 and (Mk)k=1 of nonnegative integers such that Mk < Lk 6 L for each k, we have

kℓ − 1 1 − 1 3 1 1 ε αk βℓ eq(ag ) ≪ AB Kt 2 + K 2 Lt 4 + L 4 t 2 q 8 (qL) . k6K M <ℓ6L X kX k   Our main technical tool is the following lemma, which is used to bound double exponential sums over a certain “hyperbolic” region of summation.

7 Lemma 7. Suppose that g is coprime to m, and let t be the multiplicative order of g modulo m. Let X,Y,Z be real numbers such that Z>Y >X > 2. Then, for any two sequences (αk)X

kℓ αk βℓ em(ag )

X

Proof. Let αk =0 if k 6 X or k>Y . Then,

kℓ αk βℓ em(ag ) 6 X

kℓ αk βℓ em(ag ) j j+1 e

Taking into account that  

1 j 1 1 j ejt− 2 + e 2 Ze−jt− 2 + Z 2 e− 2 log X6j6log Y X 1 1 1 1 1 1 ≪ Zt−1 log Y + Y 2 Z 2 t− 2 + X− 2 Zt− 2 + Z 2 log Y, and log Y 6 log Z ≪ Zε, we obtain the stated bound. ⊓⊔ For prime moduli m = q, Lemma 7 can be strengthened by using Lemma 6 instead of Lemma 5 in the proof; the details are omitted.

Lemma 8. Suppose that q ∤ g, and let t be the multiplicative order of g modulo q. Let X,Y,Z be real numbers such that Z>Y >X > 2. Then, for any two sequences (αk)X

8 K sequence (Mk)k=1 of nonnegative integers such that Mk < Z/k for each k, and any integer a not divisible by q, we have

kℓ αk βℓ eq(ag ) 6 6 X

2.3 Bounds on multiplicative character sums Here we collect analogues of bounds given in Section 2.2. Unfortunately, these are only available in the case that our nontrivial multiplicative character χ has a prime modulus q, and we assume throughout that χ is such a character. The following statement, an analogue of Lemma 2, follows immediately from results given in [5, 16]: Lemma 9. Suppose that q ∤ ϑ, and let T be the multiplicative order of ϑ modulo q. Then, for any H1 < H2 and any integer a not divisible by q, we have n −1 1 +ε χ(ϑ + a) ≪ (H2 − H1)T +1 q 2 .

H1

Lemma 10. Let Fq denote the algebraic closure of Fq, and let Fq(Z) be the field of rational functions over Fq. For any integers d, a and primes v1, v2, v3, v4 > 3 such that gcd(dav1v2v3v4, q)=1, the rational function

(Zdv1 + a)(Zdv2 + a) F (Z)= (Zdv3 + a)(Zdv4 + a)

δ cannot be expressed in the form H(Z) , where H ∈ Fq(Z) and δ > 1, unless each value in the sequence v1, v2, v3, v4 occurs an even number of times. Proof. We first observe that whenever gcd(u, v) = 1 the polynomials Zdu + a dv and Z + a have at most d common roots in Fq. Indeed, if r and s are

9 integers such that ur + vs = 1, then every common root ρ satisfies the equation ρd =(−a)r+s. Now, if some value in the sequence v1, v2, v3, v4 occurs an odd number of times, then one of the primes, say v1, is different from the others. By the dv1 dv2 argument above, Z +a has at most 3d

Lemma 11. Suppose that q ∤ g, and let t be the multiplicative order of g K modulo q. Let K, L be natural numbers. Then, for any two sequences (αk)k=1 L and (βℓ)ℓ=1 of complex numbers and any integer a not divisible by q, we have

kℓ − 1 1 − 1 3 1 1 +ε αk βℓ χ(g + a) ≪ AB Kt 2 + K 2 Lt 4 + L 4 t 2 q 8 , k6K ℓ6L X X   where A and B are defined by (7).

Proof. In the case that K, L 6 t, our argument is almost identical to that given in [9, Section 3] (with k = 1, and excluding the prime 3 from the set V considered there). However, instead of proving that the polynomial aZdv1 + dv2 dv3 dv4 aZ −aZ −aZ is not constant unless the sequence of primes v1, v2, v3, v4 satisfies {v1, v2} = {v3, v4}, in our setting we justify the application of the Weil bound for all other quadruples, by using Lemma 10. In this way, we obtain for K, L 6 t the bound

kℓ 1 3 1 1 +ε αk βℓ χ(g + a) ≪ ABK 2 L 4 t 2 q 8 . 6 6 kXK Xℓ L Now the argument in the proof of Lemma 4 gives the desired extension to arbitrary K and L. ⊓⊔ In turn, following the arguments of Section 2.2, we derive from Lemma 11 the following analogue of Lemma 8:

Lemma 12. Suppose that q ∤ g, and let t be the multiplicative order of g modulo q. Let X,Y,Z be real numbers such that Z>Y >X > 2. Then, for any two sequences (αk)X

10 K sequence (Mk)k=1 of nonnegative integers such that Mk < Z/k for each k, and any integer a not divisible by q, we have

kℓ αk βℓ χ(g + a)

X

3 Main Results

3.1 Exponential sums over primes Theorem 13. Suppose that g is coprime to m, and let t be the multiplicative order of g modulo m. Then, as N →∞ we have

n − 11 5 4 1 7 o(1) max Λ(n)em(ag ) 6 Nt 32 m 16 + N 5 t 8 m 20 N . gcd(a,m)=1 n6N X 

Proof. For convenience we put

n Sm = max Λ(n)em(ag ) . (8) gcd(a,m)=1 n6N X

The desired bound is trivial unless 10 5 7 t > m 11 and N > t 8 m 4 , (9) hence we assume that these inequalities hold in what follows. In particular, any estimates involving to(1) or mo(1) can be expressed as N o(1) with N →∞. Let U, V > 1 with UV 6 N and apply Lemma 1 with the function n f(n)= em(ag ). Estimating Σ1 trivially, we have

n Σ1 = Λ(n)em(ag ) 6 Λ(n) ≪ U. (10)

n6U n6U X X

To bound kℓ Σ2 = (log UV ) em(ag ) ,

k6UV ℓ6N/k X X

11 note that for any k 6 UV the number ϑ = gk is of multiplicative order T = t/ gcd(t, k) modulo m, hence an application of Lemma 2 yields the bound N gcd(t, k) 1 Σ 6 + UV m 2 N o(1). 2 t k 6 ! kXUV Moreover, gcd(t, k) d d = 6 k k k k6UV d | t k6UV d | t k6UV X X gcd(Xt,k)=d X Xd | k 1 1 = 6 τ(t) ≪ τ(t)log UV, w w 6 Xd | t w6XUV/d wXUV where τ is the function. Since UV 6 N and τ(t) = to(1) as t → ∞ (see, for example, [11, Theorem 315]), it follows that gcd(t, k) 6 N o(1). k 6 kXUV Consequently, −1 1 o(1) Σ2 6 (Nt + UV ) m 2 N . (11)

The method used to bound Σ2 can also be applied to Σ3, and one obtains that −1 1 o(1) Σ3 6 (Nt + V ) m 2 N . (12) Finally, let us write

kℓ Σ4 = αk βℓ em(ag )

V

−1 − 1 − 1 − 1 − 1 1 21 5 o(1) Σ4 6 Nt + U 2 Nt 2 + V 2 Nt 2 + N 2 t 32 m 16 N . (13)  12 We now choose 2 1 3 U = V = N 5 t 16 m− 40 to balance the terms that depend on U and V in (11) and (13). One sees that the bounds of (10), (11) and (12) are all dominated by our bound for Σ4 on the right side of (13); therefore, upon combining these bounds we obtain that − 11 5 4 1 7 1 21 5 o(1) Sm 6 Nt 32 m 16 + N 5 t 8 m 20 + N 2 t 32 m 16 N . To conclude the proof, it remains to observe that the inequal ity

4 1 7 1 21 5 N 5 t 8 m 20 > N 2 t 32 m 16 is equivalent to 85 1 N > t 48 m− 8 , which follows from the second inequality in (9) since t 6 m. ⊓⊔ We remark that the range of t in (9) for which the result is nontrivial is the same as that given by the earlier bound (1) but the new result begins to detect cancellation in the sum for smaller values of N. The same remark applies to the improvement over (2) in the prime modulus case, which we give now. Using partial summation we immediately derive from Theorem 13 the following bound for the exponential sums with Mersenne numbers in (3): for any odd m > 1, as N →∞ we have

− 11 5 4 1 7 o(1) max em(aMp) 6 Nt 32 m 16 + N 5 t 8 m 20 N , gcd(a,m)=1 p6N p Xprime  where t is the multiplicative order of 2 modulo m.

Theorem 14. Suppose that q ∤ g, and let t be the multiplicative order of g modulo q. Then,

n − 1 1 6 1 5 o(1) max Λ(n)eq(ag ) 6 Nt 4 q 8 + N 7 t 14 q 28 N . gcd(a,q)=1 n6N X 

13 Proof. Note that the desired bound is trivial unless

1 1 5 t > q 2 and N > t 2 q 4 . (14)

n Proceeding as in the proof of Theorem 13 with the function f(n)= eq(ag ), but using Lemma 8 instead of Lemma 7 to bound the sum Σ4, we have

Σ1 ≪ U, −1 1 o(1) Σ2 6 (Nt + UV ) q 2 N , −1 1 o(1) Σ3 6 (Nt + V ) q 2 N , − 3 − 1 − 1 − 1 − 1 − 1 3 1 1 o(1) Σ4 6 Nt 4 + U 4 Nt 2 + V 2 Nt 4 + V 4 N 4 t 2 q 8 N .

1 1 1 1 Since t > q 2 , we have Nt−1q 2 < Nt− 4 q 8 , and it follows that

− 1 1 1 − 1 1 − 1 1 1 − 1 3 1 1 o(1) Sq 6 Nt 4 q 8 + UV q 2 + U 4 Nq 8 + V 2 Nt 4 q 8 + V 4 N 4 t 2 q 8 N .   We balance only the three terms in the inner set of parenthese s and then show 1 3 1 1 that the resulting quantity dominates the final term V − 4 N 4 t 2 q 8 . Thus, we choose 4 2 3 2 5 3 U = N 7 t− 7 q− 14 and V = N 7 t 14 q− 28 .

Inserting these values of U, V into the above bound on Sq, we get

− 1 1 6 1 5 19 23 17 o(1) Sq 6 Nt 4 q 8 + N 7 t 14 q 28 + N 28 t 56 q 112 N .

To conclude the proof, it remains to observe that the inequal ity

6 1 5 19 23 17 N 7 t 14 q 28 > N 28 t 56 q 112 is equivalent to 19 3 N > t 10 q− 20 , which follows from the second inequality in (14) since t 6 q. ⊓⊔ Using partial summation we immediately derive from Theorem 14 the following bound for the exponential sums with Mersenne numbers in (3): for any prime q > 3, as N →∞ we have

− 1 1 6 1 5 o(1) max eq(aMp) 6 Nt 4 q 8 + N 7 t 14 q 28 N , gcd(a,q)=1 p6N p Xprime  where t is the multiplicative order of 2 modulo q.

14 3.2 Character sums over primes Using Lemma 12 instead of Lemma 8 in the proof of Theorem 14, we derive the following statement. Theorem 15. Suppose that g is coprime to q, and let t be the multiplicative order of g modulo q. Then, as N →∞ we have

1 1 6 1 5 n 6 − 4 8 7 14 28 o(1) max max∗ Λ(n)χ(g + a) Nt q + N t q N , gcd(a,q)=1 χ∈Xq n6N X  where ∗ is the set of all nonprincipal multiplicative characters modulo . Xq q As compared to the bound erroneously claimed in [3, Theorem 12], the bound of Theorem 15 is nontrivial for the same range of t, but only for N somewhat larger than before. Finally, as before, using partial summation we immediately derive from Theorem 15 the following bound for the exponential sums with Mersenne numbers in (3): for any prime q > 3, as N →∞ we have

1 1 6 1 5 6 − 4 8 7 14 28 o(1) max max∗ χ(Mp + a) Nt q + N t q N , gcd(a,q)=1 χ∈Xq p6N p Xprime  where t is the multiplicative order of 2 modulo q.

4 Remarks

Lemma 10 immediately extends to more general rational functions having products of ν > 1 similar binomial terms in the numerator and denominator. In turn, this more general statement can be used to establish full analogues of the results of [9] for bilinear sums with multiplicative characters (Lemma 11 is a special case of such a result with ν = 2). Our estimates clearly lead to various improvements and generalisations of the results of [2] (although specific details have yet to be worked out). Lemma 11 and its aforementioned generalisations also allow us to improve [3, Theorem 14]; however, using the approach of [6] one can derive even stronger estimates. For the interested reader, we leave open the problem of getting nontrivial bounds on the sums Tm(χ, a; N) for an arbitrary composite m.

15 5 Acknowledgements

During the preparation of this paper, J. F. was supported in part by NSERC Grant A5123 and I. S. by ARC Grant DP1092835.

References

[1] W. Banks, A. Conflitti, J. B. Friedlander and I. E. Shparlinski, ‘Ex- ponential sums over Mersenne numbers’, Compos. Math., 140 (2004), 15–30. [2] W. D. Banks, J. B. Friedlander, M. Z. Garaev and I. E. Shparlinski, ‘Character sums with exponential functions over smooth numbers’, Indag. Math., 17 (2006), 157–168. [3] W. D. Banks, J. B. Friedlander, M. Z. Garaev and I. E. Shparlinski, ‘Double character sums over elliptic curves and finite fields’, Pure and Appl. Math. Quart., 2 (2006), 179–197. [4] H. Davenport, Multiplicative , 2nd ed., Springer-Verlag, New York 1980. [5] E. Dobrowolski and K. S Williams, ‘An upper bound for the sum a+H n=a+1 f(n) for a certain class of functions f’, Proc. Amer. Math. Soc., 114 (1992), 29–35. P [6] E. El Mahassni and I. E. Shparlinski, ‘On the distribution of the elliptic curve power generator’, Proc. 8th Conf. on Finite Fields and Appl., Contemp. Math., vol. 461, Amer. Math. Soc., Providence, RI, 2008, 111–119. [7] M. Z. Garaev, ‘Double exponential sums related to Diffie–Hellman distributions’, Int. Math. Res. Notices, 17 (2005), 1005–1014. [8] M. Z. Garaev, ‘An estimate of Kloosterman sums with prime num- bers and an application’, Matem. Zametki, 88 (2010), 365–373 (in Russian). [9] M. Z. Garaev and A. A. Karatsuba, ‘New estimates of double trigono- metric sums with exponential functions’, Arch. Math., 87 (2006), 33– 40.

16 [10] M. Z. Garaev and I. E. Shparlinski, ‘The large sieve inequality with exponential functions and the distribution of Mersenne numbers mod- ulo primes’, Intern. Math. Research Notices, 39 (2005), 2391–2408.

[11] G. H. Hardy and E. M. Wright, An introduction to the theory of numbers, Oxford Univ. Press, Oxford, 1979.

[12] H. Iwaniec and E. Kowalski, Analytic number theory, Amer. Math. Soc., Providence, RI, 2004.

[13] N. M. Korobov, ‘On the distribution of digits in periodic fractions’, Matem. Sbornik, 89 (1972), 654–670 (in Russian), English translation in Math. USSR–Sb., 18 (1972), 659–676.

[14] N. M. Korobov, Exponential sums and their applications, Kluwer Acad. Publ., Dordrecht, 1992.

[15] R. C. Vaughan, ‘An elementary method in prime number theory’, Acta Arith., 37 (1980), 111–115.

[16] H. B. Yu, ‘Estimates of character sums with exponential function’, Acta Arith., 97 (2001), 211–218.

17