Products of Factorials Modulo p

Similar documents
Cullen Numbers in Binary Recurrent Sequences

Partial Sums of Powers of Prime Factors

THE EULER FUNCTION OF FIBONACCI AND LUCAS NUMBERS AND FACTORIALS

Results and conjectures related to a conjecture of Erdős concerning primitive sequences

Two Diophantine Approaches to the Irreducibility of Certain Trinomials

Resolving Grosswald s conjecture on GRH

THE DIOPHANTINE EQUATION P (x) = n! AND A RESULT OF M. OVERHOLT. Florian Luca Mathematical Institute, UNAM, Mexico

THE EULER FUNCTION OF FIBONACCI AND LUCAS NUMBERS AND FACTORIALS

Solving a linear equation in a set of integers II

Acta Academiae Paedagogicae Agriensis, Sectio Mathematicae 31 (2004) 19 24

ABSTRACT. In this note, we find all the solutions of the Diophantine equation x k = y n, 1, y 1, k N, n INTRODUCTION

Fibonacci numbers of the form p a ± p b

On strings of consecutive economical numbers of arbitrary length

Notes on Systems of Linear Congruences

Arithmetic properties of the Ramanujan function

INTEGERS DIVISIBLE BY THE SUM OF THEIR PRIME FACTORS

Florian Luca Instituto de Matemáticas, Universidad Nacional Autonoma de México, C.P , Morelia, Michoacán, México

Members of binary recurrences on lines of the Pascal triangle

FIBONACCI DIOPHANTINE TRIPLES. Florian Luca and László Szalay Universidad Nacional Autonoma de México, Mexico and University of West Hungary, Hungary

When do Fibonacci invertible classes modulo M form a subgroup?

ON A PROBLEM OF PILLAI AND ITS GENERALIZATIONS

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

Subset sums modulo a prime

PELL NUMBERS WHOSE EULER FUNCTION IS A PELL NUMBER. Bernadette Faye and Florian Luca

EGYPTIAN FRACTIONS WITH EACH DENOMINATOR HAVING THREE DISTINCT PRIME DIVISORS

Equidivisible consecutive integers

EXTENDING A THEOREM OF PILLAI TO QUADRATIC SEQUENCES

MULTIPLICATIVE SEMIGROUPS RELATED TO THE 3x +1 PROBLEM. 1. Introduction The 3x +1iteration is given by the function on the integers for x even 3x+1

Fibonacci Diophantine Triples

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

Density of non-residues in Burgess-type intervals and applications

#A69 INTEGERS 13 (2013) OPTIMAL PRIMITIVE SETS WITH RESTRICTED PRIMES

Squares in products with terms in an arithmetic progression

Some zero-sum constants with weights

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Congruences involving product of intervals and sets with small multiplicative doubling modulo a prime

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

PRACTICE PROBLEMS: SET 1

ON INTEGERS EXPRESSIBLE BY SOME SPECIAL LINEAR FORM. 1. Introduction

#A2 INTEGERS 12A (2012): John Selfridge Memorial Issue ON A CONJECTURE REGARDING BALANCING WITH POWERS OF FIBONACCI NUMBERS

Standard forms for writing numbers

Fermat numbers and integers of the form a k + a l + p α

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

On the spacings between C-nomial coefficients

When do the Fibonacci invertible classes modulo M form a subgroup?

On the mean connected induced subgraph order of cographs

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

On the Fractional Parts of a n /n

Modular Arithmetic Instructor: Marizza Bailey Name:

Prime Divisors of Palindromes

0 Sets and Induction. Sets

Houston Journal of Mathematics c 2050 University of Houston Volume 76, No. 1, Communicated by George Washington

PRIME NUMBERS YANKI LEKILI

Another Proof of Nathanson s Theorems

INFINITE FAMILIES OF STRANGE PARTITION CONGRUENCES FOR BROKEN 2-DIAMONDS

ON THE LEAST PRIMITIVE ROOT MODULO p 2

SQUARE PATTERNS AND INFINITUDE OF PRIMES

Dense Admissible Sets

A Remark on Prime Divisors of Lengths of Sides of Heron Triangles

