BITS OF 3n IN BINARY, WIEFERICH PRIMES AND A CONJECTURE OF ERDOS˝

TAYLOR DUPUY AND DAVID WEIRICH

Abstract. Let p and q be distinct primes. We show that on average the base n q-expansions of the sequence {p }n≥1 have digits which are equidistributed n over a ∈ {0, 1, . . . , q − 1}. A non-averaged version of equidistribution of (p )q as n → ∞ implies a conjecture of Erd˝osstating that the ternary expansion n n of 2 , (2 )3 omits a 2 for only finitely many n. Our result also implies the non-existence of “higher Weiferich primes”.

1. Introduction In [Erd79] Erd˝osconjectured that there are only finitely many powers of 2 whose ternary expansion omits a 2. We will refer to this conjecture as “Erd˝os’Conjecture”. Progress towards this conjecture has been in the form of upper bounds on the function n N(X) = #{n ≤ X : (2 )3 omits a 2}, which, according to Erd˝os’conjecture, should approach a constant. We explain the notation: for a prime q and a number N we will let (N)q denote the base q expansion of N. We view a base q expansion as a string of numbers from the set {0, 1, . . . , q − 1}. 1. The best known bound on N(X) is due to Narkiewicz [Nar80] who showed N(X) ≤ 1.62Xα0 , ≈ where α0 = log3(2) 0.630. We refer the reader to [Lag09] for readable proofs and Narkiewicz type bounds for certain dynamical generalizations of this problem. See in particular [Lag09, Theorem 1.4, Proof on page 20 of arxiv version] as well as a refinement of Erd˝o’sconjecture [Lag09, Conjecture E]. n For p and q distinct primes the present paper studies the structure of (p )q as q → ∞. Computer experimentation has lead the authors to believe that base q n digits of (p )q are equidistributed as n → ∞. We will now formalize this statement: n for a ∈ {0, . . . , q − 1} let dn(a) be the number of a’s appearing in (p )q. Conjecture 1. For all p and q distinct primes and every a ∈ {0, . . . , q − 1}, d (a) 1 (1.1) lim n = . →∞ n n logq(p) q Remark 2. The equidistribution statement (1.1) in the case p = 2 and q = 3 implies Erd˝os’conjecture. To see this, one argues by contrapositive: Suppose Erd˝os’conjecture were false. This says 0 is limit point of the sequence {dn(2)}n≥0. This implies equation (1.1) is false.

1 for example (3)2 = 11 1 2 TAYLOR DUPUY AND DAVID WEIRICH

proportion of 2's in base 3 expansion of 2^n

1

0.5

100 200 300 400 500

n

-0.5

-1

n Figure 1. The number of 2s in (2 )3

n When p = 3 and q = 2, Conjecture 1 says that the 0’s and 1’s appearing (3 )2 are equidistributed as n → ∞. Table 1 contains the first several members of the n sequence {(3 )2}n≥0.

n n n 3 (3 )2 dn(0) dn(1) 0 1 1 0 1 1 3 11 0 2 2 9 1001 2 2 3 27 11011 1 4 4 81 1010001 4 3 Table 1. The first few values of dn(a) for p = 3 and q = 2.

{ dn(2) } For p = 2 and q = 3 the graph of n n≥1 is provided in Figure 1. log3(2 ) The present paper proves an averaged version Conjecture (1.1). Before stating our result we fix some notation. Fix distinct primes p and q, a ≤ n ∈ { − } ′ m logq(p ) and a 0, . . . , q 1 . Define dn,m(a) and dn.m(a) to be the number n 2 of a’s in the first m digits and remaining digits of (p )q respectively , so that ′ dn(a) = dn,m(a) + dn,m(a). ⌈ n ⌉ Note that dn,m(a) = dn(a) when m = logq(p ) , the number of base q digits in n (p )q.

2 The first digit of (5)3 = 12 is 2. BITS OF 3n IN BINARY, WIEFERICH PRIMES AND A CONJECTURE OF ERDOS˝ 3

