City University of New York (CUNY) CUNY Academic Works

Publications and Research Bronx Community College

2019

Results for nonWieferich Primes

Nelson A. Carella CUNY Bronx Community College

How does access to this work benefit ou?y Let us know!

More information about this work at: https://academicworks.cuny.edu/bx_pubs/64 Discover additional works at: https://academicworks.cuny.edu

This work is made publicly available by the City University of New York (CUNY). Contact: [email protected] Results for nonWieferich Primes

N. A. Carella

Abstract: Let v ≥ 2 be a fixed , and let x ≥ 1 be a large number. The exact asymptotic counting function for the number of nonWieferich primes p ≤ x such that vp−1 − 1 ≡ 0 mod p2 in the interval [1, x] is proposed in this note. The current results in the literature provide lower bounds, which are conditional on the or the Erdos binary additive conjecture.

1 Introduction

Let P = {2, 3, 5, 7,...} be the set of prime numbers, and let v ≥ 2 be a fixed integer. The of Wieferich primes and nonWieferich primes are defined by

p−1 2 Wv = {p ∈ P : v − 1 ≡ 0 mod p } (1) and p−1 2 Wv = {p ∈ P : v − 1 6≡ 0 mod p } respectively. The set of primes P = Wv ∪ Wv is a disjoint union of these subsets.

The subsets Wv and Wv have other descriptions by means of the orders ordp(v) = d | p − 1 and × 2 × ordp2 (v) = pd 6= p of the base v in the cyclic group (Z/pZ) and Z/p Z respectively. The order m−1 is defined by ordn(v) = min{m ≥ 1 : v − 1 ≡ 0 mod n}. Specifically,  Wv = p : ordp2 (v) | p − 1 (2) and  Wv = p : ordp2 (v) - p − 1 . For a large number x ≥ 1, the corresponding counting functions for the number of such primes up to x are defined by  Wv(x) = # p ≤ x : ordp2 (v) | p − 1 (3) and W v(x) = π(x) − Wv(x), where π(x) = #{p ≤ x} is the primes counting function, respectively.

Assuming the abc conjecture, several authors have proved that there are infinitely many non- Wieferich primes, see [13], [4], et alii. These results have lower bounds of the form log x W (x)  (4) v log log x or slightly better. In addition, assuming the Erdos binary additive conjecture, there is a proof that the of nonWieferich primes has nonzero density. More precisely, x W (x) ≥ c (5) v log x

July 29, 2019 AMS MSC :Primary 11A41; Secondary 11B25. Keywords: Distribution of primes; Wieferich Prime; nonWieferich Prime

1 Results for nonWieferich Primes 2 where c > 0 is a constant, see [5, Theorem 1] for the details. Here, it is shown that the subset of nonWieferich primes has density 1 in the set of primes unconditionally. Theorem 1.1. Let v ≥ 2 be a small base, and let x ≥ 1 be a large number. Then, the number of nonWieferich primes has the asymptotic formula x  x  W v(x) = + O . (6) log x log2 x

Proof. The upper bound Wv(x) = O (log log x), confer Theorem 6.1, is used below to derive a lower bound for the counting function W v(x). This is as follows:  W v(x) = # p ≤ x : ordp2 (v) - p − 1 = π(x) − Wv(x) (7) ≥ π(x) + O (log log x) x  x  = + O , log x log2 x

2 where π(x) = #{p ≤ x} = x/log x + O(x/log x).  Corollary 1.1. Almost every odd integer is a sum of a squarefree number and a .

Proof. Same as Theorem 1 in [5], but use the sharper upper bound Wv(x) = O (log log x). 

2 Characteristic Functions Modulo Prime Powers

The standard method for constructing characteristic function for primitive elements are discussed in [11, Corollary 3.5], [9, p. 258], and some characteristic functions for finite rings are discussed 2 × in [6]. These type of characteristic functions detect the orders of the elements v ∈ Z/p Z by means of the divisors of ϕ(p2).