O N P O S I T I V E N U M B E R S n F O R W H I C H Q(n) D I V I D E S F n

On Carmichael numbers in arithmetic progressions

Fall 2017 Test II review problems

ON UNIVERSAL SUMS OF POLYGONAL NUMBERS

arxiv: v1 [math.co] 21 Sep 2015

Prime divisors of binary holonomic sequences

On prime factors of subset sums

ON THE SET a x + b g x (mod p) 1 Introduction

Flat primes and thin primes

RANK AND PERIOD OF PRIMES IN THE FIBONACCI SEQUENCE. A TRICHOTOMY

On a problem of Nicol and Zhang

Exponential and character sums with Mersenne numbers

CALCULATING EXACT CYCLE LENGTHS IN THE GENERALIZED FIBONACCI SEQUENCE MODULO p

Contribution of Problems

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Irreducible radical extensions and Euler-function chains

In N we can do addition, but in order to do subtraction we need to extend N to the integers

8 Primes and Modular Arithmetic

Maximal Class Numbers of CM Number Fields

ON DIRICHLET S CONJECTURE ON RELATIVE CLASS NUMBER ONE

Marcos J. González Departamento de Matemáticas Puras y Aplicadas, Universidad Simón Bolívar, Sartenejas, Caracas, Venezuela

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

ON CARMICHAEL NUMBERS IN ARITHMETIC PROGRESSIONS

ASSIGNMENT 1 SOLUTIONS

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Aliquot sums of Fibonacci numbers

CONGRUENCES RELATED TO THE RAMANUJAN/WATSON MOCK THETA FUNCTIONS ω(q) AND ν(q)

Diophantine triples in a Lucas-Lehmer sequence

ON A TWO-DIMENSIONAL SEARCH PROBLEM. Emil Kolev, Ivan Landgev

BURGESS INEQUALITY IN F p 2. Mei-Chu Chang

Covering Subsets of the Integers and a Result on Digits of Fibonacci Numbers

An Algebraic Interpretation of the Multiplicity Sequence of an Algebraic Branch

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Mathematical Induction Again

Almost fifth powers in arithmetic progression

Katarzyna Mieczkowska

GAPS IN BINARY EXPANSIONS OF SOME ARITHMETIC FUNCTIONS, AND THE IRRATIONALITY OF THE EULER CONSTANT

Transcription:

Products of Factorials Modulo p Florian Luca and Pantelimon Stănică IMATE, UNAM, Ap. Postal 6-3 Xangari, CP. 58 089 Morelia, Michoacán, Mexico; e-mail: fluca@matmor.unam.mx Auburn University Montgomery, Department of Mathematics, Montgomery, AL 364-403, USA; e-mail: stanica@sciences.aum.edu January, 003 Introduction Let p be a fixed odd prime and let s and t be fixed positive integers which depend on p. Consider the following subset of the elements of Z p P s,t p = {x! x! x t! mod p x i for i =,,..., t, and t x i = s}. i= The problem that we investigate in this note is the following: given p, find sufficient conditions that the parameters s and t should satisfy such as to ensure that P s,t p contains the entire Z p. Let ε > 0 be any small number. Throughout this paper, we denote by c, c,... computable positive constants which are either absolute or depend on ε. From the way we formulated the above problem, we see that its answer is easily decidable if either both s and t are very small with respect to p or very large with respect to p. For example, if s < c logp with some suitable constant c, then it is clear that P s,t p, or even the union of all P s,t p for all allowable values of t, cannot possibly contain the entire Z p when p is large. Indeed, the reason here is that the cardinality of the union of all P s,t p for all allowable values of t is at most ps = Oexpc s and this is much smaller than p when p is large if c is chosen such that c > c. Here, we denoted by ps the number of unrestricted partitions of s, and the constant c can be chosen to be equal to π 3. It is also obvious that P s,t p does not generate the entire Z p for any s when t =. Moreover, the fact that there exist infinitely many prime numbers p for which the smallest nonquadratic residue modulo p is at least c 3 logp, shows that if one wants to generate Also Associated to the Institute of Mathematics of Romanian Academy, Bucharest, Romania

