arXiv:1306.2005v1 [math.NT] 9 Jun 2013 olyscongruence. Morley’s osehle’ congruence. Wolstenholmes’s xssprimes exists Definition. for following. fact the the motivate characterize congruences these could number (mod eprove we suorm fodrk order of fodr1ta r o oeso rms ny3aekono Wolste of known theorems. Beforeha are congruences type. 3 classical Morley’s only few of a primes, identified of of been overview powers yet have not none are absolutely that 1 order of Remark re )iff 2) order 2 p OSEHLEADMRE,PIE N AND PRIMES MORLEY, AND WOLSTENHOLME p rmtetocnrecshr elwvldin valid bellow here congruences two the From − ntesm en replacing vein, same the In rsnl h nyWltnom rmskonae183ad212467 and 16843 are known primes Wolstenholme only the Presently A) − )Fra d number odd an For B) TETOGT FOLLOWING ATFERTHOUGHTS 1 1  n ≡ eoe h utpiaieivreof inverse multiplicative the denotes p k n )]. 1 ilawy eoeapiegetrta n yasih bs fnota of abuse slight a by and 3 than greater prime a denote always will (mod 1 p . sdfie sa as defined is 2 is eitoueafwnttosadrcl oebscfacts: basic some recall and notations few a introduce we First p saMre suorm o re )iff 2) order (of pseudoprime Morley a is prime A saWltnom rm iff prime Wolstenholme a is p o hc hytk lc in place take they which for p W 4 rset ( [respect. ) n = p sacle a called a is  if ] osehlepedpieo re =,2o 3 or 2 k=1, order of pseudoprime Wolstenholme 1. ( 8 1895] [8, 2 − n n n 1) re hsoia)overview (historical) brief A − − 2 euetefloigabbreviations: following the use we n n ( − 1 p RMSADTI PRIMES TWIN AND PRIMES − 1 − − 1 p 1  1) 1)  ya d integer odd an by / 1,1862] [11, If ( OLYSOHRMIRACLE OTHER MORLEY’S 2 ≡ p HITA AEBI CHRISTIAN and osehleprime Wolstenholme − · > p  1) (mod 1 / p p 2 − − 2 · 3 1 1 p M  ( spiethen prime is i p saMre prime Morley a is 1 n Z − p modulo If ≡ − 1) p ( = n 1 4 / p 4 k . 2 rpc.( [repect. ) p  Z spiethen prime is n − − ≡ p 1 1) fbigpie?Teetoquestions two These ? prime being of 3 p 2 p 4 ti ut aua owne fthere if wonder to natural quite is it n n (mod , p saWltnom suorm (of pseudoprime Wolstenholme a is − 2 n okn in working and , − p 1 1 2  rsetvl a [respectively or (mod n n p − − − 2 p 3 ocrigpseudoprimes Concerning . 1 3 ) 1) 1 codn otecontext. the to according , . &  ( p 2 p n p 4 − AAA NUMBERS, CATALAN − · − ]adacmoieodd composite a and )] 1 4 1) 1 dw rsn brief a present we nd  1 / − 2 ≡ hlestp and type nholme’s n · 7.I hsnote, this In [7]. 9 (mod 1 olyprime Morley [respect. Z ( n n n − − , 1) 1 Z / 2 n  2 p ≡ 3 Morley tion, or ) 4 Z n if ] − n 1 i 3 1 2 CHRISTIAN AEBI

Z∗ C) The function inv(x)=1/x is a group isomorphism on p, which of course admits φ(p − 1) primitive elements, one of which we shall denote by g. D) The set of quadratic residues, QR, is a multiplicative subgroup of index 2. Notice 2 2 g 6≡ 1 (mod p) since p > 3. Hence g i∈QR i = j∈QR j ≡ 0 (mod p). In n general, if NR is the group of n’th power residues and n|p − 1 then g i∈NR i = j ≡ 0 (mod p) P P j∈NR P 1.1. WolstenholmeP revisited anew. 1 Using the preceding remarks we show:

p−1 1 Lemma 1 (Wolstenholme’s theorem). If p is prime and p > 3, then i=1 i ≡ 0 (mod p2). P Proof.

p−1 p−1 p−1 p−1 2 2 2 1 1 1 1 −1 ≡ + ≡ p ≡ p ≡ −p i ≡ 0 (mod p2) i i p − i i(p − i) i2 i=1 i=1 i=1 i=1 i∈QR X X X X X 