A new method for constructing characteristic functions in cyclic groups is developed here. These 2 × type of characteristic functions detect the orders of the elements v ∈ Z/p Z by means of the solutions of the equation τ pn − v ≡ 0 mod p2, where v, τ are constants, and n is a variable such Q that 1 ≤ n < p − 1, and gcd(n, p − 1) = 1. The formula ϕ(n) = p|n(1 − 1/p) denotes the Euler totient function.

2 2 × Lemma 2.1. Let p ≥ 3 be a prime, and let τ be a primitive root mod p . Let v ∈ Z/p Z be a nonzero element. Then

i2π(τpn−v)m  1 1 if ord 2 (v) = p − 1, X X ϕ(p2) p 2 e = ϕ(p ) 0 if ordp2 (v) 6= p − 1. 1≤n

2 × 2 Proof. Let τ ∈ Z/p Z be a fixed primitive root of order p(p − 1) = ϕ(p ). As the index n ≥ 1 pn 2 × ranges over the relatively prime to p − 1, the element τ ∈ Z/p Z ranges over the pn elements of order ordp2 (τ ) = p − 1. Hence, the equation τ pn − v = 0 (8)

2 × has a solution if and only if the fixed element Z/p Z is an elements of order ordp2 (v) = p − 1. pn 2 Setting w = ei2π(τ −v)/ϕ(p ) and summing the inner sum yield  X 1 X m 1 if ordp2 (v) = p − 1, 2 w = (9) ϕ(p ) 0 if ordp2 (v) 6= p − 1. gcd(n,p−1)=1 0≤m<ϕ(p2)

P m x This follows from the geometric series identity 0≤m≤x−1 w = (w − 1)/(w − 1), w 6= 1 applied to the inner sum.  Results for nonWieferich Primes 3

The characteristic function for any element v ≥ 2 of any order ordp2 (v) = d | p − 1 in the cyclic 2 × group Z/p Z is a sum of characteristic functions. Lemma 2.2. Let Let v ≥ 2 be a fixed base, let p ≥ 3 be a prime, and let τ be a primitive root mod p2. The indicator function for the subset of primes such that vp−1 − 1 ≡ 0 mod p2 is given by

X X 1 X i2π(τdpn−v)m Ψ (p2) = e ϕ(p2) 0 ϕ(p2) d|p−1 1≤n

dpn 2 Proof. Suppose that ordp2 (v) | p − 1. Then, the congruence τ − v ≡ 0 mod p has a unique solution pair d | p − 1 and n ≥ 1 with gcd(n, (p − 1)/d) = 1. Otherwise, τ dpn − v 6≡ 0 mod p2 for all pairs d | p − 1 and gcd(n, (p − 1)/d) = 1. To complete the proof, proceed as in the proof of Lemma 2.1. 

3 Equivalent Exponential Sums

For any fixed 0 6= s ∈ Z/p2Z, an asymptotic relation for the exponential sums

X n 2 X n 2 ei2πsτ /ϕ(p ) and ei2πτ /ϕ(p ), (10) gcd(n,ϕ(p2))=1 gcd(n,ϕ(p2))=1 is provided in Lemma 3.1. This result expresses the first exponential sum in (10) as a sum of simpler exponential sum and an error term. The proof is based on Lagrange resolvent in the finite ring Z/p2Z. Specifically,

dp dp 2dp (p−1)dp (ωt, ζsτ ) = ζs + ω−tζsτ + ω−2tζsτ + ··· + ω−(p−1)tζsτ , (11)

2 where ω = ei2π/p, ζ = ei2π/ϕ(p ), and the variables 0 6= s ∈ Z/p2Z, and 0 6= t ∈ Z/pZ. Lemma 3.1. Let p ≥ 2 be a large prime. If τ be a primitive root modulo p2, then,

X ndp 2 X ndp 2 ei2πsτ /ϕ(p ) = ei2πτ /ϕ(p ) + O(p1/2 log3 p), gcd(n,(p−1)/d)=1 gcd(n,(p−1)/d)=1 for any fixed d | p − 1, and 0 6= s ∈ Z/p2Z. Proof. Summing (11) times ωtn over the variable t ∈ Z/pZ yields, (all the nontrivial complex pth ), ndp 2 X ndp p · ei2πsτ /ϕ(p ) = (ωt, ζsτ )ωtn. (12) 0≤t≤p−1 Summing (12) over the variable n ≥ 1, for which gcd(n, (p − 1)/d) = 1, yields