the entire Z p out of P s,t p, then one should allow in partitions of s where maxx i t i= is at least c 3 logp. In particular, s and t cannot be too close to each other. Indeed, if p is such a prime and the maximum value of the x i s allowed in is at most c 3 logp, then all the numbers in P s,t p will be quadratic residues modulo p, and in particular P s,t p cannot contain the entire Z p. On the other hand, when s is very large, for example when s > p 5/4+ε, then an immediate argument based on the known upper bounds for the size of the smallest primitive root modulo p shows that the union of P s,t p over all the allowable values of the parameter t does cover the entire Z p when p is large. Thus, the question becomes interesting when we search for small values of both s and t for which P s,t p does cover the entire Z p. This question was inspired by the paper of the second author [9]. In that paper, the problem investigated was the exponent at which a prime number p divides some generalized Catalan numbers. However, the question of whether a certain subset of Catalan numbers, namely the numbers of the form p p m, m,..., m t covers the entire Z p was not investigated in [9]. Here, the numbers appearing in are all the nontrivial multinomial coefficients. In our notation, this question reduces to whether or not P p,t p 3 t is the entire Z p. Allowing also t = in 3 we obtain that even 0 Z p belongs to this set, and s = p is the smallest value of s for which this can happen. As a byproduct of our results, we show that the set 3 is indeed the entire Z p, for p 5. Our main results are the following: Theorem. Let ε > 0 be arbitrary. There exists a computable positive constant p 0 ε such that whenever p > p 0 ε, then P s,t p = Z p for all t and s such that t > p ε and s t > p /+ε. The above result is certainly very far from best possible. We believe that the exponent / appearing at the power of p in the lower bound for s t can be replaced by a much smaller one, or even maybe that the statement of Theorem above remains true when s t > p ε. We have not been able to find an argument to prove such a claim. Theorem. The set 3 is the entire Z p, if p 5 is prime. The trick in proving Theorem is to detect a small value of p 0 such that Theorem holds for p > p 0, and then to test the claim for all prime numbers p from up to p 0. Theorem above shows, in particular, that the set 3 even a very small subset of it is the entire Z p when p is large. As an example for Theorem, we can easily prove that if

is a primitive root modulo p, then A B, where { p A = u! u p } { p 3 B = v! 0 v p 3 } cover the entire Z p. We see first that A and B each contain p distinct residues modulo p. The intersection A B is empty, when is a primitive root modulo p. We omit the details. What is interesting is that, in general, we can cover easily all the even residues, and the odd residues from the first half of Z p, since p k mod p p, k, p k p k mod p, p,, k, p k for any k p. Related to our work, we recall that the behavior of the sequence n! mod p was recently investigated in []. The Proofs of the Theorems The main idea behind the proofs of both Theorems and is to find a suitable list x, x,..., x t consisting of many small numbers and each one of them repeated a suitable number of times, such that we can modify in a sense that will be made precise below the fixed element given by formula for this list of elements x, x,..., x t in enough ways such that, of course, these modified numbers do not get outside P s,t p so that to ensure that in the end, we have obtained all the congruence classes in Z p. Here is the basic operation by which we can modify a fixed element, call it F := t x i! in such a way as to obtain, hopefully, new elements in P s,t p. i= M Assume that i < i < < i j and l < l < < l j are two disjoints subsets of indices in {,,..., t}. Then, j j x ls + x is F = x! x l +! x i! x t! = F P s,t p. 4 s= s= In general, we shall always apply formula 4 with x l = = x lj =. With this convention, we may eliminate the initial number F, take inverses in 4 above, and then reformulate the question as follows: 3