Z∗ We extend the preceding theorem by using the fact that p is cyclic and therefore p−1 1 p−1 n p−1 jn admits a primitive element g. We note first that i=1 in ≡ i=1 i ≡ j=1 g . Now in Z∗, ∪p−1{gjn} forms a (cyclic) subgroup. Either p − 1|n and in that case each element p j=1 P P P jn p−1 1 g ≡ 1, by Fermat’s theorem, and therefore i=1 in ≡ p − 1 (mod p). Otherwise there p−1 jn j0k Z exists an j0|p − 1, 0 < j0 < p − 1 and ∪j=1{g }≡{g ; k ∈ and j0|p − 1} is a non Z∗ P trivial (=6 1) subgroup of p. Using the classical argument on geometrical series we see j0 (p−1)/j0 j0n (p−1)/j0 j0n g j=1 g ≡ j=1 g ≡ 0 (mod p). We have proved the following lemma, a particular case studied by Glaisher [3, 1901 pg. 329-331], that will be used frequently hereP on : P −1; p − 1 is a factor of n Lemma 2. (a) For n ∈ Z we have p−1 in ≡ (mod p) i=1 0; otherwise.  Z (p−1)/2 n (b) If n ∈ is even and p − 1 is notP a factor of n then i=1 i ≡ 0 (mod p)

n n (p−1)/P2 n 1 p−1 n Proof. Note that for n even i ≡ (p − i) therefore i=1 i ≡ i=1 i ≡ 0 (mod p) 2  P P Before proving Wolstenholme’s congruence we observe that:

p−1 1 p−1 1 2 p−1 1 Remark 2. 2 1≤i

Proof of Wolstenholme’s congruence. We start by developing the binomial coefficient in Z 3 p , then use Remark 2 and conclude with Wolstenholme’s theorem. p−1 2p − 1 (1 − 2p)(2 − 2p) ... ((p − 1) − 2p) 2p W = =(−1)p−1 = 1 − p p − 1 1 · 2 ... (p − 1) i   i=1   p−1 p−1 p−1 Y 1 1 1 ≡ 1 − 2p +4p2 + i ij i2 i=1 1≤i

2p−1−1 1.2. Sylvester’s, Morley’s & Lehmer’s congruences. Define q = p as the Fer- mat quotient for a given odd prime p. One can easily verify that: 4p−1 = (1+ pq)2. Since p p p p−1 the binomial coefficient k is divisible by p (for k

1 1 1 2q ≡ 2 1+ + + ... + (mod p) which can also be written 3 5 p − 2   (p−1)/2 1 − 2q ≡ (mod p). referred to as (SC) or Sylvester’s congruence i i=1 X n−1 p−1 2 Z 2 On the other hand, for odd n developing (−1) (p−1)/2 in p we obtain: 1+2p (1+1/3+1/5+1/(p − 2)) (mod p2) In other words :  p−1 2 2 4 Mp ≡ 1+2pq ≡ (1 + pq) (mod p ). The previous congruence is a (mod p2) version of Morley’s congruence that can be for- 3 mulated with our notation, Mp ≡ 1 (mod p ). In [2] we presented a perfectly elementary proof of Morley’s congruence. Here bellow we show how it is equivalent to Lehmer’s p−1 2 1 2 2 congruence[6, 1938 pg 358]: i=1 i ≡ −2q + pq (mod p ). P 4 CHRISTIAN AEBI

p−1 M 3 2 1 2 2 Theorem 1. p ≡ 1 (mod p ) ⇔ i=1 i ≡ −2q + pq (mod p )

p−1 Z 3 Proof. We begin by developing 4 PMp in p , use Remark 2, divide by p and end with (SC) 2 (p−1)/2 (p−1)/2 p − 1 1 p2 1 (−1)(p−1)/2 ≡ 1 − p + (mod p3) ⇔ p−1 i 2  i  2 i=1 i=1   X X 2 (p−1)/2 (p−1)/2  1 p 1 2q + pq2 ≡ − + (mod p2) ⇔ i 2  i  i=1 i=1 X X (p−1)/2   (p−1)/2 1 1 2q + pq2 ≡ − +2pq2 (mod p2) ⇔ ≡ −2q + pq2 (mod p2) i i i=1 i=1 X X 

2 Z 4 2. Mp in p The object of this section is to prove the following

2 p −1M 2 2 1 3 2 3 2 4 Theorem 2. 4 p ≡ (1 + pq) + 12 p Bp−3 +2p q +3p q (mod p )

We begin by developing Mp2 in Zp4

(p−1)/2 (p−1)/2 (p2−1)/2 p2−1 1 2 1 1 3  1 1  4 M 2 ≡ 1−p +p − +p − p i  ij i  ij ijk i=1 i

(p−1)/2 (p−1)/2 (p−1)/2 (p−1)/2 (p−1)/2 (p−1)/2 (p−1)/2 1 1 1 1 1 1 1 · · ≡ +3 +3 +6 i j k i3 ij2 i2j ijk i j i 1≤i

(p−1)/2 (p−1)/2 (p−1)/2 (p−1)/2 1 1 S (j) B (j) − B ≡ ip−2 ≡ p−2 ≡ p−1 p−1 ij2 j2 j2 j2(p − 1) 1≤i

For all odd i, except i = p − 2, we have Bp−1−i = 0, and all even i =6 2 , remark 2 gives a summand equivalent to 0 if 1 ≤ j ≤ (p − 1)/2. Therefore the previous expression is:

(p−1)/2 (p−1)/2 p−1 (p−1)/2 p−1 (p−1)/2 1 1 ≡ B jp−4 + B ji−2 ≡ − − B ji−2 1 p−1−i 2 j3 p−1−i 2≤j 2≤j i=2 2≤j i=2 2≤j X X X2|i X X2|i X (p−1)/2 p−1 (p−1)/2 p−1 1 1 3 ≡ − − B ji−2 + B + B 2 j3 p−1−i p−1−i 2 p−3 2≤j i=4 1≤j i=4 X X2|i X X2|i

Now the second big expression is ≡ 0 and using theorem 5.2 (c) [9] we get:

p−1 p−1 1 5 1 3 ≡ + B + B ≡ + B + B 2 2 p−3 p−1−i 2 2 p−3 p−1−i i=4 i=2 X2|i X2|i

m m+1 Using the fact that k=0 k Bk = 0 and that for odd k’s (except k = 1) we have Bk = 0, we get P  p−3 1 p−3 1 Lemma 3. a) k=0 Bk ≡ − 2 (mod p) b) k=0 kBk ≡ − 2 (mod p) 2|k 2|k p−3 1 p−3 c) k=0(p−k)BPk ≡ 2 (mod p) therefore subtractingP a) from c) gives k=0(p−k−1)Bk ≡ 2|k 2|k 1 (modP p) P Proof. For a) take m = p − 2, for b) take m = p − 3 and use elementary properties of binomial coefficients in Zp 