X ndp 2 X X dp p · ei2πsτ /ϕ(p ) = (ωt, ζsτ )ωtn gcd(n,(p−1)/d)=1 gcd(n,(p−1)/d)=1, 0≤t≤p−1 X dp X = (ωt, ζsτ ) ωtn − p. (13) 1≤t≤p−1 gcd(n,(p−1)/d)=1

The first index t = 0 contributes p, see [10, Equation (5)] for similar calculations. Likewise, the basic exponential sum for s = 1 can be written as

X ndp 2 X dp X p · ei2πτ /ϕ(p ) = (ωt, ζτ ) ωtn − p, (14) gcd(n,(p−1)/d)=1 1≤t≤p−1 gcd(n,(p−1)/d)=1 Results for nonWieferich Primes 4

Differencing (13) and (14) produces   X i2πsτ ndp/ϕ(p2) X i2πτ ndp/ϕ(p2) S1 = p ·  e − e  gcd(n,(p−1)/d)=1 gcd(n,(p−1)/d)=1 X  dp dp  X = (ωt, ζsτ ) − (ωt, ζτ ) ωtn. (15) 1≤t≤p−1 gcd(n,(p−1)/d)=1

The right side sum S1 can be rewritten as

X  t sτ ndp t τ ndp  X tn S1 = (ω , ζ ) − (ω , ζ ) ω 1≤t≤p−1 gcd(n,(p−1)/d)=1 et et( p−1 +1) X  ndp ndp  X ω − ω d = (ωt, ζsτ ) − (ωt, ζτ ) µ(e) (16) 1 − ωet 1≤t≤p−1 e≤(p−1)/d et et( p−1 +1) X X  ndp ndp  ω − ω d = (ωt, ζsτ ) − (ωt, ζτ ) µ(e) . 1 − ωet 1≤t≤p−1, e≤(p−1)/d The second line follows from Lemma 3.2-i. The upper bound

et et( p−1 +1) X X  ndp ndp  ω − ω d |S | ≤ (ωt, ζsτ ) − (ωt, ζτ ) µ(e) 1 1 − ωet 1≤t≤p−1, e≤(p−1)/d et et( p−1 +1) X X ndp ndp ω − ω d ≤ (ωt, ζsτ ) − (ωt, ζτ ) µ(e) 1 − ωet 1≤t≤p−1, e≤(p−1)/d et et( p−1 +1) X X   ω − ω d ≤ 2p1/2 log p · µ(e) 1 − ωet 1≤t≤p−1, e≤(p−1)/d X   2p log p ≤ 2p1/2 log p · πt 1≤t≤p−1   X 1 ≤ 4p3/2 log2 p (17) t 1≤t≤p−1 ≤ 8p3/2 log3 p.

The third line follows the upper bound for Lagrange resolvents, and the fourth line follows from Lemma 3.2-ii. Here, the difference of two Lagrange resolvents, (Gauss sums), has the upper bound

t sτ dp t τ dp X i2πt/p 1/2 (ω , ζ ) − (ω , ζ ) ≤ 2 χ(t)e ≤ 2p log p, (18)

1≤t≤p−1 where |χ(t)| = 1 is a root of unity. Taking absolute value in (15) and using (17) return

X i2πsτ ndp/p X i2πτ ndp/p p · e − e ≤ |S1|

gcd(n,(p−1)/d)=1 gcd(n,(p−1)/d)=1 ≤ 8p3/2 log3 p. (19)

The last inequality implies the claim.  Lemma 3.2. Let p ≥ 2 be a large prime, and let ω = ei2π/p be a pth root of unity. Then, (i) et et( p−1 +1) X X ω − ω d ωtn = µ(e) , 1 − ωet gcd(n,(p−1)/d)=1 e≤(p−1)/d Results for nonWieferich Primes 5

(ii)