Question: Is it true that for suitable integers t and s satisfying, for example, the hypothesis of Theorem we can find some positive integers x, x,..., x t summing to s, such that every nonzero residue class modulo p can be represented by a number of the form j r= xir 5 where a subset of indices {i, i,..., i j } of {,,..., t} in 5 can be any subset as long as there exists another subset of j indices {l, l,..., l j } disjoint from {i, i,..., i j } for which x lr = for all r =,,..., j? The Proof of Theorem. All we have to show is that if the parameters s and t satisfy the hypothesis of Theorem, then we can construct a list of elements x, x,..., x t for which the answer to the above question is affirmative. Fix ε > 0 and a positive integer k with k < ε < k. From now on, all positive constants c, c,..., which will appear will be computable and will depend only on k. We shall show that if p is large enough with respect to k, then we can construct a good sublist of numbers x, x,..., x t in the following manner: We first take and repeat exactly two times each of the prime numbers x i up to p /k. We then adjoin some even numbers x j, each one of them smaller than p /+/k but such that the totality of those counted with multiplicities does not exceed c loglogp. 3 The numbers of the form 5, where the x i s are from the lists and and the maximum length j of a product in 5 is not more than k + c loglogp cover the entire Z p. It is clear that if we can prove the existence of a list satisfying 3 above, then we are done. Indeed, we may first adjoin at the sublist consisting of the numbers appearing at and above a number of about k + c loglogp values of x i all of them equal to. The totality of all these numbers the ones from, and these new values of x i all equal to counted with their multiplicities, so far, is certainly not more than while their sum is at most c p /k logp + k + 4c loglogp < p ε < t, 6 c 3 p /k logp + k + c loglogp + c loglogpp /+/k < p /+ε < s t, 7 for large p. At this step, we may finally complete the above list with several other values of the x i equal to until we get a list with precisely t numbers, which is possible by inequality 6 above, and set the last number of the list to be equal to t x t := s x i, which is still positive by inequality 7 above. i= 4

To show the existence of a sublist with properties 3 above, we start with the set A := {n n < p /k and n is prime}. The numbers from A will form the sublist mentioned at above but, so far, we take each one of them exactly once. Let { n B := n nk } n i A, n i n j for i j k. We first notice that each value of n A appears at most k times in an arbitrary product in B. We now show that b := #B is large. Indeed, the set B will certainly contain all the numbers of the form p p pk = k p p p k, 8 where p i is an arbitrary prime subject to the condition p i p /k i, p /k i for i =,,..., k. 9 Moreover, notice that the residue classes modulo p of the elements of the form 8, where the primes p i satisfy conditions 9, are all distinct. Indeed, the point is that if two of the numbers of the form 8 coincide modulo p, then, after cancelling the factor of k, we get two residue classes of integers which coincide modulo p. Now each one of these two integers is smaller than p, therefore if they coincide modulo p, then they must be, in fact, equal. Now the fact that they are all distinct follows from the fact that their prime divisors p i satisfy condition 9. Applying the Prime Number Theorem to estimate from below the number of primes in each one of the intervals appearing in formula 9, we get p b > c 4 logp k > p, 0 logp k+ whenever p > c 5. We construct recursively a finite increasing sequence of subsets B m for m in the following way: Assume that B m has been constructed and set b m := #B m. Assume that b m < p that is, B m is not the entire Z p already. We then have the following trichotomy: i If b m p/, we then set B m+ := B m B m, and notice that B m+ = Z p and we can no longer continue. ii If b m < p/ and there exists an even number a < p /+/k such that a/ B m B m, we then set a m := a, add a to the list of the x i s as one of the numbers from sublist above, and we let B m+ := B m a m B m. Notice that b m+ b m. iii If b m < p/ and all even numbers a up to p /+/k have the property that a/ is already in B m B m, we choose the even number a smaller than p /+/k for which the number of 5

