Wilson’s theorem modulo p2 derived from Faulhaber polynomials
Claire Levaillant December 17, 2019
Abstract. First, we present a new proof of Glaisher’s formula dating from 1900 and concerning Wilson’s theorem modulo p2. Our proof uses p-adic numbers and Faulhaber’s formula for the sums of powers (17th century), as well as more recent results on Faulhaber’s coefficients obtained by Gessel and Viennot. Second, by using our method, we find a simpler proof than Sun’s proof regarding a formula for (p − 1)! modulo p3, and one that can be generalized to higher powers of p. Third, we can derive from our method a way to compute the Stirling numbers p modulo p3, thus improving Glaisher and Sun’s own results from 120 s years ago and 20 years ago respectively. Last, our method allows to find new congruences on convolutions of divided Bernoulli numbers and convolutions of divided Bernoulli numbers with Bernoulli numbers.
1 Introduction
The paper arose from an analogy between two polynomials, namely
p−1 p−1 f(X) = X − 1 ∈ Z/p Z[X] and g(X) = X + (p − 1)! ∈ Zp[X],
where p is a prime number, Z/p Z denotes the field with p elements and Zp denotes the ring of p-adic integers, see [23].
The analogy is concerned with the way each polynomial factors and with the congruences properties that can be derived in each case from the relations be- arXiv:1912.06652v1 [math.CO] 13 Dec 2019 tween the coefficients and the roots.
Below, we describe the analogy in details.
• First we look at the factorization of f(X) and the properties modulo p that can be derived from it. By Fermat’s little theorem we have,
p−1 k = 1 in Z/p Z
1 for all integers k with 1 ≤ k ≤ p − 1. It provides the p − 1 roots of f, and so f factors in Z/p Z[X] as f(X) = (X − 1)(X − 2) ... (X − (p − 1))
Let us introduce some notations concerning the divided factorial which shall be useful throughout the paper.
Notation 1. Let r be an integer with 1 ≤ r ≤ p − 2 and let i1, i2, . . . , ir be r integers with 1 ≤ ik ≤ p − 1 for all k with 1 ≤ k ≤ r.
We define the divided factorial (p − 1)!i1,..., ir as
(p − 1)! i1,..., ir (p − 1)! := Qr k=1 ik
From looking at the constant coefficient of f in both factored and expanded forms, we retrieve Wilson’s theorem which reads
(p − 1)! = −1 mod p
This constitutes one of many proofs for Wilson’s theorem. By looking at the other coefficients in both factored and expanded forms, we derive more relations, namely,
p−1 X (p − 1)!k = 0 mod p (Coefficient in X) k=1 X (p − 1)!i,j = 0 mod p (Coefficient in X2) 1≤i 1≤i1 1≤i1 The numbers to the left hand side are also the respective unsigned coeffi- cients of x2, x3, . . . , xr+1, . . . , xp−1 in the falling factorial x(x − 1)(x − 2) ... (x − (p − 1)), that is the unsigned Stirling numbers of the first kind. p p p p , ,..., ,..., 2 3 r + 1 p − 1 2 We summarize the preceding equalities by p ∀2 ≤ k ≤ p − 1, p | k These numbers were introduced by James Stirling in the 18th century. The bracket notation gets promoted by Donald Knuth by analogy with binomial coefficients. Namely, we have the well-known divisibility relations p ∀1 ≤ k ≤ p − 1, p | , k a straightforward consequence of the definition of the binomial coefficients and of the Gauss lemma. Note that another equivalent definition for the unsigned Stirling numbers n of the first kind is the following: counts the number of permutations s of n elements that decompose into a product of s disjoint cycles, see [37] for a quantum combinatorial proof. While there exist lots of proofs for Wilson’s theorem, little is advertised about Wilson’s theorem modulo p2 or higher powers. It is even said at the end of 2 [25]: ”There is no explicit formula for (p − 1)! mod p , ie the integer n1 in 2 (p − 1)! ≡ −1 + n1p mod p is no evident function of p”. In [26], Wilson’s theorem modulo p2 is only stated as 2 p−1 2p−2 p − 1 2 (p − 1)! ≡ (−1) 2 2 ! (mod p ) 2 However, British mathematician J.W.L. Glaisher, son of meteorologist and pi- oneer both of weather forecasting and of photography James Glaisher who in particular held the world record for the highest altitude reached in a balloon, found a formula for (p − 1)! mod p2 in 1900 [22] that uses Bernoulli numbers. His method is elegant, smart and straightforward, but does not generalize to higher powers of p. A hundred years later, in 2000, Z-H Sun provides a different perspective, see [49]. His method even allows him to compute (p − 1)! mod p3, thus generalizing Glaisher’s result whose work had only led to a formula for (p−1)! mod p2. Sun’s result modulo p3 is expressed in terms of divided Bernoulli numbers. Sun’s ma- chinery is heavy but really beautiful and well exposed. First, he determines the 3 generalized harmonic numbers Hp−1,k modulo p . For that, he uses a battery of tools, namely: Euler’s theorem ; Bernoulli’s formula for the sums of powers modulo p3 together with von Staudt–Clausen theorem [53][13] that determines the fractional part of Bernoulli numbers ; K¨ummer’scongruences from 1851 involving Bernoulli numbers [36] and their generalizations modulo p2 by Sun himself [49] in the case when k ≤ p − 3, and an unpublished result of [50] giving 2 3 formulas for p Bk(p−1) modulo p and p respectively for dealing with k = p − 2 and k = p − 1 respectively. Second, he uses Newton’s formulas together with 3 Bernoulli’s formula modulo p2 in order to derive the Stirling numbers modulo p2. From there he obtains in particular a congruence for (p−1)! mod p3 that was first proven by Carlitz [9]. Likewise, by using Newton’s formulas with general- ized harmonic numbers and what Sun denotes as the conjugates of the Stirling numbers, he finds a formula for the conjugate Stirling numbers modulo p2 fol- lowed by a ”conjugate Carlitz congruence”. By combining the various identities, he then derives a pioneering formula for (p − 1)! mod p3 that is expressed only in terms of Bernoulli numbers. Yet another twenty years later, we offer a third perspective which does not make any use of the Newton formulas. The polynomial g with p-adic integer coeffi- cients introduced earlier happens to be an even more powerful tool than the polynomial f for better prime precision. It highlights once again the beauty and efficiency of p-adic numbers when investigating local properties at powers of primes. Explicitly: • We now investigate the factorization of g(X). Let k be an integer with 1 ≤ k ≤ p − 1. First and foremost, we have p−1 g(k) = k + (p − 1)! ∈ p Zp (1) by definition of g and by using Wilson’s theorem modulo p. Moreover, we have 0 p−2 g (k) = (p − 1) k 6∈ p Zp (2) as kp−2 = k−1 6= 0 in Z/p Z. By Hensel’s lemma [23], each nonzero k of Z/p Z lifts to a unique root xk of g such that k − xk ∈ p Zp Write xk = k + p tk with tk ∈ Zp Then g factors in Zp[X] as follows. g(X) = (X − 1 − p t1) ... (X − (p − 1) − p tp−1) 2 We will see that by looking at the constant coefficient of g modulo p Zp, we obtain the next coefficient in the p-adic expansion of (p − 1)!, namely Theorem 1. p−1 X 2 (p − 1)! = −1 + p δ0(k) mod p , k=1 with δ0(k) defined for each 1 ≤ k ≤ p − 1 by p−1 2 k = 1 + p δ0(k) mod p 4 Working out the sum of Theorem 1 modulo p2 by using the Faulhaber poly- nomials for the sums of powers and by using Faulhaber’s neat statement on the relationship between the two trailing coefficients of the polynomial for odd powers (work done in the 17th century, [17]), we obtain Wilson’s theorem one step further, namely modulo p2. p(p−1) Theorem 2. Let p be an odd prime number. Set p = 2l+1 and a = 2 . Let c1(l) be the trailing coefficient in the Faulhaber polynomial p−1 X p l+1 3 2 k = cl(l) a + ... + c2(l) a + c1(l) a (3) k=1 We have, (i) ∀ i ∈ { 1, . . . , l}, ci(l) ∈ Zp 1 2 (ii)(p − 1)! = 2 c1(l) − p mod p Corollary 1. (Glaisher 1900 [22]) 2 (p − 1)! = p Bp−1 − p mod p Corollary 1 can be derived directly from Theorem 1 by using the Bernoulli formula for the sum of powers smartly modulo p2 (like Sun did in [49], see the proof of his congruence (5.1)) together with von Staudt–Clausen theorem. For future reference, Bernoulli’s formula for the sums of powers reads: p m X 1 X m + 1 km = B pm+1−j, m + 1 j j k=1 j=0 where we wrote the formula using Bernoulli numbers of the second type, 1 1 that is B1 = 2 instead of B1 = − 2 . As for von Staudt–Clausen’s theorem it gets described just a little further below. Corollary 1 can also be derived from Theorem 2. Indeed, the Faulhaber (l+1) coefficients of (3) are related to the coefficients Ak of [34], which can themselves be computed in terms of Bernoulli numbers by the formula first proven by Gessel and Viennot (see [18] and [34]). Edwards noticed (m) for fixed m that the coefficients Ak can be defined recursively, thus are obtainable by inverting a lower triangular matrix, see [16]. From there, Gessel and Viennot found a neat combinatorial interpretation for these coefficients. From their magnificent result, it can then be conveniently derived that some of the rational Faulhaber coefficients are p-adic integers (so are for instance the Faulhaber coefficients appearing in our Theorem 2), a useful data to have when working modulo powers of p. We will see and point out from now on that by using a result of Derby 5 [15], Glaisher’s formula provides an efficient way of computing (p − 1)! modulo p2. Finally, we note that Glaisher’s formula is consistent with the fact that p Bp−1 = −1 mod p Zp (4) The latter fact is indeed a consequence of the previously mentioned von Staudt–Clausen theorem. This theorem dating from 1840 and indepen- dently proven by von Staudt and by Clausen asserts that the Bernoulli 1 numbers B2k sum to zero when added all the fractions q with q prime such that q − 1 divides 2k (recall that B2k+1 = 0 when k ≥ 1). Von Staudt, German mathematician, was a student of Gauss at G¨ottingen. Danish mathematician Clausen, while illiterate at age 12 and astronomer by background, was so talented that Gauss once said when Clausen was in life trouble: ”Es w¨are doch sehr zu beklagen, wenn sein wirklich ausgezeichnetes Talent f¨urabstracte Mathematik in der Verk¨ummerungso ganz zu Grunde ginge” Amongst his many achievements, Clausen calculated in 1847 the first 247 decimals of π and in 1854 he decomposed the Fermat number F6 into prime numbers, thus uncovering a prime number that was the biggest of all primes formerly known, namely 67280421310721. In mathematical words, von Staudt–Clausen’s theorem reads X 1 B + = 0 mod 1 p−1 q q ∈ P q − 1|p − 1 Then, (multiplying by p), X 1 p B + 1 + p = 0 mod p p−1 q Zp q ∈ P q 6= p q − 1|p − 1 Leading to the result stated in (4). Note that von Staudt–Clausen theorem specifically applied to the Bernoulli number Bp−1 implies that the denom- inator of Bp−1 consists of p times other primes q such that q − 1|p − 1. The Agoh-Giuga conjecture, named after independent Japanese mathe- matician Takashi Agoh and Italian mathematician Giuseppe Giuga asserts that (4) holds only for prime numbers. Conjecture 1. (Agoh-Giuga [2][20]) n is prime if and only if n Bn−1 = −1 mod n 6 If Conjecture 1 holds, we must show that n Bn−1 6= −1 mod n for n composite in order to prove it. Given n composite, if n Bn−1 = 0 mod n, then we are done. Otherwise, from von Staudt-Clausen’s theorem, there must exist a prime divisor p of n such that p − 1|n − 1. We say that n is ”Carmichael at p”. A Carmichael number is a composite square- free integer that is Carmichael at all its prime divisors. Equivalently, a Carmichael number is a composite number which is a Fermat pseudo-prime to every base [11], that is n ∀a ∈ Z, a = a mod n In other words, the Carmichael numbers are the ”Fermat liars”. In partic- ular, a Carmichael number must be odd. The equivalence between both definitions was shown in 1899 by Korselt [35]. Giuga has linked the prop- erty of Conjecture 1 to Carmichael numbers and Giuga numbers. Definition 1. n is a Giuga number if X 1 Y 1 − ∈ p p N p ∈ P p ∈ P p|n p|n n Equivalently, for each prime divisor p of n, we have p p − 1. Giuga has proven the following result. Theorem. (Giuga 1950 [20]) A composite integer n satisfies nBn−1 = −1 mod n if and only if n is both a Giuga number and a Carmichael number. In light of Giuga’s theorem, the Agoh-Giuga conjecture asserts the non- existence of composite numbers that are both Giuga numbers and Carmichael numbers. We will see in Section 3 of the paper that an odd composite Giuga number such that for any prime divisor p of n = p m, p does not divide Bm−1 would provide a counter-example to the Agoh-Giuga conjecture. Indeed, we have the following fact. Fact 1. Let n be an odd composite Giuga number. Let p ∈ P with p|n. Write n = pm, some integer m. Then, p − 1|m − 1 or p Bm−1 In Section 3, we prove Fact 1 without reference to Adams’theorem [1][33]. Going now back to the polynomial g and looking at the respective co- efficients in X,X2,...,Xp−2 modulo p2 in both factored and expanded forms of g (just like we did with polynomial f modulo p only), we are able 7 to express the Stirling numbers one prime power further, in terms of a difference between a sum of powers and a generalized harmonic number, like gathered in the following theorem. Theorem 3. Let Sp−1,p−k denote the sum of the (p − k)-th powers of the first (p − 1) integers, that is p−1 X p−k Sp−1,p−k := l l=1 Let Hp−1,k−1 denote the generalized harmonic number, using a standard notation. We have, p ∀ 2 ≤ k ≤ p − 1, = S − H mod p2 k p−1,p−k p−1,k−1 The proof of Theorem 3 uses a result by Bayat which is a generalization of Wolstenholme’s theorem. Wolstenholme’s theorem asserts that 2 Hp−1,1 = 0 mod p and Hp−1,2 = 0 mod p Back in 1862, Wolstenholme proved the result [55] (which is since then re- ferred to as Wolstenholme’s theorem) as an intermediate result for showing that 2p − 1 ≡ 1 mod p3 p − 1 The latter result is also commonly referred to as Wolstenholme’s theorem. A 150 years later, generalizing Wolstenholme’s theorem was still of interest to mathematicians. In 1997, Bayat generalized the part of Wolstenholme’s theorem related to the generalized harmonic numbers. He showed the following fact. Result 1. (Bayat, 1997 [5]) Let m be a positive integer and let p be a prime number with p ≥ m + 3. Then, p−1 ( X 1 0 mod p if m is even ≡ km 0 mod p2 if m is odd k=1 Note, and this becomes important in our discussion later on, in the proof of Theorem 3, we only need Bayat’s result modulo p. From Theorem 3 and using this time a more recent generalization of Wol- stenholme’s theorem by Sun, we then derive divisibility properties or con- gruences modulo p2 for the p p p unsigned Stirling numbers of the first kind , ,..., . 2 3 p − 1 The results get summarized in the corollary below. 8 Corollary 2. Let n be an integer and p be a prime. We have ( p 0 mod p2 if 2n + 1 ≤ p − 4 = 2n + 2 p 2 − 2 mod p if 2n + 1 = p − 2 p 2 Bp−2n−1 mod p if p > 2n + 1 and n ≥ 1 p 2n+1 = 1 mod p2 if p = 2n + 1 2n + 1 2 p Bp−1 − p mod p if n = 0 The result of Corollary 2 also appears in the original and subtle work of Glaisher from 1900. It is stated as follows using Glaisher’s notations. Result 2. (Glaisher, 1900 [22]) Denote by Ar the sum of products of r integers among the first (p − 1) integers. We have, A 1 1 = − mod p (5) p 2 A 2k+1 = 0 mod p (6) p A V 2k = − 2k mod p (7) p 2k The link between Glaisher’s notations and our notations is p = A k p−k As for the Bernoulli numbers, his V-notation corresponds to our B-notation. Contrary to what happens with our own method for finding Wilson’s the- orem modulo p2, the formulas providing the Stirling numbers modulo p2 must be used within Glaisher’s method in order to derive Wilson’s theo- rem modulo p2. Thus, our method for proving Wilson’s theorem modulo p2 appears somewhat more straightforward than Glaisher’s way since our way uses only p-adic numbers (cf Theorem 1) and the Bernoulli’s formula modulo p2 for the sums of powers. Finally, we note that the result of Corollary 2 also appears in Sun’s work, based on Newton’s formulas and based also on divisibility properties at prime p of the sums of powers. Still using Glaisher’s notations and writing simply Sk for Sp−1,k (thus lightening our own notation from Theorem 3), Newton’s formulas relate Ak and Sk for each k = 1, . . . , p − 1 by (cf [31]) k−1 (−1)k−1 X A = S + (−1)r A S (8) k k k r k−r r=1 9 As we know, p divides Ar for all 1 ≤ r ≤ k−1 when k ≤ p−1. Moreover, it 2 is clear from Faulhaber’s formula that p (and even p ) divides S3,...,Sp−2 for the odd indices once we know that the Faulhaber coefficients that are involved are p-adic integers. And of course p divides S1 by a direct calculation. Dealing next with the even indices, from Faulhaber’s formula applied with even powers, namely p−1 X p − 1 + 1 k2l = 2 2c (l)a + 3c (l)a2 + ··· + (l + 1)c (l)al (9) 2l + 1 1 2 l k=1 we can show by using the work of Gessel and Viennot previously evoked that the Faulhaber coefficients that are present in Formula (9) are all p−3 p-adic integers. Thus, for each integer l with 1 ≤ l ≤ 2 , we have 1 p c (l) S = 1 mod p2 (10) 2l 2 2l + 1 In particular, it follows that p divides S2l for such l’s. Gathering these divisibility facts, we may now assert that for each k = 1, . . . , p − 1, the sum in (8) is congruent to 0 modulo p2. And so Sun obtains (−1)k−1 A = S mod p2 ∀ k = 1, . . . , p − 1 (11) k k k Combining our Theorem 3 and Sun’s result in (11), we can now relate the generalized harmonic numbers to the sums of powers modulo p2 in the following way. Corollary 3. (−1)k H = 1 + S mod p2 ∀ k = 1, . . . , p − 2 (12) p−1,p−k−1 k k Setting k = 1, this shows in particular that 2 Hp−1,p−2 = 0 mod p (13) 2 More generally, since we have seen that p divides S3,...,Sp−2, we also have Corollary 4. 2 Hp−1,k = 0 mod p ∀k = 1, 3, . . . , p − 4, p − 2 with k odd (14) The latter result to the exception of (13) can be found in [26] on page 103 with a proof unrelated to ours. The case k = 1 is usually referred to as Wolstenholme’s theorem. 10 Here, we have thus recovered Bayat’s result for the modulus p2 case if we gather (10), (12) and (14). Note with (13) that our result is an improve- ment to Bayat’s result since Bayat does not deal with the generalized harmonic number Hp−1,p−2. More recently in 2011, Romeo Mestrovic proved in [39] that 2p − 1 ≡ 1 − 2p H + 4p2 A∗ (mod p7), (15) p − 1 p−1,1 2 ∗ where A2 denotes the conjugate of A2 using Sun’s notations. See also [40] for more complements on the topic. James P. Jones has conjectured that the converse of Wolstenholme’s theorem holds and there is past and ongoing research on the matter, see for instance in chronological order [38], [27], [28]. Closing this digression and going back to congruence (10), it rewrites in terms of Bernoulli numbers as 2 S2l = p B2l mod p see forthcoming § 2. Using this rewriting and the fact that Bj = 0 for odd j > 1, we derive further from (12) the general formula Corollary 5. (−1)k H = 1 + p B mod p2 ∀ k = 1, . . . , p − 2 (16) p−1,p−k−1 k k Note the formula still holds for k = 1 though B1 6= 0. Recall that when k ≤ p − 2, the denominator of Bk is not divisible by p since p − 1 does not divide k. Then, modulo p2, the right hand side of Equality (16) is precisely p − k − 1 p B , p − k k which is nothing else than the formula provided in Corollary 5.1 of Sun in [49]. This is a result in Sun, which though generalizable to p3, had required a fair amount of work. However, we do not reveal any congruence modulo 2 p for Hp−1,p−1 by our method, whereas Sun does deal with that case successfully. And like three mathematicians working in mirrors, Glaisher himself has worked out the generalized harmonic numbers to the modulus p2 and by times p3. He noticed from p−1 p−2 (X − 1)(X − 2) ... (X − (p − 1)) = X − A1 X + ... − Ap−2X + Ap−1 (17) that 1 1 1 1, , ,..., 2 3 p − 1 11 are the roots of the polynomial p−1 p−2 2 Ap−1X − Ap−2X + ··· + A2X − A1X + 1 From there, by using the Newton formulas and some divisibility properties of the Stirling numbers, namely p p| for every integer k with 2 ≤ k ≤ p − 1 k , p p2| for every integer l with 1 ≤ l ≤ p−3 2l 2 he derives as part of his work, where his Hk is our Hp−1,k, Theorem 4. (Glaisher 1900 [22]) 3 H1 ≡ −Ap−2 mod p 2 H2 ≡ 2Ap−3 mod p 3 H3 ≡ −3Ap−4 mod p . . . . 2 Hp−3 ≡ (p − 3)A2 mod p with the modulus being alternately p3 and p2, and 3 2 3 Hp−2 ≡ −p − (J − 2 ) p mod p 2 , Hp−1 ≡ −1 − (J − 1) p mod p with the value of J given by 1 J = −1 + V + , (18) p−1 p that is J is the second coefficient in the p-adic expansion of (p − 1)!. Namely, we have (p − 1)! = −1 + p J mod p2 (19) Thus, our work for finding the Stirling numbers with (with respect to our notations) even indices modulo p2 can be deduced from Theorem 3 joint with Hardy and Wright’s congruence for generalized harmonic numbers with odd indices modulo p2 (or Bayat’s result modulo p2). Once this is achieved, finding the Stirling numbers with (with respect to our nota- tions) odd indices modulo p2 follows jointly from Theorem 3 together with Glaisher’s formulas for generalized harmonic numbers modulo p2, without reference to Sun’s later work. Glaisher actually derives explicit formulas for the generalized harmonic 3 numbers Hk modulo p for odd indices k because as part of his unlimited 12 and groundbreaking creativity, not only had he calculated the Stirling numbers modulo p2 in terms of Bernoulli numbers, but he had also found a way to lift this calculation to the next modulus p3 as far as the odd indices are concerned. He had shown in his earlier paper [21] the following fact. Result 3. (Glaisher, 1900 [21]) Let r be an odd integer with 3 ≤ r ≤ p−2. We have, p (p − r) A ≡ A mod p3 (20) r 2 r−1 When r is odd, r − 1 is even, whence by (7), V A = −p r−1 mod p2 (21) r−1 r − 1 Gathering (20), (21) and the fact that Ar−1 = 0 mod p, it leads to Result 4. (Glaisher, 1900 [22]) Let r be an odd integer with 3 ≤ r ≤ p−2. We have, p2 r A ≡ V mod p3 (22) r 2(r − 1) r−1 If r is odd, so is p − 1 − r and if 1 ≤ r ≤ p − 4, then 3 ≤ p − 1 − r ≤ p − 2, thus by (22) and von Staudt-Clausen’s theorem, we have p2(r + 1) A ≡ V mod p3 (23) p−1−r 2(r + 2) p−r−2 3 From Theorem 4, we have Hr = −r Ap−r−1 mod p for each odd r with 1 ≤ r ≤ p − 4. Hence, p2 r(r + 1) H = − V mod p3 r 2(r + 2) p−r−2 We now state Glaisher’s result in our own notations, emphasizing the fact that Glaisher’s earlier result gets to the next power of p compared to Bayat’s more recent result above. Theorem 5. (Glaisher, 1900 [22]) Let m be a positive integer and let p be a prime with p ≥ m + 3. We have, m 2 p−1 m+1 p Bp−1−m mod p if m is even X 1 ≡ km k=1 m(m+1) 2 3 − 2(m+2) p Bp−2−m mod p if m is odd Note, Sun in his proof of (11) and further derivation of the Stirling numbers modulo p2 does not refer to Faulhaber’s mathematics, but rather uses 13 his own congruence (5.1), see [49], that is derived from his smart use of Bernoulli’s formula. Be aware of the possible confusion here: what we just referred to as Congruence (5.1) of Sun [49] on one hand, and Corollary (5.1) of Sun [49] on the other hand are two different things, though both are congruences. From his global formula which reads p2 p3 S = p B + m B + m(m − 1) B mod p3, (24) m m 2 m−1 6 m−2 Sun derives two things using the von Staudt-Clausen theorem. Namely the following two facts: (i) p divides Sm as p does not divide the denominator of Bm for m even since p − 1 does not divide m when m ≤ p − 2. 2 (ii) Neither does p−1 divide m−1 nor m−2. Hence, Sm = p Bm mod p , independently from the parity of m. Replacing in (11) yields: Result 5. (Sun 2000, [49]) (−1)k−1 A = p B mod p2 ∀ k = 1, . . . , p − 1 (25) k k k Unfortunately, Sun’s ingenious method for computing the Stirling numbers modulo p2 does not generalize to the modulus p3. Indeed, when working modulo p3, the sum of (8) is no longer congruent to zero, but is rather a 2 convolution of Bernoulli numbers. We know that A2l+1 = 0 mod p when p−3 1 ≤ l ≤ 2 and p divides the Sj’s, hence only the terms in even r’s contribute to the sum modulo p3, as well as the term corresponding to r = 1 which is congruent modulo p3 to p2 B 2 k−1 That is, the given sum is congruent modulo p3 to b k−1 c p2 X2 B + A S (26) 2 k−1 2r k−2r r=1 k−1 2 Moreover, for odd k’s, we have when r 6= 2 that p divides Sk−2r as k − 2r is then odd and distinct from 1. Since p also divides A2r, the sum to the right hand side of (26) is then congruent modulo p3 to p2 B k−1 , 2 k − 1 14 with only the upper index of the sum contributing. On the other hand, for even k’s, we have B A = −p 2r mod p2 and S = p B mod p2 2r 2r k−2r k−2r 3 p−1 Thus, modulo p , equality (8) reads for each k with 1 ≤ k ≤ 2 , p − 3 p2 2k + 1 (k ≤ ) A = B modp3 (27) 2 2k+1 2 2k 2k 1 bk− 2 c ! 1 X B2rB2k−2r (k 6= 1) A = − p B − p2 modp3(28) 2k 2k 2k 2r r=1 p(p − 1) and A = mod p3(29) 1 2 1 p 3 p2 (p ≥ 5) and A = − + mod p3 (30) 2 2 6 4 Formula (27) is Result 4 of Glaisher. Formula (28) is expressed in terms of a convolution involving Bernoulli numbers. Such convolutions have drawn the interest of various mathematicians. For instance, Japanese mathemati- cian Hiroo Miki comes up with an identity in 1978 which involves both a binomial convolution and an ordinary convolution of divided Bernoulli numbers, see [41]. Denoting B 1 1 B = n , and H = 1 + + ··· + n n n 2 n his identity reads: n−2 n−2 X X n ∀n > 2, B B = B B + 2H B i n−i i i n−i n n i=2 i=2 Miki shows that both sides of the identity are congruent modulo p for suffi- ciently large p, which implies that they are equal. Another proof of Miki’s identity that uses p-adic analysis is given by Shiratani and Yokoyama [46]. Later on, Ira Gessel gives a much simpler proof of Miki’s identity based on two different expressions for Stirling numbers of the second kind, [19]. Unfortunately, we can’t resolve (28) by the same method as the one used by Sun in [49] in order to compute (p − 1)! modulo p3, when he uses the conjugates of the Aj’s and of the Sj’s. We are thus tempted to apply our own method to the next modulus p3 in order to deal with the Stirling numbers modulo p3. Going to the next modulus p3 happens to provide a much easier way than Sun’s for finding (p − 1)! modulo p3. It is time to introduce new notations since we work one p-power further. 15 Notation 2. We define δ1(k) as the third coefficient in the p-adic expan- sion of kp−1, namely, p−1 2 3 k = 1 + p δ0(k) + p δ1(k) mod p (31) We show the following result. Theorem 6. p−1 p−1 X 2 X (p − 1)! = −1 + p δ0(i) + p δ0(i) + δ1(i) i=1 i=1 " p−1 2 p−1 # p2 X X − δ (i) + δ (i)2 mod p3 2 0 0 i=1 i=1 (32) From there, it is easily seen that (p − 1)! modulo p3 can be written in terms of sums of powers and powers of sums of powers. Hence, in terms of Bernoulli numbers we get, where we put the terms in random order, Corollary 6. p 3 1 1 (p − 1)! = − p2 + (2p + 1)pB − p B − p2 B2 mod p3 (33) 2 2 p−1 2 2p−2 2 p−1 Sun’s formula from [49] reads p B p B 1p B 2 (p − 1)! = − p−1 + 2p−2 − p−1 mod p3 (34) p − 1 2(p − 1) 2 p − 1 Showing the equivalence between our formula and Sun’s formula requests a bit of effort. First and foremost, we note that (p − 1)−1 = −p2 − p − 1 mod p3 (35) Then, by plugging (35) into (34) and using the fact that p B2p−2 = −1 mod p, namely a consequence of von Staudt-Clausen’s theorem, we get, p(p + 1) 2p + 1 (p − 1)! = −2p2 − B + p(p + 1) B − p2B2 mod p3 2 2p−2 p−1 2 p−1 (36) In order to conclude, we will need to use a consequence of a result of Sun. First we introduce some new notations. Notation 3. Let x be a p-adic integer. We denote by (x)k the (k + 1)-th coefficient in the p-adic expansion of x, that is ∞ X j x = (x)j p j=0 16 Fact 2. By von Staudt–Clausen’s theorem, p B2p−2 and p Bp−1 are both p-adic integers of equal residue −1 modulo p. Their second coefficients of their respective p-adic expansions are related by p B2(p−1) 1 = 2 p Bp−1 1 − 1 mod pZp (37) Fact 2 appears to be a direct consequence of Sun’s unpublished result, Result 6. (Sun, [50]) Let k be a nonnegative integer. We have 2 p Bk(p−1) = −(k − 1)(p − 1) + k p Bp−1 mod p (38) Result 6 of Sun is itself a special case of his Corollary 4.2 of [48], whose statement we recall here for interest and completeness. Result 7. (Sun, 1997 [48]) Let b and k be nonnegative integers. Define ( 1 if p − 1|b and B 6∈ δ(n, b, p) = n Zp 0 otherwise i.e. Bn ∈ Zp or p − 1 6 | b Then, we have k(p−1)+b−1 1 − p p Bk(p−1)+b n−1 X k − 1 − rk ≡ (−1)n−1−r 1 − pr(p−1)+b−1 p B n − 1 − r r r(p−1)+b r=0 k + (−1)n δ(n, b, p) pn−1 mod pn n Zp (39) Unpublished Result 6 was proven prior to more recent Result 7 and is the latter result applied with b = 0, n = 2, p > 3 and k ≥ 1. Apply now Result 6 with k = 2. Obtain successively 2 p B2(p−1) = −(p − 1) + 2p Bp−1 mod p Zp, (40) and so