On pseudosquares and pseudopowers

Similar documents
On pseudosquares and pseudopowers

Research Statement. Enrique Treviño. M<n N+M

On Carmichael numbers in arithmetic progressions

A numerically explicit Burgess inequality and an application to qua

ON CARMICHAEL NUMBERS IN ARITHMETIC PROGRESSIONS

Order and chaos. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA

Order and chaos. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA

Prime Divisors of Palindromes

On the Fractional Parts of a n /n

On Values Taken by the Largest Prime Factor of Shifted Primes

Remarks on the Pólya Vinogradov inequality

Part II. Number Theory. Year

The multiplicative order mod n, on average

On the Divisibility of Fermat Quotients

ON THE CONSTANT IN BURGESS BOUND FOR THE NUMBER OF CONSECUTIVE RESIDUES OR NON-RESIDUES Kevin J. McGown

Resolving Grosswald s conjecture on GRH

The Least Inert Prime in a Real Quadratic Field

Carmichael numbers and the sieve

Explicit Bounds for the Burgess Inequality for Character Sums

On the second smallest prime non-residue

Irreducible radical extensions and Euler-function chains

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

Short Kloosterman Sums for Polynomials over Finite Fields

SOME REMARKS ON ARTIN'S CONJECTURE

Upper bounds for least witnesses and generating sets

Average value of the Euler function on binary palindromes

Exponential and character sums with Mersenne numbers

Character Sums to Smooth Moduli are Small

Character sums with Beatty sequences on Burgess-type intervals

A 1935 Erdős paper on prime numbers and Euler s function

BURGESS BOUND FOR CHARACTER SUMS. 1. Introduction Here we give a survey on the bounds for character sums of D. A. Burgess [1].

E-SYMMETRIC NUMBERS (PUBLISHED: COLLOQ. MATH., 103(2005), NO. 1, )

THE GENERALIZED ARTIN CONJECTURE AND ARITHMETIC ORBIFOLDS

Balanced subgroups of the multiplicative group

On the number of elements with maximal order in the multiplicative group modulo n

arxiv:math/ v3 [math.nt] 23 Apr 2004

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

Carmichael numbers with a totient of the form a 2 + nb 2

EXPLICIT CONSTANTS IN AVERAGES INVOLVING THE MULTIPLICATIVE ORDER

HOW OFTEN IS EULER S TOTIENT A PERFECT POWER? 1. Introduction

Sum-Product Problem: New Generalisations and Applications

On the largest prime factor of the Mersenne numbers

ON THE AVERAGE RESULTS BY P. J. STEPHENS, S. LI, AND C. POMERANCE

arxiv: v1 [math.nt] 9 Jan 2019

Maximal Class Numbers of CM Number Fields

Fixed points for discrete logarithms

Short character sums for composite moduli

Multiplicative Order of Gauss Periods

A combinatorial problem related to Mahler s measure

Euler s ϕ function. Carl Pomerance Dartmouth College

SUM-PRODUCT ESTIMATES APPLIED TO WARING S PROBLEM MOD P

The ranges of some familiar arithmetic functions

On the elliptic curve analogue of the sum-product problem

On primitive elements in finite fields of low characteristic

Introduction to Number Theory

QUADRATIC CONGRUENCES FOR COHEN - EISENSTEIN SERIES.

On integer solutions to x 2 dy 2 = 1, z 2 2dy 2 = 1

ON THE SEMIPRIMITIVITY OF CYCLIC CODES

Results of modern sieve methods in prime number theory and more

A remark on a conjecture of Chowla

The ranges of some familiar functions

On prime factors of subset sums

A Local-Global Principle for Diophantine Equations

Euclidean prime generators

ON A PROBLEM OF ARNOLD: THE AVERAGE MULTIPLICATIVE ORDER OF A GIVEN INTEGER

Primes of the Form n! ± 1 and p ± 1