representations of a/ of the form x y with x, y B m is minimal. We then set a m := a, add a to the list of the x i s as one of the numbers from sublist above, set B m+ := B m a m B m, and notice that b m+ 4b m 3. In i iii above we have used the set-theoretic notation, namely that if U and V are two subsets of Z p, we have denoted by U V the set of all elements of Z p of the form u v with u U and v V, and by U the set of all elements of the form u for u U. We have to justify that i iii above do indeed hold. Notice that i and ii are obvious. The only detail we have to justify is that inequality indeed holds in situation iii. For this, we use the following result due to Sárkőzy see [7]: Lemma. Let p be a prime number, u, v, S, T be integers with u, v p, T p, furthermore C, C,..., C u and D, D,..., D v are integers with and C i C j mod p, for i < j u, D i D j mod p, for i < j v. For any integer n, let fn denote the number of solutions of Then, C x D y n mod p, x u, y v. S+T n=s+ fn uvt p < puv / logp. 3 We apply Lemma above with u = v = b m, C, C,..., C u all the residue classes in B m and D, D,..., D u all the residue classes in Bm. We also set S = 0 and T to be the largest integer smaller than p /+/k /. Clearly, T > p /+/k /3. Since we are discussing situation iii above, we certainly have fn for all positive integers n up to T. Let M := minfn n T, and then a m := c, where fc = M. Denote b m by b. We apply inequality 3 to get M < b p + b p logp. 4 T We first show that the inequality b p logp T < b 3p holds. Indeed, since T > p /+/k /3 and b = b m b > it follows that in order for 5 to hold, it suffices that 54logp k+ < p /k, 6 5 p by inequality 0, logp k+

which is certainly satisfied when p > c 6. Thus, inequalities 4 and 5 show that M < 4b 3p < b 3, 6 where the last inequality in 6 follows because b < p/. In particular, b m+ = #B m c B m b m + b m M b b 3 = 4b 3, 7 which proves inequality. The combination of 0, and shows that 4 mb 4 m p b m+ > > 3 3 logp k+ 8 holds as long as b m < p/. Now notice that the inequality 4 3 m > logp k+ will happen provided that m > c 7 loglogp, where one can take c 7 := k + log4/3, for example, and for such large m inequality 8 shows that b m+ > p/. In particular, situations ii or iii above will not occur for more than c 7 loglogp steps after which we arrive at a point where we apply situation i to construct B m+ and we are done. Clearly, i iii and the above arguments prove the existence of a sublist of the x i s satisfying conditions 3, which finishes the proof of Theorem. The Proof of Theorem. We follow the method outlined in the proof of Theorem. Thus, it suffices to find a list of positive integers, say A := {x, x,..., x s }, with U := s x i < p, i= and such that for every m Z p there exists a subset I {,,..., s} for which m i I x i! mod p. It is clear that once we show the existence of such a list A so that every nonzero residue class m modulo p has a representation as shown above, we can then formally multiply the number appearing in the right hand side of the above congruence by an appropriate number of! so that to insure that the sum of the positive integers x i for i I and the s, the product of whose factorials is still m modulo p, is precisely p. Step. We start with a set A of distinct positive integers such that U := x A x 7

is not too large, and set B := { n n n < n in A } mod p. For m, we construct inductively the sets A m and B m by the method explained in the proof of Theorem. We set b m := #B m, s m := b m /p, and we choose the parameter T to be of the form T := λ p log p +, where λ > is some parameter, for which we shall specify later an optimal value, and x is the largest integer which is less than or equal to x. From the way the sets A m and B m are constructed for m, it follows that as long as s m < /, A m+ is obtained from A m by adjoining to it just one element a m of size no larger than T, and then B m+ is taken to be B m a m B m mod p. Thus, U m+ := x T + x = T + U m, for m, x A m+ x A m and therefore U m+ mt + U, 9 and the above inequality 9 holds for all m as long as s m < /. However, by inequality 4 and our choice for T, it follows that when constructing A m+ out of A m, we choose the parameter M in such a way that M < b m p + b m p log p < b m s m +, T λ therefore inequality 7 now shows that Hence, b m+ b m M > b m s m. λ s m+ > β s m s m, 0 where β := βλ := λ = λ. λ Of course, the above construction will be repeated only as long as s m < /. If we denote by n the largest positive integer such that s n < /, then s n+ /, therefore the last set B n+, which is the entire Z p, is taken to be B n+ B n+ mod p, i.e., A n+ is taken to be the list of elements A n+, but now each one of them is repeated twice. Thus, U n+ U n+ nt + U. From these arguments, it follows that in order to insure that U n+ is not larger than p, it suffices to check that nt + U < p. 8