The goal of this paper is to prove the following result: Theorem 3. Let p and q be distinct primes and let a ∈ {0, . . . , q − 1}. (1) For every m ≥ 0 we have 1 ∑N d (a) 1 ∑hm d (a) (1.2) lim n,m = n,m N→∞ N m h m n=1 m n=1 m × where hm = #Hm and Hm = ⟨p⟩ ⊂ (Z/q ) . (2) In view of (1.2∑), the average proportion of a’s in the first m digits is 1 hm dn,m(a) Am(a) := . In the limit we have hm n=1 m

lim Am(a) = 1/q. m→∞ A trivial consequence of our averaged equidistribution result is the following:

dn(a) Corollary 4. The existence of the limit limn→∞ (without necessarily know- n logq (p) ing its value) when p = 2 and q = 3 implies Conjecture 1 and Erd˝os’conjecture. The proof of Theorem 3 goes a theorem about (Z/qm)× and makes contact with the theory of so called Wieferich primes. We introduce some terminology to explain the main lemma used to prove Theorem 3. Definition 5. A prime q is called (classical) Wieferich if one of the following equivalent conditions holds (1) 2q−1 ≡ 1 modulo q2. (2) The of 2 in (Z/q2)× is q − 1. (3) The multiplicative group generated by 2 modulo q is isomorphic to the multiplicative group generated by 2 modulo q2. Such primes were first investigated in [Wie09] in connection to Fermat’s Last Theorem. There he proved that if xq +yq = zq is a Fermat triple then q is Wieferich. It is an open problem whether there exists infinitely many Wieferich primes (even assuming the ). The infinitude of non Wieferich primes is implied by the ABC conjecture [Sil88]. The distribution of Wieferich primes is the subject of the Lang-Trotter conjecture. A review of these facts can be found in [Lan90]. We refer the reader to [CDP97] for details on numerical searches for Wieferich primes. We generalize the notion of a Wieferich prime for the purposes of our discussion. Definition 6. Let p and q be distinct primes. Let’s call a prime q p-Wieferich at r if the multiplicative group generated by p modulo qr is isomorphic to the group generated by p modulo qr+1. In this notation classical Weiferich primes are simply 2-Wieferich primes at 2. Note that table 1 for example shows that 2 is 3-Wieferich at 3 since the third column of digits is all zeros. We can now state our main Lemma which we used to prove Theorem 3. Theorem 7. Let p and q be distinct primes. #{n : q is p-Wieferich at n} < ∞. This theorem appears in the body as Theorem 14. The proof depends on a mod- Z× est generalization of the structure theorem for q-adic unit groups q . In particular we show that for m sufficiently large the groups generated by p modulo qm contain 4 TAYLOR DUPUY AND DAVID WEIRICH

∼ − subquotients of the form (1 + qsZ)/(1 + qmZ) = Z/qm s with s < m (see Theorem 14) Acknowledgments. We would like to that C. Moore, R. Lemke Oliver and Carl Pomerance for helpful comments and suggestions.

2. p-Adic units Let q be a prime. To describe the structure of (Z/qr)× it is sufficient and Z Z m conventient to describe the units of q = lim←− /q , the q-adic . This section aims to make standard theorems in elementary explicit for the purpose of later use.

Theorem 8 ([Ser73] Chapter 1). (1) The units of Zq are factor as a direct Z× · sum (written multiplicatively here): q = T U, with q T = {x ∈ Zq; x = x}