GENERATING RANDOM FACTORED GAUSSIAN INTEGERS, EASILY

Possible Group Structures of Elliptic Curves over Finite Fields

AVERAGE RECIPROCALS OF THE ORDER OF a MODULO n

ON THE DIVISOR FUNCTION IN SHORT INTERVALS

THE SOLOVAY STRASSEN TEST

Amicable numbers. CRM Workshop on New approaches in probabilistic and multiplicative number theory December 8 12, 2014

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

On Gauss sums and the evaluation of Stechkin s constant

Advanced Number Theory Note #8: Dirichlet's theorem on primes in arithmetic progressions 29 August 2012 at 19:01

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

Egyptian Fractions with odd denominators

arxiv: v1 [math.nt] 31 Dec 2018

A PROBLEM ON THE CONJECTURE CONCERNING THE DISTRIBUTION OF GENERALIZED FERMAT PRIME NUMBERS (A NEW METHOD FOR THE SEARCH FOR LARGE PRIMES)

Math 259: Introduction to Analytic Number Theory The Selberg (quadratic) sieve and some applications

Equidivisible consecutive integers

On a Generalization of Artin s Conjecture

A NOTE ON CHARACTER SUMS IN FINITE FIELDS. 1. Introduction

NOTES Edited by William Adkins. On Goldbach s Conjecture for Integer Polynomials

Congruences and exponential sums with the sum of aliquot divisors function

The ranges of some familiar arithmetic functions

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

Arithmetic properties of the Ramanujan function

Twin primes (seem to be) more random than primes

Why is the Riemann Hypothesis Important?

Summary Slides for MATH 342 June 25, 2018

Products of ratios of consecutive integers

Number Theoretic Designs for Directed Regular Graphs of Small Diameter

Dense product-free sets of integers

ON VALUES OF CYCLOTOMIC POLYNOMIALS. V

ALMOST ALL PRIMES HAVE A MULTIPLE OF SMALL HAMMING WEIGHT arxiv: v1 [math.nt] 18 Feb 2016

Integers without large prime factors in short intervals and arithmetic progressions

Smooth Values of Shifted Primes in Arithmetic Progressions

ON PRIMES IN QUADRATIC PROGRESSIONS & THE SATO-TATE CONJECTURE

arxiv: v1 [math.nt] 4 Oct 2016

Transcription:

On pseudosquares and pseudopowers Carl Pomerance Department of Mathematics Dartmouth College Hanover, NH 03755-3551, USA carl.pomerance@dartmouth.edu Igor E. Shparlinski Department of Computing Macquarie University Sydney, NSW 2109, Australia igor@ics.mq.edu.au Abstract Introduced by Kraitchik and Lehmer, an x-pseudosquare is a positive integer n 1 (mod 8) that is a quadratic residue for each odd prime p x, yet is not a square. We use bounds of character sums to prove that pseudosquares are equidistributed in fairly short intervals. An x-pseudopower to base g is a positive integer which is not a power of g yet is so modulo p for all primes p x. It is conjectured by Bach, Lukes, Shallit, and Williams that the least such number is at most exp(a g x/ log x) for a suitable constant a g. A bound of exp(a g x log log x/ log x) is proved conditionally on the Riemann Hypothesis for Dedekind zeta functions, thus improving on a recent conditional exponential bound of Konyagin and the present authors. We also give a GRH-conditional equidistribution result for pseudopowers that is analogous to our unconditional result for pseudosquares. 1