The number U can be easily computed in terms of A, therefore all we need in order to check that inequality holds, is a good upper bound on n in terms of A. We recall that n is the largest positive integer with s n < /, where the sequence s m m has initial term s := b /p and satisfies the recurrence 0. Step. We give an upper bound on n. Since λ >, it follows that β > 3/, therefore inequality 0 shows that s m+ > s m as long as s m < /. By 0, we also have s k+ > βs k s k, for k =,,..., n, β therefore s n+ > β n s n k= Since s k < / for k =,,..., n, it follows that The inequality holds for all x in the interval value of µ is precisely µ := 0, log x x s k β < β = s k β λ λ.. x > e µx λ with some value µ := µλ, and the best λ x:= β = λ λ 4λ log 3λ. 3 The fact that the best value of µ for which inequality holds with all x in the interval 0, is indeed the one given by formula 3 follows from the fact that the function β log x ] x is decreasing in the interval 0,. Thus, x β log s n+ > n log β + log s + n log s k > n log β + log s µ β β k= n s k. 4 We now find an upper bound on the sum appearing in the right hand side of inequality 4. Notice that since λ > /, it follows that whenever s m < /, one also has where the best ρ := ρλ is given by s m+ > β s m s m > + ρs m, β = + ρ, k= or, equivalently, ρ := β 3 = λ = λ λ, 9

and In particular, + ρ = 3λ λ. s n < + ρ s n holds, and if k is any positive integer less than n, then holds. Thus, k= The above calculations show that where k 0 s n k < ksn + ρ n k ρ + s k < s n < = 3λ + ρ ρ λ. log s n+ > n log β + log s µ γ := γλ := µ Thus, if we choose n such that 3λ λ λ λ = n log β + log s γ, 3λ λ 3λ 4λ = λ λ λ log. 3λ n log β + log s γ log/, 5 then we are sure that s n+ > /. Inequality 5 is equivalent to hence, to Thus, we may write n log β > logs + γ, n > logs + γ. log β n 0 := + logs + γ, 6 log β and conclude that n n 0. Thus, inequality will be satisfied provided that n 0 T + U < p 7 holds, where n 0 is given by formula 6. Step 3. Here, we show that we can do the above construction for p > 9 0 6. From here x on, we write x := p and y :=, and we assume that x > 06. In particular, y > 0 3. We choose A := {q q is prime and q y}, 0

and therefore { q B := q } q < q and q, q A. It is clear that the elements of B are in distinct congruence classes in Z p, therefore we may consider B as a subset of Z p and its cardinality is precisely πy b := = where πy is the number of primes up to y. Thus, s = We next give an upper bound on U. We claim that πyπy, x πyπy. 8 U < πyπy + log πy + log log πy +.8 log log πy. 9 log πy The above formula follows almost immediately from inequality v from Théorème A in [4] which claims that.8 log log m p m < m log m + log log m +, holds for all m 3. 30 log m Here p m denotes the mth prime number. The function t log t + log log t +.8 log log t log t 3 is increasing for t > 3. Moreover, since y > 0 3, it follows that N := πy 68, log log N log N +log log N +.8 log N and The combination of 30 33 shows that U = p y p < log 68+log log 68 +.8 log log 68 log 68 6.33 > 6, 3 p m < 6m holds for m =,,..., 3. 33 log πy + log log πy +.8 NN + log πy + log log πy +.8 log log πy log πy N k = k= log log πy, log πy which is precisely inequality 9. Having expressed s in terms of πy and having found an upper bound for U in terms of πy, we now use the fact that the inequalities t log t 0.5 < πt < t, hold for all t > 67 34 log t.5