Finally we obtain :

(p−1)/2 1 3 Proposition 1. 1≤i

(p−1)/2 1 1 Proposition 2. 1≤i

Proof. (p−1)/2 (p−1)/2 (p−1)/2 (p−1)/2 1 1 S (j) B (j) − B ≡ ip−3 ≡ p−3 ≡ p−2 p−2 i2j j j j(p − 2) 1≤i

Putting everything together we finally obtain

1 2 4 3 Corollary 1. 1≤i

(p−1)/2 (p−1)/2 (p−1)/2 (p−1)/2 P 1 Z 2 2 1 1 1 To evaluate Sb = i

(p−1)/2 (p−1)/2 (p−1)/2 P 1 1 −mp(mp − i) P P1 − ≡ ≡ −mp ≡ 0 (mod p2) mp + i i i(mp + i)(mp − i) i2 i=1 i=1 i=1 X X X (p−1)/2 1 2 2 by corollary 1. Therefore Sc ≡ i=1 i ≡ −2q + pq (mod p ) by Lehmer’s theorem. P WOLSTENHOLME AND MORLEY, PRIMES AND PSEUDOPRIMES 7

3. Wolstenholme pseudoprimes The aim of this section is to characterize Wolstenholme pseudoprimes of the form p2 . Developing the following product in Zp4 one obtains:

p2−1 p−1 2p2 − 1 2p2 2p W 2 = ≡ 1 − · 1 − p p2 − 1 i j   i=1   j=1   (i,pY)=1 Y

p−1 p−1 p2−1 p−1 1 1 1  1 1  ≡ 1 − 2p +2p2 2 −  +4p3 · − 2 j ij i ij ijk j=1 1≤i

2 Corollary 2. p is a Wolstenholme pseudoprime iff p|Bp−3 iff by Corollary [7] p is a Wolstenholme prime. 2 p −1 Z 4 Developing 4 in p we get

2 Lemma 4. 4p −1 ≡ (1 + pq)2 +2p2q +3p3q2 (mod p4) Proof. p−1 2 − 1 2 q = ⇔ 4p−1 = (1+ pq)2 ⇔ 4p = 4(1+ pq)2 ⇔ 4p =4p(1 + pq)2p p 2 2 ⇔ 4p −1 =4p−1(1 + pq)2p ⇔ 4p −1 = (1+ pq)2((1 + pq)p)2 p 2 p2−1 2 p i ⇔ 4 =(1+ pq) (pq) expanding in Z 4 i p i=1   ! X 2 2 1 ⇒ 4p −1 ≡ (1 + pq)2 1+ p2q + p3(p − 1)q2 2   ≡ (1 + pq)2 +2p2q +3p3q2 (mod p4)

 8 CHRISTIAN AEBI