X tn 2p log p ω ≤ , πt gcd(n,(p−1)/d)=1 where µ(k) is the Mobius function, for any fixed pair d | p − 1 and t ∈ [1, p − 1]. Proof. (i) Use the inclusion exclusion principle to rewrite the exponential sum as X X X ωtn = ωtn µ(e) gcd(n,(p−1)/d)=1 n≤(p−1)/d e|(p−1)/d e|n X X = µ(e) ωtn e≤(p−1)/d n≤(p−1)/d e|n X X = µ(e) ωetm (20) e≤(p−1)/d m≤(p−1)/de et et( p−1 +1) X ω − ω d = µ(e) . 1 − ωet e≤(p−1)/d

(ii) Observe that the parameters ω = ei2π/p, the integers t ∈ [1, p − 1], and e ≤ (p − 1)/d imply that πet/p 6= kπ with k ∈ Z, so the sine function sin(πet/p) 6= 0 is well defined. Using standard manipulations, and z/2 ≤ sin(z) < z for 0 < |z|< π/2, the last expression becomes

et et( p−1 +1) ω − ω d 2 2p ≤ ≤ (21) et 1 − ω sin(πet/p) πet for 1 ≤ d ≤ p − 1. Finally, the upper bound is

et et( p−1 +1) X ω − ω d 2p X 1 µ(e) ≤ (22) 1 − ωet πt e e≤(p−1)/d e≤(p−1)/d 2p log p ≤ . πt 

4 Upper Bound For The Main Term

An estimate for the finite sum occurring in the evaluation of the main term is considered in this section. Lemma 4.1. Let x ≥ 1 be a large number, and let ϕ(n) be the Euler totient function. Then X 1 X X 1 ≤ 2 log log x. ϕ(p2) p≤x d|p−1, gcd(n,(p−1)/d)=1 P Proof. Use the identity d|n ϕ(d) = n to eliminate the inner double sum in the following way: X X X 1 = ϕ((p − 1)/d) = p − 1. (23) d|p−1, gcd(n,(p−1)/d)=1 d|p−1 Substituting this returns X 1 X X X 1 X 1 1 = · (p − 1) = . (24) ϕ(p2) ϕ(p2) p p≤x d|p−1, gcd(n,(p−1)/d)=1 p≤x p≤x

Lastly, apply Mertens theorem to the prime harmonic sum.  Results for nonWieferich Primes 6

5 Estimate For The Error Term

Upper bound for the error term occurring in the proof of Theorem 1.1 is determined here. This estimate is weak, but sufficient in many applications.

2 × Lemma 5.1. Let x ≥ 1 be large number. Let p ≥ 2 be a large prime, and let τ ∈ Z/p Z be a primitive root mod p2. If the element v ≥ 2 is a small fixed integer, then

X X X 1 X i2π(τpdn−v)m e ϕ(p2) = O (log log x) , ϕ(p2) p≤x, d|p−1, gcd(n,(p−1)/d)=1 1≤m<ϕ(p2) for all sufficiently large numbers x ≥ 1. Proof. Rearrange the inner triple finite sum in the form

X X X 1 X i2π(τdpn−v)m T = e ϕ(p2) (25) ϕ(p2) p≤x d|p−1, gcd(n,(p−1)/d)=1 1≤m<ϕ(p2) dpn X 1 X −i2π vm X X i2π mτ = e ϕ(p2) e ϕ(p2) ϕ(p2) p≤x 0

The last line in (25) follows from Lemma 3.1. Taking absolute the value of the first term T1 yields

X −i2πvm/ϕ(p2) |T1| = e = w ≤ v (26)

0

d|p−1 gcd(n,(p−1)/d)=1 X X  1 + p1/2 log4 p d|p−1 gcd(n,(p−1)/d)=1 X p − 1  ϕ + p1/2 log4 p d d|p−1  p − 1. (27)

Replace the identity ϕ(p2) = p(p − 1), and the estimates (26) and (27) back into (25). These lead to X 1 |T | ≤ |T | × |T | (28) ϕ(p2) 1 2 p≤x X 1  (v × (p − 1)) (p − 1)p p≤x X 1  p p≤x  log log x, where v ≥ 2 is the base.  Results for nonWieferich Primes 7