see Theorem in [6]. We used the lower bounds for πy given by inequality 34 in the formulae 8 and 6 in order to get an upper bound for n 0 in terms of x, as well as the upper bound for πy given by the same inequality 34 in order to get an upper bound for U in terms of x, inserted both of these into 7 and we got an inequality which is satisfied for all x > 0 6 at λ = 3. Here, we used Mathematica to check the resulting inequality 7. In fact, the resulting inequality was found to be true for all x > 0.3 0 6 but it fails at x = 0. 0 6. Finally, we checked, using again Mathematica, that 7 is true at λ = 3 for any prime number x := p in the interval 9 0 6, 0 6. In fact, the largest prime number x := p for which 7 does not hold at λ = 3 is p = 86989. Step 4. It suffices to check that for all prime numbers 5 < p < 9 0 6, the set { t m i! i= t m i = p } 35 i= covers the entire Z p. Here is a trick that worked for the primes p which are large enough. Lemma. Assume that a > is a primitive root modulo p and assume that v and b are positive integers in the interval, p such that b a v mod p and Then, the set given by 35 covers Z p. v a < pv b. 36 Proof. Take w := p /v, t := v + w, and m i := a for i =,,..., v, and m i := b for i = v, v +,..., t. Notice first that t m i = v a + wb < va + p v b < p, i= where the last inequality from the right above follows from 36. Thus, we may complete the t-tuple m,..., m t with ones until we get a longer vector whose sum of the coordinates is equal to p. Notice also that for each pair of nonnegative integers λ, µ with λ v and µ w we have a! v b! w = a λ b µ a! λ b! µ a! r b! s, where r = v λ and s = w µ. Thus, it suffices to show that every congruence class in Z p can be represented under the form a λ b µ for some nonnegative λ and µ with λ v and µ w. But clearly, every congruence class in Z p is of the form a t for some t in the interval [, p ] because a is a primitive root modulo p. We may now apply the division with remainder theorem to write t = µv + λ, where λ v, and µ := t/v. Thus, µ w, and A Trademark of Wolfram Research a t = a µv+λ = a λ a v µ = a λ b µ,

and the lemma is therefore proved. Before proceeding further into the final stages of the proof of our Theorem, one may ask whether or not for every sufficiently large prime number p there exist positive integers a, b, and v satisfying the hypothesis of Lemma. We have been unable to find an unconditional proof of such a statement, but it can be shown that this is indeed so under the Extended Riemann Hypothesis. Lemma 3. Assuming the Extended Riemann Hypothesis, there exists a constant p 0 so that if p > p 0 is a prime number then there exists integers a, b, v in the interval, p with a a primitive root modulo p, b a v mod p and v a < pv b. 37 Proof. The following proof is due to Igor Shparlinski. Let p be a sufficiently large prime and let H, K, M, N be positive numbers smaller than p. Let a be an arbitrary primitive root modulo p. It is then known, that the number of numbers v [H, H + K] such that a v mod p [M +, M + N] is KN/p + Op / log p, where the constant understood in the above O is absolute see [5]. We take H := p 3/4 log 5/4 p, K := p 3/4 log 5/4 p, M := and N := p 3/4 log 5/4 p. Thus, if a is any primitive root modulo p, then the number of numbers v [p 3/4 log 5/4 p, 4p 3/4 log 5/4 p] for which a v mod p [, p 3/4 log 5/4 p] is KN p + Op/ log p = p / log 5/ p + Op / log p > 0 for p sufficiently large. Thus, if p is large and a is fixed, then there exists an integer v in the interval [p 3/4 log 5/4 p, 4p 3/4 log 5/4 p] so that if b a v mod p, then b [, p 3/4 log 5/4 p]. This is so for an arbitrary primitive root a modulo p. Under the Extended Riemann Hypothesis, it is known see [8] and [0] that the smallest primitive root modulo p, let us call it gp, satisfies gp = Oωp 6 log p where we use ωp for the number of distinct prime divisors of p. Since ωp = olog p, it follows that if p is large, then the interval [, log 8 p] contains a primitive root a modulo p. In fact, for our argument it suffices that the interval [, p /4 / log p] contains a primitive root a modulo p. With these choices of a := gp and v, we have av p/4 log p 4p3/4 log 5/4 p = 6p 7/4 log / p, 38 while pv b pv p7/4 log 5/4 p, 39 and now the combination of 38 and 39 obviously shows that 37 holds with these choices of a and v when p is large. It could be that Hildebrand s improvements from [3] on Burgess s character sums estimates from [] could lead to the conclusion that for large p the inequality gp p /4 / log p does 3