Therefore implying as corollary Theorem 4 (Main theorem). p2 is a Morley pseudoprime iff p2 is a Wolstenholme pseu- doprime iff p is a Wolstenholme prime iff p is a Morley prime

4. On the (quasi) nonexistence of Wolstenholme pseudoprimes product of exactly 2 primes The next two sections are completely inspired by [1]. It might be useful to distinguish 3 2 W3-pseudoprimes (Wr ≡ 1 (mod r )) and W2-pseudoprimes (Wr ≡ 1 (mod r )) for a composite r.

3 Lemma 5. If p> 3 is prime and m is an odd integer then Wpm ≡ Wm (mod p ) Proof. We develop the first product then use remark 2, followed by lemma 1

mp−1 ⌊(mp−1)/p⌋ 2mp 2m W ≡ 1 − · 1 − mp i j j=1 (i,pY)=1   Y  

mp−1 mp−1 m−1 1 2 2 1 2m 3 ≡ 1 − 2mp +4m p  · 1 − ≡ Wm (mod p ) i ij j (i,p)=1 (j,p)=(i,p)=1 j=1    X 1X≤i

Lemma 6 (copied almost entirely from ”Catalan numbers...” [1]). If r and s are distinct 3 3 odd primes > 3 then Wrs ≡ WrWs ≡ Wr + Ws − 1 (mod r s )

Proof. Suppose that r, s are distinct odd primes. From the previous lemma, Wrs ≡ Ws 3 3 3 (mod r ). So, as Wr ≡ 1 (mod r ), we have Wrs ≡ WrWs (mod r ). Similarly, Wrs ≡ 3 3 3 WrWs (mod s ). Thus Wrs ≡ WrWs (mod r s ). Furthermore, since Wr − 1 ≡ 0 3 3 3 3 (mod r ) and Ws − 1 ≡ 0 (mod s ), one has (Wr − 1)(Ws − 1) ≡ 0 (mod r s ), and so 3 3 WrWs ≡ Wr + Ws − 1 (mod r s ), as required.  Using the previous lemmas we obtain:

3 3 Lemma 7. If r and s are distinct odd primes then Wrs ≡ 1 (mod r s ) iff Wr ≡ 1 3 3 (mod s ) and Ws ≡ 1 (mod r ) The proof being identical with the one given in ”Catalan numbers...”

4.1. Developing Wn. For n> 1 we have

(2n − 1)(2n − 2)(2n − 3) ... (2n − (n − 1)) (2n − 1)(2n − 2) (2n − 1) W = = W =4 W n (n − 1)(n − 2) ... 3 · 2 · 1 (2n − n)(n − 1) n−1 2n n−1 WOLSTENHOLME AND MORLEY, PRIMES AND PSEUDOPRIMES 9

Therefore for n > j

j 2n − 2i +1 W =4jW n n−j 2n − 2i +2 i=1 Y W 1 Actually if we define 0 = 2 then the previous recurrences relations are valid for all n ≥ 1. Maintaining this convention then we also obtain: Lemma 8. If p is prime and 0

−1 2n p W ≡ 4 (−1) 2 W p−1 (mod p) n 2 −n Proof. When I find the time...  Theorem 5. For p an odd prime and n>p let n = mp + r be the Euclidean division of n by p then