U = 1 + qZq. (2) We have the following isomorphisms: ∼ × (a) T = ({Z/q) , for all q Z ̸ ∼ ( q, +), q = 2 (b) U = . Z/2 ⊕ Zq, q = 2 Comments on Theorem 8 part (1) and part (2a). The group T is commonly referred ∼ to at the Teichmuller elements of Zq. The isomorphism T = Z/q is given by the so-called Teichmuller map described below. In what follows for x ∈ Zq we let x¯ denote its residue class in Z/q. Z × → Z× Definition 9. The Teichmuller map τ :( /q) q is defined by n τ(¯x) = lim xq . n→∞

One can extend this map to all of Zq and we note that τ(x) only depends on the residue class of x modulo q (it is a standard fact that this is well-defined). One notes that reduction modulo q and τ are inverse operations which tells us that the exact sequence × × (2.1) 1 → 1 + qZq → (Zq) → (Z/q) → 1 splits. This splitting proves part (1). □ Z× · Examining the proof, we observe that the direct sum decomposition q = T U in Theorem 8 part (1) can be made effective. Z× · Corollary 10. The factorization of q = T U in Theorem 8 can be made explicit. ∈ Z× For x q we have x = τ(x)(1 + qa(x)),

a(x) = (x/τ(x) − 1)/q. ∈ 1 + qZq The proof of part (2b) of Theorem 8 when q ≠ 2 amounts to showing that n (1 + qZq)/(1 + q Zq) is cyclic. The strategy is to pick some α ∈ 1 + qZq and show { qi }n−1 n α i=0 are distinct modulo q . This will follow from the contraction property of the qth power map below (Lemma 13). BITS OF 3n IN BINARY, WIEFERICH PRIMES AND A CONJECTURE OF ERDOS˝ 5

Our observation is that one can apply the same trick to smaller balls around the r identity of Gm(Zq), i.e. to α ∈ 1 + q Zq. The goal of the rest of this section is to prove the following strengthening of 2b of Theorem 8. Theorem 11. Suppose one of the following (1) q > 2, s ≥ 1 and r > s. (2) q = 2, s ≥ 2 and r > s. s s+1 Then for all α ∈ (1 + q Zq) \ (1 + q Zq) we have ⟨α⟩ = (1 + qsZ)/(1 + qrZ) ≤ (Z/qr)×. The group generated by α has order qs−r Remark 12. The isomorphism in part (2b) of Theorem 8 is the case s = 1 of Theorem 11. Explicitly, the isomorphism in part (2b) of Theorem 8 is given by x 7→ αx Lemma 13 (Contraction Property of qth Power Map). Let q ≥ 2 or s ≥ 2. s s+1 q s+1 s+2 α ∈ (1 + q Zq) \ (1 + q Zq) =⇒ α ∈ (1 + q Zq) \ (1 + q Zq).

In this lemma we view U = 1 + qZq as the unit ball around the identity of the Z Z× multiplicative group Gm( q) = q . Observing that we may decompose U into a annuli, ⨿ s s+1 U = 1 + qZq = (1 + q Zq) \ (1 + q Zq) s≥1 the theorem says that the map x 7→ xq contracts each annulus in this decomposition to the neighboring annulus one level closer to the identity.

Proof of Lemma 13. For any as ∈ Zq \ 0 one can verify the formulas s q s+1 (2.2) (1 + asq ) = 1 + as+1q , q ( ) (1 + a qs)q − 1 ∑ 1 q (2.3) a := s = aj qs(j−1) ∈ Z . s+1 qs+1 q j s q j=1 ∈ Z× ∈ Z× If as q then by examining (2.3) modulo q we see that as+1 q under the hypothesis that q ≥ 2 or s ≥ 2. s−1 In the case that q = 2 we have as+1 = as(1 + as2 ) using formula (2.3) and difference of squares. Here it is necessary to have s ≥ 2 as 1 + as may be congruent to 0 modulo 2. □ ≥ ∈ Z× Proof of Theorem 11. Suppose that r > s 2 and q is any prime. Let a1 q s and define α = 1 + q a1. For every t > 0 we have qt qt s+t s+t+1 (2.4) (α) = (1 + qa1) ∈ (1 + q Zq) \ (1 + q Zq) by the contraction property (Lemma 13). Consider the reduction of (2.4) modulo qr. Observe that r−s (α)q ≡ 1 mod qr r−s and α, αq, . . . , αq are distinct. r−s−1 Since #(1 + qsZ)/(1 + qrZ) = #Z/qr−s = qr−s and αq ≠ 1 modulo qr, α must have order qr−s as an element of (Z/qr)× and hence generate all of (1 + qsZ)/(1 + qrZ). □ 6 TAYLOR DUPUY AND DAVID WEIRICH

3. Proof of Theorem 7 Using the results we proved in the section on p-adic units (Section 2), we are now able to prove Theorem 7. Theorem 14 (No higher Weiferich primes). Let p and q be distinct primes. Let r Hr be the cyclic group generated by p modulo q . There exists some s (depending on p and q) such that for all r > s sufficiently large, the group Hr containes a ∼ − subquotient isomorphic to the cyclic group (1 + qsZ)/(1 + qrZ) = (Z/q)r s. In particular if Kr denotes the kernel of the natural quotient map Hr → Hr−1 then for all r > s the Kernel Kr is nontrivial (which means q is not p-Weiferich at r).

Proof. We would like the show Kr is nontrivial. Observe the following reduction. r Z× · Let Ur denote the reduction of U modulo q . By the factorization of q = T U (Theorem 8) it suffices to show that the kernel of Ur ∩ Hr → Ur−1 ∩ Hr−1 is nontrivial. n Since p is not torsion in Zq we have t t+1 1 ≠ α := p/τ(p) ∈ (1 + q Zq) \ (1 + q )Zq. For some t depending on p and q (c.f. corollary 10). We claim that some power of α is congruent to 1 modulo q2. Case q ≠ 2: Raising α to the power q will achieve this by the contraction lemma (Lemma 13). Case q = 2 : If t > 1 we are ok. Suppose now that t = 1. Write α = 1 + 2a. n Suppose n = 0 mod 4 and n > 3. We will show that (1 + 2a) ∈ (1 + 4Z2). In this situation ( ) n (2a)j = 0 mod 4 j for j ≥ 3. We now have ( ) ( ) n n αn = 1 + 2a + (2a)2 mod 4. 1 2 Since ( ) ( ) n n 2a + (2a)2 = 2n(a + (n − 1)a2) = 0 mod 4 1 2 n n we can see that α = (1 + 2a) ∈ 1 + 4Z2. (It suffices to take n = 4) This shows the claim. We can now suppose there exists some power of α, which we will call β which is s s+1 a member of (1 + q Zq) \ (1 + q Zq) for some positive s. We have ⟨β⟩ = (1 + qsZ)/(1 + qrZ) for all r > s by Theorem 11. Hence for all r > s, we have s r s−r #(1 + q Zq)/(1 + q Zq) = q , by Theorem 11 the surjective map s r s r−1 (1 + q Zq)/(1 + q Zq) → (1 + q Zq)/(1 + q Zq) has nontrivial Kernel of size Z/q. This proves that Kr is nontrivial for every r > s > 2. □ BITS OF 3n IN BINARY, WIEFERICH PRIMES AND A CONJECTURE OF ERDOS˝ 7

4. Proof of Theorem 3 n In what follows it will be convenient to think of elemenets in Z/q or Zq = Z n ∈ { − } ←−lim /q in decimal form. For a sequence of elements ai 0, . . . , q 1 we use the notation 2 n (an . . . a2a1a0)q := a0 + a1q + a2q + ··· + anq .

Again, the digits of (an . . . a2a1a0)q are ordered with a0 being the first digit and a1 being the last digit.

Lemma 15. Fix p and q distinct primes. Let Hm be the multiplicative group generated by p in (Z/qm)×. n (1) For every m the first m digits in the sequence (p )q is periodic in n. The period is the∑ order of the subgroup∑Hm. 1 N dn,m(a) 1 #Hm (2) limN→∞ = dn,m(a) N n=0 m #Hm i=1 Proof. The first m digits of a number a ∈ N can be determined by a mod qm. Since m × hm a ∈ (Z/q ) , the group of units, there exists some number hm such that p ≡ 1 mod qm. Part (2) follows from part (1). □ Remark 16. In the statement of Theorem 3, we used the notation ∑N 1 dn,m(a) Am(a) = lim . N→∞ N m n=0 This will appear again later.

Let p and q be distinct primes and let Hm be the group generated by p in (Z/qm)×. Define Km = ker(Hm → Hm−1). Since m × m−1 × m−1 m ∼ ker((Z/q ) → (Z/q ) ) = {1 + q a mod q : a ∈ Z/q} = Z/q.

We know Km is either isomorphic to Z/q or 1. This means that #Km = 1 or #K = q. As sets we have the following description of K : m { m {00 ··· 01q, 10 ··· 01q,..., (q − 1)0 ··· 01q}, #Km = q (4.1) Km = . {00 ··· 01q}, #Km = 1 We will show that one can determine inductively the total number of bits equal to n m a in the sequence {p mod q } given the behavior of Km. The following notation will become useful:

hm := #Hm,

km := #Km, ∑hm tm(a) := dn,m(a), for a ∈ {0, . . . , q − 1}. n=1 ′ n Observe that tm(a) is just the total number of a s appearing in the sequence {(p m }hm mod q )q n=1. Also observe that we also have the equiality Am(a) = tm(a)/mhm. Here Am(a) was defined in part (2) of Theorem (3) to be the average number of a’s in the first m bits of pn as n → ∞. 8 TAYLOR DUPUY AND DAVID WEIRICH

The following Lemma says we can determine distribution digits in Hm from the distribution of digits in Hm−1.

Lemma 17. In the case km = 1 we have

tm(a) = tm−1(a),

hm = hm−1.

In the case km = q ee have

tm(a) = qtm−1(a) + hm−1,

hm = qhm−1. e Proof. If h ∈ Hm−1 lets define h ∈ Hm to be lift of h where we tack a zero on the end. Observe that we have the partition ∪ e Hm = hKm.

h∈Hm−1

• If #Km = 1 then every element of Hm (viewed as a string) is an element of Hm−1 (as string) just with an extra 0 appended to the end. The equality tm(a) = tm−1(a) is a trivial consequence of this. • Suppose #Km = q. The equality hm = qhm−1 is trivial. We now work on showing tm(a) = qtm−1(a) + hm−1. Let bm−2 . . . b11q ∈ Hm−1 and m−1 c0 ... 01q = (cq + 1)q ∈ Km. We have

(0bm−2 . . . b1b0)q · (c0 ... 01)q = (bm−1bm−2 . . . b1b0)q

bm−1 = c · b0 mod q

We know that the b0’s are equidistributed over {1, . . . , q − 1} in Hm−1 and that c ∈ {0, . . . , q − 1} uniquely determines the element of Km. For each element of (bm−2 . . . b1b0)q ∈ Hm−2 we get a whole set of ele- ments {(cb0)bm−2 . . . b1b0 : c ∈ Z/p}. × If c = 0 then cb0 = 0, and this only happens once. Since (Z/p) is a group × × {a : a ∈ (Z/p) } = {a · b0 : a ∈ (Z/p) } this implies that −1 { ∈ Z } πm,m−1(bm−2 . . . b1b0) = bm−1bm−2 . . . b0 : bm−1 /p . The result follows from the equality ∪ −1 Hm = πm,m−1(h). h∈Hm−1 (Alternatively, one can argue from periodicity). □

We now derive some formulas for Am(a). The main idea of this proof is that n km = q pulls digits of p toward equidistribution and km = 1 pulls the distribution n of the bits of p toward having more zeros. In the situation where km = q the “new bit” is completely equidistibuted. Note in particular that for all m we have 0 ≤ Am(a) ≤ 1 from which it is easy to see that if km = q “pushes” A(a, m) towards equidistibution 1/q. BITS OF 3n IN BINARY, WIEFERICH PRIMES AND A CONJECTURE OF ERDOS˝ 9

Lemma 18. (1) For m > 2 we have ( ) 1 1 A (a) = 1 − A − (a) + (k − 1) m m m 1 q(q − 1)m m ¯ ¯ (2) Define km = km − 1 for m ≥ 2 and define k1 = q. For all a ∈ {1, . . . , q − 1} we have 1 k¯ + k¯ + ··· + k¯ (4.2) A (a) = 1 2 m . m q(q − 1) m Proof. We analyze the formula by cases: ∼ km = 1: (the density of a’s in Hm is strictly decreasing). We have Hm = Hm−1 and that elements of Hm−1 give an element of Hm by just tacking a zero at the end. We have

tm(a) = tm−1(a)

hm = hm−1 which implies ( ) tm(a) m − 1 tm−1(a) 1 Am(a) = = · = 1 − Am−1(a). mhm m (m − 1)hm−1 m

km = q: (density of a’s will approach the equilibrium) We have

tm = qtm−1 + hm−1

hm = qhm−1 which gives ( ) tm qtm−1 + hm−1 1 1 Am(a) = = = 1 − Am−1(a) + . mhm mhm m qm We now solve the recurrence relation to give the formula in part 2. This proof is by induction. Fix some a ∈ {1, . . . , q − 1}. Note that A1(a) = 1/(q − 1) since p generates the unit group mod q which has (q − 1) elements, so the base case is trivial. We now do the inductive step and suppose the formula holds for m and prove it for m + 1. n k¯ A (a) = A (a) + m+1 m+1 m + 1 m q(q − 1)(m + 1) 1 [ ] k¯ = k¯ + k¯ + ··· + k¯ + m+1 q(q − 1)(m + 1) 1 2 m q(q − 1)(m + 1) 1 k¯ + k¯ + ··· + k¯ = 1 2 m+1 , q(q − 1) m + 1 which proves our result. □ ∑ 1 hm dn,m(a) Remark 19. Note that (1) shows that Am(a) = only depends hm n=1 m on whether a is zero or nonzero. This follows from A1(a) = 1/(q − 1) for all a ∈ {1, . . . , q − 1} as p generates (Z/q)× together with the recurrence. ∑ Supposing Am(a) was completely independent of a we would have qAm(a) = q−1 a=0 Am(a) = 1 which implies A(m) = 1/q. This would give an easy proof of our result. 10 TAYLOR DUPUY AND DAVID WEIRICH

We have now related the distribution of bits to the condition about “Weiferich primes”. Lemma 20. With the notation as above we have ∑m 1 ¯ lim Am(a) = 1/q ⇐⇒ 1 = lim kj. m→∞ m→∞ m(q − 1) j=1

Proof. Follows directly from Lemma 18 part (2) and the definition of Am(a). □ ∑ 1 n ¯ We now prove that limn→∞ n(q−1) j=1 kj = 1. To do this we need to study the multiplicative group generated by p modulo qr. ¯ Theorem 21. With the notation as above and kj = #Kj − 1 we have ∑n 1 ¯ lim kj = 1. n→∞ n(q − 1) j=1 In particular this implies

lim Am(a) = 1/q m→∞ for all a ∈ {0, . . . , q − 1}.

j j−1 ∼ Proof. Since Kj ≤ ker(Z/q → Z/q ) = Z/q it can only have order q or 1. By ¯ 14, Kj is nontrivial for all but a finite number of j and hence kj must be equal to q for all but a finite number of j. The second part follows from Lemma 20. □

5. Discussion Let p and q be distinct primes and consider powers of p in base q as usual. Remark 22. Let f : N → N. Let q be a prime. We will introduce temporary notation for this remark: for a ∈ {0, . . . , q − 1}, take dn(a) to be the number of n a’s appearing in (f(n))q (this paper is mostly concerned with f(n) = p ). For “generic” exponential diophantine functions one expects (from experiments) that d (a) (5.1) lim n = 1/q. →∞ n logq(f(n)) For example, when p, l and q are distinct primes one expects (5.1) for f(n) = pn+ln. Another example is when f(n) = pn+g(n) where g(n) is a . More n | | n → ∞ generally, if f(n) = p + g(n) where logq g(n) = o(logq(p )) as n , the truth of (5.1) with f(n) = pn implies the truth of equation (5.1) for f(n) = pn + g(n). This is because g(n) will affect only a density zero proportion of the digits in the limit n → ∞. It is unclear how to characterize the of exponential diophantine functions should satisfy (5.1) even conjecturally. Figure 22 provides a graph of a sequence n {dn(a)} when f(n) ≠ p . Remark 23. Our result in the case that p = 2 and q = 3 together with bounds of the form N(X) ≤ βXα for positive constants β and α do not appear strong enough to prove Erd˝os’conjecture. BITS OF 3n IN BINARY, WIEFERICH PRIMES AND A CONJECTURE OF ERDOS˝ 11

0.7

0.65

0.6

0.55

0.5

0.45

0.4

0.35

0 100 200 300 400 500 600

Figure 2. FIX ME

Remark 24. The exact sequence 1 → (1 + qZ)/qm → (Z/qm)× → (Z/qm−1)× → 1 can be replaced by the sequence 1 → (1 + qrZ)/(qr+s) → (Z/qr+s)× → (Z/qs)× → 1 whenever r ≤ s (a nice choice is r = s = 2l). This allows us to understand half of the digits of (pn) rather than a single bit as coming from an abelian group q,r+s ∼ since (1 + qrZ)/(1 + qr+sZ) = Z/qs as abelian groups. m × Let hm be the order of p in (Z/q ) . We know m hm = Cq for some constant C and sufficiently large m. This means that the largest number m m × q qm m in ⟨p⟩ ⊂ (Z/q ) is roughly p and (p )q has length roughly q . This means we may hope to undersatnd (pn) using group theoretic methods (which is still q,logq (n) n a zero density proportion of the total digits in (p )q). The authors do not know currently if

dn,log (n)(a) 1 (5.2) lim q = →∞ n logq(n) q or if ∑N 1 dn,log (n)(a) 1 (5.3) lim q = . N→∞ N log (a) q n=1 q Note that Equation 5.2 implies Erd˝os’conjecture.

References

[CDP97] Richard Crandall, Karl Dilcher, and Carl Pomerance. A search for wieferich and wilson primes. Mathematics of Computation of the American Mathematical Society, 66(217):433–449, 1997. 12 TAYLOR DUPUY AND DAVID WEIRICH

[Erd79] P Erd˝os.Some unconventional problems in number theory. Acta Mathematica Hungar- ica, 33(1):71–80, 1979. [Lag09] Jeffrey C Lagarias. Ternary expansions of powers of 2. Journal of the London Mathe- matical Society, 79(3):562–588, 2009. [Lan90] Serge Lang. Old and new conjectured diophantine inequalities. Bulletin of the American Mathematical Society, 23(1):37–75, 1990. [Nar80] W Narkiewicz. A note on a paper of h. gupta concerning powers of 2 and 3, univ. Beograd. Publ. Elecktrotech. Fak. Ser. Mat. Fiz, (678-715):173–174, 1980. [Ser73] Jean-Pierre Serre. A course in arithmetic, volume 97. Springer-Verlag New York, 1973. [Sil88] Joseph H Silverman. Wieferich’s criterion and the¡ i¿ abc¡/i¿-conjecture. Journal of Number Theory, 30(2):226–237, 1988. [Wie09] ArthurP Wieferich. Zum letzten fermatschen theorem. Journal f¨urdie reine und ange- wandte Mathematik, 136:293–302, 1909.