6 Upper Bound For The Wieferich Primes  The subset of primes W2 = p : ordp2 (2) | p − 1 = {1093, 3511,..., } associated with the base v = 2 is the best known case. But, many other bases have been computed too, see [2], [8]. The heuristic argument in [12, p. 413], [1], [7, Section 2], et alii, claims that X 1 W (x) ≈  log log x. (29) v p p≤x The basic foundation of this heuritic is correct. An unconditional upper bound is computed here. Theorem 6.1. The number of Wieferich primes on the interval [1, x] has the upper bound

Wv(x) = O (log log x) . Proof. Let x ≥ 1 be a large number, and fix an integer v ≥ 2. The sum of the characteristic function over the interval [1, x] is written as X 2 Wv(x) = Ψ0(p ). (30) p≤x Replacing the characteristic function, see Lemma 2.2, and expanding yield X X X X 1 X i2π(τpn−v)m Ψ (p2) = e ϕ(p2) v ϕ(p2) p≤x p≤x, d|p−1, gcd(n,(p−1)/d)=1 0≤m<ϕ(p2) X 1 X X = 1 (31) ϕ(p2) p≤x d|p−1, gcd(n,(p−1)/d)=1 X X X 1 X i2π(τpn−v)m + e ϕ(p2) ϕ(p2) p≤x, d|p−1, gcd(n,(p−1)/d)=1 1≤m<ϕ(p2)

= Mv(x) + Ev(x).

The main term Mv(x) is determined by the index m = 0, and the error term Ev(x) is determined by the range 1 ≤ m < ϕ(p2). Applying Lemma 4.1 to the main term and applying Lemma 5.1 to the error term yield

Wv(x) = Mv(x) + Ev(x) ≤ 2 log log(x) + O (log log x) = O (log log x) . (32)

This verifies the upper bound. 

References

[1] Richard Crandall, Karl Dilcher, Carl Pomerance. A search for Wieferich and Wilson primes. Math. Comp. 66 (1997), no. 217, 433–449. [2] Francois GDorais, Dominic Klyve. A Wieferich prime search up to 6.7 × 1015. J. Integer Seq. 14 (2011), no. 9, Article 11.9.2, 14 pp. [3] J.-M. DeKoninck, N. Doyon . On the set of Wieferich primes and of its . Ann. Univ. Sci. Budapest. Sect. Comput. 27 (2007), 3- 13. [4] H. Graves, M. Ram Murty. The abc conjecture and non-Wieferich primes in arithmetic progressions, J. 133 (2013) 1809-1813. [5] Andrew Granville, K Soundararajan. A binary additive problem of Erdos and the order of 2 mod p2. Ramanujan J. 2 (1998), no. 1-2, 283-298. Results for nonWieferich Primes 8

[6] John Johnsen. On the distribution of powers in finite fields. J. Reine Angew. Math. 251 1971 10-19.

[7] Nicholas M Katz. Wieferich past and future. Topics in finite fields, 253-270, Contemp. Math., 632, Amer. Math. Soc., Providence, RI, 2015.

[8] Wilfrid Keller, Jorg Richstein. Solutions of the congruence ap−1 ≡ 1 mod pr, Math. Comp. 74 (2005), 927-936.

[9] Rudolf Lidl, HaraldNiederreiter. Finite fields. With a foreword by P. M. Cohn. Sec- ond edition. Encyclopedia of Mathematics and its Applications, 2020. Cambridge University Press, Cambridge, 1997.

P x [10] L. J Mordell. On the exponential sum 1≤x≤X exp(2πi(ax + bg )/p). Mathematika 19 (1972), 84-87.

[11] H. E.Rose. A course in number theory. Second edition. Oxford Science Publications. The Clarendon Press, Oxford University Press, New York, 1994.

[12] PauloRibenboim. The new book of records , Berlin, New York: Springer- Verlag, 1996.

[13] J. H. Silverman. Wieferich criterion and the abc-conjecture , J. Number Theory 30 (1988) no. 2, 226-237.

ResultNonWieferichPrimes-07-21-19-11.tex.