(a) if r =0 then Wn ≡ Wm (mod p) (see lemma 6) (b) if r> (p − 1)/2 then Wn ≡ 0 (mod p) (c) else (if 0

Suppose sr is a WPP of any order, with s>r then using the preceding lemmas we get

s−r 2s − 2i +1 s−r 2s − 2i +1 1 ≡ W ≡ W ≡ 4s−rW ≡ 4s−r (mod r3,2 or1) rs s r 2s − 2i +2 2s − 2i +2 i=1 i=1 Y Y

Corollary 3. If s = r +2 are twin primes then rs is not a WPP

Proof. Otherwise, working in Zr we would have (using the previous result) 3 1 1 ≡ 42 · · ≡ 2 (mod r) ⇔ r|1 absurd ! 4 6 

Corollary 4. If s = 2r +1 is a Sophie Germain pair then their product rs is not a Wolstenholme pseudoprime.

Z r+1 r+1 4r+3−2i Proof. Like above, in r we would have (using the previous result) 1 ≡ 2 i=1 2r−i (mod r) Using Fermat and Wilson, (except on the non invertible elements) we get 1 ≡ 2 1 3 (−1) Q 2 · 1 · 2 (−1) (mod r) ⇔ 1 ≡ 6 (mod r) ⇔ r = 5 which when tested doesn’t work (even if 2 · 5 + 1 = 11 is prime)  10 CHRISTIAN AEBI

5. On the nonexistence of Morley pseudoprimes product of exactly 2 primes It seems that all the results of the preceding section can be adapted to Morley pseudo- primes 3 Lemma 9. If p> 3 is prime and m is an odd integer then Mpm ≡ Mm (mod p ) Proof. When I find the time (but really like the analogue lemma for WPP) 

Lemma 10. If r and s are distinct odd primes > 3 then Mrs ≡ MrMs ≡ Mr + Ms − 1 (mod r3s3) Proof. Following exactly the same argument as the analogue lemma  Using the previous lemmas we obtain: 3 3 Lemma 11. If r and s are distinct odd primes then Mrs ≡ 1 (mod r s ) iff Mr ≡ 1 3 3 (mod s ) and Ms ≡ 1 (mod r ) The proof being identical with the one given in ”Catalan numbers...”

5.1. Developing Mn. For n> 1 we have

n+1 n−1 (n − 1)(n − 2)(n − 3) ... 1 n − 2 1−nM 2 2 M 4 n =(−1) n−1 = − n−2 1 · 2 · 3 ... 2 4 n − 1 Therefore for n > j j 1 j n − 2i 41−nM = − M n 4 n−2j n − 2i +1 i=1   Y Lemma 12. If p is prime and 0 p let n = mp + r be the Euclidean division of n by p then

(a) if r =0 then Mn ≡ Mm (mod p) (see lemma 10) (b) if m is odd then Mn ≡ 0 (mod p) (c) else (if m is even) then Mn ≡ Mm+1Mr (mod p) Proof. I’ll write it down ...when I find the time !  Using the above result our calculations show that there are no Morley pseudoprimes less than 108, and if we consider only those of the form rs, where r, s are distinct primes, then there are none smaller than 1010. Recall that 29×937, 787×2543 and 69239×231433 are the only Wolstenholme pseudoprimes known of the preceding form. At first sight it WOLSTENHOLME AND MORLEY, PRIMES AND PSEUDOPRIMES 11 seems therefore Morley pseudoprimes are rarer than Wolstenholme’s, and it is tempting to believe there might not be any at all (that are not powers of primes)! Of ourse it’s a long way to infinity and so many things might happen on the way ... References 1. Christian Aebi and Grant Cairns, Catalan Numbers, Primes and Twin Primes, Elemente der Mathe- matik, (2008), vol 63. 2. Christian Aebi and Grant Cairns, Morley’s other miracle, Math. Mag. 85 (2012), no. 3, 205-211. 3. Glaisher, J.W.L.,On the residues of the sums of the products of the first p − 1 numbers and their powers, to the modulus p2 or p3,The Quarterly Journal of pure and applied mathematics,1901, pg. 271-305 4. Gessel, Ira, Wolstenholme Revisited, Amer. Math. Monthly, Vol 105, 1998, pg. 657-658 5. Ireland, Keneth and Rosen, Michael, A classical introduction to number theory, Springer, 1998, xiv+389 6. Lehmer, Emma, On congruences involving Bernoulli numbers and the quotients of Fermat and Wilson Annals of Mathematics. Second Series, 1938, Vol 39, pg 350-360 7. Richard, McIntosh, On the converse of Wolstenholme’s theorem, Acta Arithmetica, LXXI.4, pg 381- 389 8. Morley, F., Note on the congruence 24n ≡ (−)n(2n)!/(n!)2, where 2n + 1 is a prime, Annals of Mathematics, Vol 9, 1894/95, pg 168-170 9. Sun, Zhi-Hong, Congruences concerning Bernoulli numbers and Bernoulli polynomials, Discrete Ap- plied Mathematics 1, Vol 105, 2000, pg 193-223. 10. Sylvester, J, Note relative aux communications faites dans les s´eances du 28 Janvier et 4 F´evrier 1861., C. R. Acad. Sci. Paris, Vol 52, 1861, pg 307-308. 11. Wolstenholme, J, On certain properties of prime numbers, Quarterly Journal of Mathematics, Vol. 5, 1862,pg 35-39

College` Calvin, Geneva, Switzerland 1211 E-mail address: [email protected]