1 Introduction 1.1 Pseudosquares An x-pseudosquare is a nonsquare positive integer n such that n 1 (mod 8) and (n/p) = 1 for each odd prime p x. The subject of pseudosquares was initiated by Kraitchik and more formally by Lehmer in [14]. It was later shown by Weinberger (see [19]) that if the Generalized Riemann Hypothesis (GRH) holds, then the least x-pseudosquare, call it N x, satisfies N x exp(cx 1/2 ) for a positive constant c. The interest in this inequality is that there is a primality test, due to Selfridge and Weinberger, for integers n < N x that requires the verification of some simple Fermat-type congruences for prime bases p x. Thus, a large lower bound for N x leads to a fast primality test, and in particular this result gives an alternate and somewhat simpler form of Miller s GRH-conditional polynomial-time deterministic primality test. See [19] for details. By the GRH, we mean the Riemann Hypothesis for Dedekind zeta functions, that is, for algebraic number fields. Note that this conjecture subsumes the Extended Riemann Hypothesis (ERH), which is the Riemann Hypothesis for rational Dirichlet L-functions. The Weinberger lower bound for N x in fact only requires the ERH. As the concept of an x-pseudosquare is a natural one, it is also of interest to find a reasonable upper bound for N x and also to study the distribution of x-pseudosquares. Let M(x) = p p x denote the product of the primes up to x. For nonsquare integers n coprime to M(x), the probability that n satisfy n 1 (mod 8) and (n/p) = 1 for all odd primes p x is 2 π(x) 1. Thus, it is reasonable perhaps to conjecture that N x 2 (1+o(1))π(x), for example, see Bach and Huelsbergen [1]. In [18], Schinzel proves conditionally on the GRH that N x 4 (1+o(1))π(x), (1) and in particular, he conditionally shows that this inequality holds as well for the smallest prime x-pseudosquare. Unconditionally, he uses the Burgess 2

bound [5] (see also [11, Theorem 12.6]) to show that N x exp((1/4 + o(1))x). (2) We start with an observation, communicated to us by K. Soundararajan, that the pigeonhole principle (used in the same fashion as in [7, Lemma 10.1]) gives an unconditional proof of (1), though not for prime pseudosquares. Indeed, let us put X = 2 π(x) x and consider the (1 + o(1)) vectors of Legendre symbols (( l 3 X log X = (1 + o(1)) 2π(x) log x log 2 ), ( ) l,..., 5 ( )) l p for all primes l (x, X], where p is the largest prime with p x. Clearly there are at most 2 π(x) 1 possbilities for such vectors, so for large x there are five distinct primes l 1,..., l 5 (x, X] for which they coincide. Thus, at least two of them, say l 1, l 2, have the property that l 1 l 2 (mod 8). Then l 1 l 2 is an x-pseudosquare and we have N x l 1 l 2 X 2, implying (1). (Note that it is not necessary that the numbers l be prime in this proof, just coprime to M(x).) Our contribution to the subject of pseudosquares is on their equidistribution. For this we follow Schinzel s proof of (2), but use a character sum estimate given in [11, Corollary 12.14], which dates back to work of Graham and Ringrose [6], to prove the following result. Let S x be the set of x-pseudosquares. Theorem 1. For any interval (A, A + N] (0, ), uniformly over N exp(3x/ log log x), we have N # (S x (A, A + N]) = (1 + o(1)) M(x) # (S x (0, M(x)]), x. We also show M(x) # (S x (0, M(x)]) = (1 + o(1)), x, (3) 2 π(x)+1 e γ log x so that one can rewrite Theorem 1 in a more explicit form. 3