indeed hold, and if this were so then our Lemma 3 will be true unconditionally. We have been unable to decide this question. Step 5. We now return to the proof of the Theorem and explain how we did the computations for the remaining primes p < 9 0 6. We first showed computationally that for every prime number p in the interval [7.6 0 3, 9 0 6 ] there exist integers a, b, and v satisfying the hypothesis of Lemma. For this, we fixed such a prime p. We took the first 5 odd primes and we checked each one of them against being a primitive root modulo p. It is clear that at least one of these numbers will be a primitive root modulo p for most of the primes p in our range. We collected all these primes which are primitive roots modulo p in a set which we called Ap. Now we tried to find a value for v. We could have looped over all possible values of v, but this would have resulted in a cycle of length p for each p, and the computation would have taken too long. Instead, let v 0 be an initial value of v and set b a v 0 mod p. If v 0 is good, we are done. If not, we set the next v to be such that log p/b v := v 0 + +. log a In a sense, the v shown above is the smallest v > v 0 one can choose for which there is a chance for a v = a v 0 a v v 0 = ba v v 0 to be small modulo p. We kept on doing this for about 3 p times for each a A. If no good values of a and v were found by this code, then we had the program put p in a list of bad primes. The computation was done with v 0 := log p/log a, but a different choice of v 0 might have given better results. Now, π9 0 6 = 60489 < 6. 0 5. After the first run of the algorithm between the 00 th and 60000 th prime, we obtained a list of 799 bad primes, the largest one of which being 977. In the second iteration, we increased the range for v to 40 p and the range of odd primes which may be primitive roots modulo p to 80, and we sieved the previous list. The list shortened to 7 bad primes, the first one being 54 and the largest one being 759. These primes were handled by a different method: we wrote a Mathematica program which showed that the union of the sets { } p s p + s + A p s = u! 0 u, 40 4 where 0 s p 3, covers the entire Z p, for any p in the remaining set of bad primes. In fact, the above sets were shown to cover Z p for all the primes up to 000 as well, except for p = 5. We conjecture that the union of 40 for all the possible values of s covers Z p for any prime p 5, but we have no idea of how to attack this question. Acknowledgements. We thank Professors W.O. Nowell and Y. Song for their help with the programming in C++ which double-checked our computations done by Mathematica, and Professor Igor Shparlinski for various useful suggestions as well as for supplying the proof of Lemma 3. We also thank the anonymous referee for suggestions which improved the quality of this paper and for pointing out some errors in a previous version of this paper. The first author was supported in part by grants ECOS-ANUIES M0-M0, SEP-CONACYT 3759-E and SEP-CONACYT 3760-E. The second author was partially supported by a research grant from the School of Sciences at his institution. 4

References [] D.A. Burgess, On character sums and primitive roots, Proc. London Math. Soc. 96, 79 9. [] C. Cobeli, M. Vâjâitu, A. Zaharescu, The sequence n! mod p, J. Ramanujan Math. Soc. 5 000, 35-54. [3] A. Hildebrand, A note on Burgess character sum estimate, C. R. Math. Rep. Acad. Sci. Canada 8 986, 35 37. [4] J. Massias, G. Robin, Bornes effectives pour certaines fonctions concernant les nombres premiers, J. Théorie Nombres Bordeaux 8 996, 5-4. [5] H.L. Montgomery, Distribution of small powers of a primitive root, in Advances in number theory Kingston, ON, 99, 37 49, Oxford Univ. Press, 993. [6] A. Rosser, L. Schoenfeld, Approximate formulas for some functions of prime numbers, Illinois J. Math. 6 96, 64-94. [7] A. Sárkőzy, On the distribution of residues of products of integers, Acta Math. Hung. 49 3-4 987, 397-40. [8] V. Shoup, Searching for primitive roots in finite fields, Math. Comp. 58 99, no. 97, 369 380. [9] P. Stănică, p q -Catalan Numbers and Squarefree Binomial Coefficients, to appear in Journal of Number Theory. [0] Y. Wang, On the least primitive root of a prime, Acta Math. Sinica 0 96, 4. 5