PORTUGALIAE MATHEMATICA Vol 59 Fasc 00 Nova Série ON THE SET a x + b g x (mod ) Cristian Cobeli, Marian Vâjâitu and Alexandru Zaharescu Abstract: Given nonzero integers a, b we rove an asymtotic result for the distribution function of the set a x + b g x (mod ), as goes to infinity and g is a rimitive root mod Introduction Various asects of the distribution of owers of a rimitive root g modulo a large rime number have been investigated by a number of authors (see for examle [], [3], [4], [6], [7], [8]) In this aer we fix nonzero integers a, b and study the distribution function of the set a x + b g x (mod ), as goes to infinity and g is a rimitive root mod In articular we are interested in the distance between x and g x as x runs over the set,,, Throughout this aer g x means the least ositive residue of g x mod We also consider a short interval version of the roblem, more recisely we fix two intervals I, J and work only with those integers x I for which g x (mod ) belongs to J In the following we let I = 0,,, M, J = 0,,, N with M, N ositive integers and denote M = x I : g x J, a x + b g x < t The distribution function is given by D(t) = D(a, b,, g, I, J, t) = #M Relacing if necessary a, b and t by a, b and t resectively, we may assume in the following that b > 0 We now introduce a function G(t, a, b, M, N) which will aear in the estimation of D(t) Received: November 5, 000; Revised: Aril 7, 00 AMS Subject Classification: A07
96 C COBELI, M VÂJÂITU and A ZAHARESCU If a > 0 we set G(t, a, b, M, N) = 0, if t < 0, t, if 0 t < U, U U(t U) +, if U t < V, a b (a M + b N t) MN, if V t < am + bn, MN, if am + bn t, where U = minam, bn and V = maxam, bn If a < 0 then we let 0, if t < am, (t a M), if am t W, ) (W am) t W (W am) G(t, a, b, M, N)= (MN +, if W < t < Z, a b Z W (t b N) MN +, if Z t < bn, MN, if bn t, where W = min0, bn + am and Z = max0, bn + am following We will rove the Theorem For any a, b,, g, I, J, t as above one has D(a, b,, g, I, J, t) = G(t, a, b, M, N) + O a,b ( / log 3 ) It is well established that the discrete exonential ma x g x mod is a random ma, and this is used by random number generators which use the linear congruential method [] There are various ways to check this randomness For instance, if we count those x,,, for which g x < x, resectively those x for which g x > x there should be no bias towards any one of these inequalities, in other words one would exect that about half of the x s are larger than g x and half of the x s are smaller than g x We can actually rove this statement by using Theorem
ON THE SET a x + b g x (mod ) 97 Corollary One has 0 # x : x > g x 7 / ( + log ) 3 As another alication of Theorem we have the following asymtotic result for all even moments of the distance between x and g x Corollary Let k be a ositive integer Then we have M(, g, k) := (g x x) k = x=0 k+ (k + ) ( k + ) + O k( k+/ log 3 ) In articular, for k = one has M(, g, ) = 3 6 + O(5/ log 3 ) This says that in quadratic average g x x is 6 Setting the roblem We will need a bound for the exonential sum S(m, n, g, ) = z=0 e (m z + n g z ), where m, n are integers and e (t) = e πit This roblem was handled by Mordell [5] Lemma (Mordell) Let be a rime, g a rimitive root mod and m, n integers, not both multiles of Then S(m, n, g, ) < / ( + log ) The next lemma allows us to comute quite general sums involving x and g x
98 C COBELI, M VÂJÂITU and A ZAHARESCU Lemma Let U, V be subsets of 0,,,, let f be a comlex valued function defined on U V and consider the transform ˇf(m, n) = (x,y) U V f(x, y) e (m x + n y) Then (x,y) U V y g x (mod ) f(x, y) = m=0 n=0 ˇf(m, n) S( m, n, g, ) Proof: Using the definition, the right hand side can be written as m=0 n=0 ˇf(m, n) S( m, n, g, ) = = m=0 n=0 (x,y) U V = (x,y) U V f(x, y) f(x, y) e (mx + ny) z=0 m=0 e (m(x z)) z=0 n=0 e ( m z n g z ) e (n(y g z )) Here the sum over n is zero unless y g z (mod ) when it equals Similarly, since 0 < x, z the sum over m is zero unless x = z when it equals Thus the sum over z is zero if y g x (mod ) and it equals if y g x (mod ), which roves the statement of the lemma We will aly Lemma with U = I, V = J and () f(x, y) = f(t, x, y, a, b) =, if a x + b y < t, 0, if a x + b y t Then the distribution function is given by () D(t) = (x,y) I J y g x (mod ) f(x, y) and this is a sum as in Lemma The coefficients ˇf(m, n) can be estimated accurately, as we will see in the next section
ON THE SET a x + b g x (mod ) 99 3 Proof of Theorem In what follows we assume that 0 m, n We find an uer bound for ˇf(m, n) = ˇf(t, m, n, a, b) which is indeendent of t and then calculate exlicitly ˇf(0, 0), which gives the main term of D(t) There are four cases I m = 0, n 0 We have ˇf(t, 0, n, a, b) = (x,y) I J f(x, y) e (n y) By the definition of f(x, y) it follows that for each x I we have a sum of e (ny) with y running in a subinterval of J, that is a sum of a geometric rogression with ratio e (n) The absolute value of such a sum is and consequently e (n) (3) ˇf(t, 0, n, a, b) I e (n) = M sin n π M, n where denotes the distance to the nearest integer II m 0, n = 0 Similarly, as in case I, we have (4) ˇf(t, m, 0, a, b) N m III m 0, n 0 We need the following lemma Lemma 3 Let h, k 0 (mod ), L, T and u 0 be integers Let S = Lx=0 ux+t y=0 e (hx) e (ky) Then one has S min L, 4 k h+u k + 4 k h The roof is left to the reader We now return to the estimation of ˇf(m, n) Writing ˇf(m, n) = e (m x + n y) (x,y) I J ax+by < t
00 C COBELI, M VÂJÂITU and A ZAHARESCU as a sum of b sums according to the residue of x modulo b, one arrives at sums as in Lemma 3, with h = m b, k = n, u = a It follows that ˇf(t, m, n, a, b) a,b min M, m b a n + (5) mb n IV m, n = 0 By definition, we have ˇf(t, 0, 0, a, b) = (x,y) I J f(t, x, y, a, b) Let D be the set of real oints from the rectangle [0, M) [0, N) which lie below the line a x + b y = t Then ˇf(t, 0, 0, a, b) equals the number of integer oints from D Therefore ˇf(t, 0, 0, a, b) = Area(D) + O(length( D)) An easy comutation shows that Area(D) equals the exression G(t, a, b, M, N) defined in the Introduction, while the length of the boundary D is M + N 4 Hence ˇf(t, 0, 0, a, b) = G(t, a, b, M, N) + O() where and By () and Lemma we know that D(t) ˇf(0, 0) S(0, 0, g, ) D + D + D 3, D = One has m= ˇf(m, 0) S(m, 0, g, ), D = D 3 = m= n= ˇf(0, 0) S(0, 0, g, ) = ˇf(0, 0) n= ˇf(m, n) S(m, n, g, ) = G(t, a, b, M, N) n ˇf(0, n) S(0, n, g, ) + O() Next, since S(m, 0, g, ) = x=0 e (mx) = 0 for m, it follows that D = 0 By (3) and Lemma we have D M n= n / ( + log ) = M 3/ ( + log ) / ( + log ) n= n
ON THE SET a x + b g x (mod ) 0 In order to estimate D 3 we first use Lemma and (5) to obtain (6) D 3 a,b log 3/ m= n= n min M, mb an + log 3/ m= n= n m b The first double sum in (6) is m= n= n min M, m b a n n= n= n + m= mb an 0 (mod ) n + n= n m = m n= n m= m b a n mb an 0 (mod ) ( + log ) + 4 ( + log ), while the second double sum is m= n= n mb = 4 m= m n= n 4 ( + log ) Hence D 3 a,b / log 3 Putting all these together, Theorem follows 4 Proof of the Corollaries For the roof of the first Corollary, let us notice that # 0 x : x > g x = D(a=, b=,, g, I, J, t = 0) with I = J = 0,,, Here M = N =, W = Z = 0 and so Thus (a M t) G(t=0, a=, b=, M=, N=) = # 0 x : x > g x = + O( log 3 ) = One obtains the more recise uer bound 7 log 3 for the error term by following the roof of Theorem in this articular case
0 C COBELI, M VÂJÂITU and A ZAHARESCU To rove Corollary note that M(, g, k) = (g x x) k x=0 = t k # 0 x, y : y g x (mod ), y x = t <t< This equals t k( ) D(t + ) D(t) = D() ( ) k + <t< <t< D(t) ((t ) k t k) where D(t) = D(a=, b=,, g, I, J, t) with I = J = 0,,, From Theorem it follows that M(, g, k) = k G(,,,, ) + G(t,,,, ) ((t ) k t k) <t< ) ( + O k ( k+ log 3 + O / log 3 (t ) k t k ) <t< Since (t ) k t k = k t k + O k ( k ) and 0 G(t,,,, ) derive M(, g, k) = k G(,,,, ) k ) t k G(t,,,, ) + O k ( k+ log 3 <t< From the definition of G we see that 0, if t <, ( + t), if t 0, G(t,,,, ) = ( t), if 0 < t <,, if t we Using the fact that for any ositive integer r one has <t< tr = r+ r+ +O r( r ) if r is even and <t< tr = 0 if r is odd, the statement of Corollary follows after a straightforward comutation ACKNOWLEDGEMENTS We acknowledge the valuable discussions with SM Gonek on the subject
ON THE SET a x + b g x (mod ) 03 REFERENCES [] Knuth, D The Art of Comuter Programming, nd edition, Addison Wesley, Reading, Mass, 973 [] Konyagin, S and Sharlinski, I Character Sums With Exonential Functions and Their Alications, Cambridge Tracts in Mathematics, 36, Cambridge University Press, Cambridge, 999 [3] Korobov, NM On the distribution of digits in eriodic fractions, Math USSR Sbornik, 8(4) (97), 654 670 [4] Montgomery, HL Distribution of small owers of a rimitive root, in Advances in Number Theory (Kingston, ON, 99), Oxford Sci Publ, Oxford Univ Press, New York, 993, 37 49 Amer Math Soc, () (99), 53 53 [5] Mordell, LJ On the exonential sum X x= ex( πi (a x + b g x )/ ), Mathematika, 9 (97), 84 87 [6] Niederreiter, H Quasi-Monte Carlo methods and seudo-random numbers, Bull Amer Math Soc, 84 (978), 957 04 [7] Rudnick, Z and Zaharescu, A The distribution of sacings between small owers of a rimitive root, Israel J Math, 0(A) (000), 7 87 [8] Sharlinski, IE Comutational Problems in Finite Fields, Kluwer Acad Publ North Holland, 99 Cristian Cobeli, Marian Vâjâitu and Alexandru Zaharescu, Institute of Mathematics of the Romanian Academy, PO Box -764, 70 700 Bucharest ROMANIA E-mail: ccobeli@stoilowimarro mvajaitu@stoilowimarro