We remark that, by the prime number theorem, M(x) = exp ((1 + o(1))x) thus our result is nontrivial starting with very small values of N compared to M(x). Note that Granville and Soundararajan [7] also discuss the equidistibution of x-pseudosquares via the Graham Ringrose result on character sums, but their context is different and it is not clear that Theorem 1 follows directly from their paper. 1.2 Pseudopowers Let g be a fixed integer with g 2. Following Bach, Lukes, Shallit, and Williams [2], we say that an integer n > 0 is an x-pseudopower to base g if n is not a power of g over the integers but is a power of g modulo all primes p x. Denote by q g (x) the least x-pseudopower to base g. In [2] it is conjectured that for each fixed g, there is a number a g such that for x 2, q g (x) exp(a g x/ log x). (4) In addition, a heuristic argument is given for (4), with numerical evidence presented in the case of g = 2. For any g, we have (see [12]) the trivial bound q g (x) 2M(x) + 1, where M(x) is the product of the primes p x. Thus, q g (x) exp((1 + o(1))x). Using an estimate for exponential sums due to Heath-Brown and Konyagin [9] and results of Baker and Harman [3, 4] on the Brun Titchmarsh theorem on average, Konyagin, Pomerance, and Shparlinski [12] proved that q g (x) exp(0.88715x) for all sufficiently large x and all integers g with 2 g x. Further, it was noted in [12] that the method implied that for fixed g, q g (x) exp((1/2 + o(1))x), assuming the GRH. In this paper we make further progress towards (4), again assuming the GRH. Our proof makes use of the approach in Schinzel [18] for pseudosquares. 4

Theorem 2. Assume the GRH. Then for each fixed integer g with g 2 there is a number a g such that for x 3, q g (x) exp(a g x log log x/ log x). We are also able to prove an equidistribution result conditional on the GRH that is similar in strength to Theorem 1. Let P x be the set of x- pseudopowers base g. Theorem 3. Assume the GRH. Let g be a fixed integer with g > 1. There is a positive number b g such that for any interval (A, A+N] (0, ), uniformly over N exp(b g x/ log log x), we have N # (P x (A, A + N]) = (1 + o(1)) M(x) # (P x (0, M(x)]), x. We derive an asymptotic formula for # (P x (0, M(x)]) in Section 3.2, see (22), so that one can get a more explicit form of Theorem 3. We note that in [12] an unconditional version of Theorem 3 is given which however holds only for N exp(0.88715x). Under the GRH, the method of [12] gives a somewhat stronger result but still requires N to be rather large, namely it applies only to N exp ((0.5 + ε)x) for an arbitrary ε > 0. As for lower bounds for q g (x), it follows from Schinzel [16, 17] that q g (x), x. In [2] it is shown that assuming the GRH there is a number c g > 0 such that 1.3 Notation q g (x) exp(c g x(log log x) 3 /(log x) 2 ). We recall that the notation U = O(V ) and U V are equivalent to the assertion that the inequality U c V holds for some constant c > 0. 2 Distribution of pseudosquares In this section we prove Theorem 1 by making use of the following character sum estimate, which is [11, Corollary 12.14]. 5

Lemma 4. Let χ be a primitive character to the squarefree modulus q > 1. Suppose all prime factors of q are at most N 1/9 and let r be an integer with N r q 3. Then for any number A, χ(n) q 4Nτ(q)r/2r 1/r2r, A<n A+N where τ(q) is the number of positive divisors of q. Recall that M(x) is the product of the primes in [1, x]. Let x be a large number and let S x denote the set of positive integers n 1 (mod 8) with (n/p) = 1 for each odd prime p x. That is, S x consists of the x- pseudosquares and actual squares coprime to M(x). In particular, S x S x. We let M 2 (x) = M(x)/2, the product of the odd primes up to x. Theorem 1 is routine once N is large compared with M(x), so we assume that N M(x) 2. Note that for a positive integer n with (8n+1, M 2 (x)) = 1, we have that ( ( )) { 8n + 1 2 1 + = π(x) 1, if 8n + 1 S x ; (5) p 0, else. p M 2 (x) Thus, if A, N are positive numbers, then the sum ( ( )) 8n + 1 S A,N := 1 + p satisfies A<8n+1 A+N p M 2 (x) (8n+1,M 2 (x))=1 S A,N = 2 π(x) 1 #(S x (A, A + N]). (6) The product in (5) can be expanded, so that we have ( ) 8n + 1 S A,N = f A<8n+1 A+N f M 2 (x) (8n+1,M 2 (x))=1 = f M 2 (x) A<8n+1 A+N (8n+1,M 2 (x))=1 ( 8n + 1 f ). (7) 6

The contribution to S A,N from f = 1 is 1 A<8n+1 A+N (8n+1,M 2 (x))=1 N 4e γ log x uniformly for A, N with N exp(x 1/2 ). This estimate follows immediately from the fundamental lemma of the sieve; for example, see [8, Theorem 2.5]. Our goal now is to show that the contributions to S A,N coming from values of f > 1 is small in comparison to (8). Suppose that f M 2 (x), f > 1 is fixed. We can rewrite the contribution in (7) corresponding to f as R f = ( ) 8n + 1 µ(d), (9) f d M 2 (x)/f A<8n+1 A+N d 8n+1 where µ(d) is the Möbius function. The Pólya Vinogradov inequality (see [11, Theorem 12.5]) immediately implies that R f 3 2 π(x) 2 f log f < 2 π(x) f log f (10) for any choice of f > 1. We use (10) when f is not much larger than N, namely we use it when f N r2r /(r2 r 1 +1), where r shall be chosen later. In this case it gives R f 2 π(x) N 1 2/(r2r +2) log(n 2 ) 2 (1+o(1))π(x) N 1 2/(r2r +2). (11) For large values of f, that is, when d M 2 (x)/f (8) f > N r2r /(r2 r 1 +1), (12) we use a different approach which relies on Lemma 4. Let r f = (1 f 2 )/8, so that r f is an integer and 8r f 1 (mod f). Then ( ) d ( ) k R f = µ(d) f f = = d M 2 (x)/f d M 2 (x)/f A<dk A+N k d (mod 8) ( ) 8d µ(d) f ( ) 8d ( m µ(d) f f 7 A<d(8l+d) A+N m I d,f ), ( ) l + drf f

where I d,f = [B d,f + 1, B d,f + N d,f ], an interval of length Thus, N d,f = N 8d + O(1). R f d M 2 (x)/f m I d,f ( m f ). (13) The character sums in (13) where 8d > N 0.1 are trivially bounded by N d,f = O(N 0.9 ) in absolute value, so their total contribution to R f is ( ) m f 2π(x) N 0.9. (14) d M 2 (x)/f 8d>N 0.1 m I d,f We now assume that 8d N 0.1. Note that the conductors f of the characters which appear in (13) are squarefree. We choose r as the largest integer with r2 r + 2 log x log log x and apply Lemma 4 to the inner sum in (13) with this value of r. To do this we need (N/(8d)) r f 3 and x (N/(8d)) 1/9. These inequalities hold since ( ) 1 r = log 2 + o(1) log log x and N exp(3x/ log log x), (15) so that ( ) r N N 0.9r exp(2.7rx/ log log x) M(x) 3 f 3 (16) 8d and for all large x. ( ) 1/9 N N 0.1 exp(0.3x/ log log x) x. (17) 8d 8

Thus, by Lemma 4, d M 2 (x)/f 8d N 0.1 m I d,f We now derive from (14), (18), and (12) that ( m f ) 4 2π(x) 1 N2 (π(x) 1)r/2r f 1/r2r. (18) R f 2 (1+o(1))π(x) N 0.9 + 2 (1+o(1))π(x) Nf 1/r2r 2 (1+o(1))π(x) N 1 2/(r2r +2) which is also the bound in (11) for those f > 1 not satisfying (12). Now summing over f we see that the contribution to S A,N from values of f > 1 is at most R f 4 (1+o(1))π(x) N 1 2/(r2r +2) f M 2 (x) f>1 Note that by our choice of r we have = N 1 2/(r2r +2) exp((log 4 + o(1))x/ log x). N 2/(r2r +2) N 2 log log x/ log x exp(6x/ log x). Since 6 > log 4, we have that the contribution to (7) from terms with f > 1 is small compared to the main term given by (8), so that Together with (6), we now have N S A,N = (1 + o(1)) 4e γ log x. N #(S x (A, A + N]) = (1 + o(1)) 2 π(x)+1 e γ log x. Since the number of squares in the interval (A, A + N] is at most N 1/2, we obtain N # (S x (A, A + N]) = (1 + o(1)) 2 π(x)+1 e γ log x. Taking A = 0 and N = M(x) we derive (3) and conclude the proof of Theorem 1. We remark that by being a little more careful with the estimates, we can prove the theorem with 3 replaced with any fixed number larger than log 8. 9

3 Distribution of pseudopowers 3.1 Proof of Theorem 2 Let g be a given integer with g 2 which we assume to be fixed. Let p g (x) be the least positive integer which is not a power of g yet is a power of g modulo every prime p x with p g. It is easy to see that q g (x) gp g (x). (19) Indeed, the integer gp g (x) is not a power of g, it is a power of g modulo every prime p x with p g, and it is zero modulo p for every prime p g, and so is a power of g modulo these primes too. For every prime p g let l g (p) be the multiplicative order of g modulo p, and let i g (p) = (p 1)/l g (p), the index of the subgroup of powers of g in the multiplicative group modulo p. Let M g (x) = p, I g (x) = i g (p). p x p M g(x) p g It follows from [12, Theorem 1] that I g (x) exp(0.42x) for all sufficiently large x. We conditionally improve this result. Lemma 5. Assume the GRH. There is a number c g such that for x 3, I g (x) exp(c g x log log x/ log x) Proof. In Kurlberg and Pomerance [13, Theorem 23], following ideas of Hooley [10] and Pappalardi [15], it is shown conditionally on the GRH that p M g(x) l g(p) p/y 1 g π(x) y + x log log x (log x) 2 for 1 y log x. Applying this result with y = log x, we have p M g(x) i g(p) log x 1 g x log log x (log x) 2. 10

Indeed, i g (p) y implies that l g (p) (p 1)/y < p/y. Since we trivially have i g (p) x for each prime p M g (x) with p g, we thus have I g (x) = i g (p) i g (p) (log x) π(x) x Og(x log log x/(log x)2). p M g(x) i g(p)<log x p M g(x) i g(p) log x The lemma follows. Thus, For each prime p g, let χ p be a character modulo p of order i g (p). Then i g(p) j=1 χ j p (n) = { ig (p), if n is a power of g modulo p, 0, else. i g(p) χ j p (n) p M g(x) j=1 { Ig (x), if n is a power of g modulo every p M = g (x), 0, else. (20) Let Λ(n) denote the von Mangoldt function. From the definition of p g (x) we deduce that S g := n<p g(x) Λ(n) p M g(x) j=1 i g(p) χ j p(n) = I g (x) n<p g(x) n is a power of g Λ(n). The last sum is 0 if g is not a prime or prime power, and in any event is always at most log p g (x) x. Thus, S g I g (x)x. (21) We now multiply out the product in (20); it is seen as a sum of I g (x) characters modulo M g (x). The contribution to S g from the principal character p χig(p) p is ψ(p g (x)) + O(x). We may assume that p g (x) e π(x) since otherwise the theorem follows immediately from (19), so that the contribution to S g from the principal character is (1 + o(1))p g (x), by the prime number theorem. 11

The contribution to S g from each nonprincipal character χ is χ(n)λ(n) p g (x) ( 1/2 (log M g (x)) 2 + (log p g (x)) 2) p g (x) 1/2 x 2 n<p g(x) assuming the GRH. Hence, the contribution to S g from nonprincipal characters is O(I g (x)p g (x) 1/2 x 2 ). Thus, so that from (21) we deduce that S g = (1 + o(1))p g (x) + O(I g (x)p g (x) 1/2 x 2 ), p g (x) I g (x) 2 x 4. Theorem 2 now follows immediately from (19) and Lemma 5. We remark that an alternate way to handle primes dividing g is to eschew (19) and instead multiply the product in (20) by χ mod g χ(n). This sum is ϕ(g) when n 1 (mod g) and is 0 otherwise. Note that a number that is 1 mod p is always a power of g modulo p. Although this is somewhat more complicated, it does lead to a proof that there is a prime number below the bound exp(a g x log log x/ log x) that is an x-pseudopower base g. 3.2 Proof of Theorem 3 We use the method of proof of Theorem 1. Accordingly we only outline some new elements and suppress the details. For a nonzero integer n, let rad(n), the radical of n, be the largest squarefree divisor of n. That is, rad(n) is the product of the distinct prime factors of n. Also, let ω(n) denote the number of distinct prime factors of n. Let P x denote the set of positive integers which are either an x-pseudopower base g or a true power of g. Then a positive integer n P x if and only if both (i) n is in the subgroup g of ( Z/p Z) when p x and p g; (ii) n 0 or 1 (mod p) when p x and p g. Assuming then that x g, the cardinality of P x (0, M(x)] is 2 ω(g) p M g(x) l g (p) = 2 ω(g) p M g(x) p 1 =2ω(g) ϕ(m g (x)) i g (p) I g (x) 12 2 ω(g) M(x) e γ ϕ(rad(g))i g (x) log x,

by the formula of Mertens. It is easy to see that this expression ( ) is exponentially large, either from the observation that l g (p) 2 whenever = 1, so that #(P x (0, M(x)])) g p 2 (1/2+o(1))π(x), or using I g (x) e 0.42x from [12]. Further, the number of true powers of g in (0, M(x)] is small; it is O(x). Thus, 2 ω(g) M(x) # (P x (0, M(x)]) = (1 + o(1)), x. (22) e γ ϕ(rad(g))i g (x) log x To prove Theorem 3 we again use Lemma 5, which is GRH-conditional. But the framework of the proof follows the argument of Theorem 1, and in particular it uses the unconditional Lemma 4. Notice that the proof of Theorem 2 used Riemann Hypotheses a second time, namely in the estimation of the weighted character sums. Now we use unweighted character sums and so are able to use Lemma 4. The set-up is as follows. Let P A,N = i g(p) ab=rad(g) A<n A+N p M g(x) j=1 n 0 (mod a) n 1 (mod b) χ j p (n). (23) This expression counts integers n (A, A + N] that are 0 or 1 (mod p) for each prime p g and in the subgroup g of ( Z/p Z) for each prime p x with p g. Namely, it counts members of P x, and does so with the weight I g (x). To prove Theorem 3 one then expands the product in (23). As usual, the contribution from the principal character is easily estimated: it is the number of integers n (A, A + N] which are 0 or 1 (mod p) for each prime p g and are coprime to M g (x). Thus, the principal character gives the contribution (1 + o(1)) 2ω(g) rad(g) ϕ(m g(x)) 2 ω(g) N N = (1 + o(1)) M g (x) e γ ϕ(rad(g)) log x, which when divided by the weight I g (x) gives the main term for our count. The nonprincipal characters have conductors corresponding to those divisors f of M g (x) with f > 1 and i g (p) > 1 for each prime p f. For such integers f, the characters that occur with conductor f are induced by characters in the set { } X f = : 1 j p i g (p) 1 for p f. p f χ jp p 13

Thus, the contribution of the nonprincipal characters to P A,N is PA,N := χ(n), ab=rad(g) f M g(x) f>1 χ X f A<n A+N n 0 (mod a) n 1 (mod b) (n,m g(x)/f)=1 where X f is empty if i g (p) = 1 for some prime p f. The inner sum is µ(d) χ(n). d M g(x)/f A<n A+N n 0 (mod ad) n 1 (mod b) As before we estimate the character sum here trivially if d is large, we use the Pólya Vinogradov inequality if f is small, and we use Lemma 4 in the remaining cases. However, we modify slightly the choice of r in the proof of Theorem 1 and take it now as the largest integer with r2 r + 2 log x (log log x) 2. Then we still have (15) and thus the conditions (16) and (17) are still satisfied so that Lemma 4 may be used. Since each X f < I g (x), we obtain P A,N 4 (1+o(1))π(x) I g (x)n 1 2/(r2r +2). This leads us to the asymptotic formula 2 ω(g) N P A,N = (1 + o(1)) e γ ϕ(rad(g)) log x + O ( I g (x)4 (1+o(1))π(x) N ) 1 2/(r2r +2). For N exp(b g x/ log log x) we have N 2/(r2r +2) N 2(log log x)2 / log x > exp (2b g x log log x/ log x). Using Lemma 5 and taking b g = c g, we conclude the proof of Theorem 3. Acknowledgments The authors are grateful to K. Soundararajan for communicating the proof we presented in Section 1.1 and for his permission to give it here. The first author was supported in part by NSF grant DMS-0703850. The second author was supported in part by ARC grant DP0556431. 14

References [1] E. Bach and L. Huelsbergen, Statistical evidence for small generating sets, Math. Comp., 61 (1993), 69 82. [2] E. Bach, R. Lukes, J. Shallit and H. C. Williams, Results and estimates on pseudopowers, Math. Comp., 65 (1996), 1737 1747. [3] R. C. Baker and G. Harman, The Brun-Titchmarsh theorem on average, Proc. Conf. in Honor of Heini Halberstam (Allerton Park, IL, 1995), Progr. Math., vol. 138, Birkhäuser, Boston, 1996, 39 103. [4] R. C. Baker and G. Harman, Shifted primes without large prime factors, Acta Arith., 83 (1998), 331 361. [5] D. A. Burgess, On character sums and L-series. II, Proc. London Math. Soc., 13 (1963), 524 536. [6] S. W. Graham and C. J. Ringrose, Lower bounds for least quadratic nonresidues, Analytic Number Theory, Allerton Park 1989, Progress in Mathematics, vol. 85, Birkhäuser, Basel, 1990, 269 309. [7] A. Granville and K. Soundararajan, The distribution of values of L(1, χ d ), Geom. and Func. Anal., 13 (2003), 992 1028. [8] H. Halberstam and H.-E. Richert, Sieve methods, Academic Press, London, 1974. [9] D. R. Heath-Brown and S. V. Konyagin, New bounds for Gauss sums derived from kth powers, and for Heilbronn s exponential sum, Quart. J. Math., 51 (2000), 221 235. [10] C. Hooley, On Artin s conjecture, J. Reine Angew. Math., 225 (1967), 209 220. [11] H. Iwaniec and E. Kowalski, Analytic number theory, Colloquium Pubs., Vol. 53, Amer. Math. Soc., Providence, RI, 2004. [12] S. Konyagin, C. Pomerance, and I. E. Shparlinski, On the distribution of pseudopowers, to appear. 15

[13] P. Kurlberg and C. Pomerance, On the period of the linear congruential and power generators, Acta Arith., 119 (2005), 149 169. [14] D. H. Lehmer, A sieve problem on pseudo-squares, Math. Tables and Other Aids to Computation, 8 (1954), 241 242. [15] F. Pappalardi, On the order of finitely generated subgroups of Q (mod p) and divisors of p 1, J. Number Theory, 57 (1996), 207 222. [16] A. Schinzel, On the congruence a x b (mod p), Bull. Acad. Polon. Sci., Sér. Sci. Math. Astronom. Phys., 8 (1960), 307 309. [17] A. Schinzel, A refinement of a theorem of Gerst on power residues, Acta Arith., 17 (1970), 161 168. [18] A. Schinzel, On pseudosquares, New trends in probability and statistics, Palonga, 1996, Vol. 4, 213 220, VSP, Utrecht, 1997. [19] H. C. Williams, Primality testing on a computer, Ars Combinatoria, 5 (1978), 127 185. 16