INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 6 (2006), #A24

THE CUBE OF THE FERMAT QUOTIENT

Karl Dilcher^{1}

Department of Mathematics and Statistics, Dalhousie University, Halifax, Nova Scotia, B3H 3J5, Canada

                          dilcher@mathstat.dal.ca

Ladislav Skula^{2}

Department of Applied Mathematics, Faculty of Science, Masaryk University in Brno, Janáčkovo nám. 2a, 602 00 Brno, Czech Republic

                            skula@math.muni.cz

Received: 11/30/05, Revised: 6/14/06, Accepted: 7/24/06, Published: 10/06/06

Abstract

We prove a certain polynomial congruence modulo an odd prime p ≥ 5, and as a consequence we obtain a congruence for the cube of the Fermat quotient to base 2 in terms of simple finite sums. This extends known results of a similar nature for the first and second powers of the Fermat quotient.

1. Introduction

For an odd prime p and an integer a with p ∤ a the Fermat quotient of p to base a is defined by

q_{p}(a) := \frac{a^{p−1} − 1}{p}.  (1)

Because of their close connection to the classical theory of Fermat’s last theorem these quotients have been studied in great detail (see, e.g., [3]), and a large number of congruences for them are known. A particularly interesting one, due to Glaisher [1], is

q_{p}(2) ≡ −\frac{1}{2} ∑_{j=1}^{p−1} \frac{2^{j}}{j} (mod p).  (2)

1Supported by the Natural Sciences and Engineering Research Council of Canada.

2Supported by the Grant Agency of the Czech Republic (Methods of Theory of Numbers, 201/04/381).

Recently the second author discovered and conjectured

q_{p}(2)^{2} ≡ − ∑_{j=1}^{p−1} \frac{2^{j}}{j^{2}} (mod p),  (3)

and subsequently Granville [2] proved this congruence. Granville also remarked that, based on calculations, an obvious extension of (2) and (3) probably does not exist. However, it turns out that a less obvious extension to q_{p}(2)^{3}, involving two sums of the expected type, does exist. It is the purpose of this paper to prove this congruence, namely

Theorem 1. For any prime p ≥ 5 we have

q_{p}(2)^{3} ≡ −3 ∑_{j=1}^{p−1} \frac{2^{j}}{j^{3}} + \frac{7}{4} ∑_{j=1}^{p−1} \frac{(−1)^{j}}{j^{3}} (mod p),  (4)

or equivalently

q_{p}(2)^{3} ≡ −3 ∑_{j=1}^{p−1} \frac{2^{j}}{j^{3}} + \frac{7}{16} ∑_{j=1}^{\frac{p−1}{2}} \frac{1}{j^{3}} (mod p).  (5)

The proof of this result uses methods similar to those in [2]; this part is done in Section 2. The remainder of the proof is then presented in two versions. In Section 3 we present a short proof by the anonymous referee. Our own proof relies on some general results, proved in Section 4, concerning certain sums modulo p; we consider this of independent interest. Section 5 then concludes the second proof.

Congruences (2) – (4) give rise to the obvious question whether there exist similar formulas also for higher powers of q_{p}(2). On the one hand, computer searches have been without success, while on the other hand the method of Section 2 below does not appear to extend to higher powers.

2. Proof of Theorem 1

As in [2], we define the following polynomials:

q(x) := \frac{x^{p} − (x − 1)^{p} − 1}{p},  (6)
G(x) := ∑_{j=1}^{p−1} \frac{x^{j}}{j^{2}} ,  (7)

and the additional polynomial

G_{3}(x) := ∑_{j=1}^{p−1} \frac{x^{j}}{j^{3}} .  (8)

We also use the congruences (4) and (5) in [2], namely

G(x) ≡ G(1 − x) + x^{p}G(1 − \frac{1}{x}) (mod p),  (9)
q(x)^{2} ≡ −2x^{p}G(x) − 2(1 − x^{p})G(1 − x) (mod p).  (10)

We are now ready to state the following result which provides the main step towards the proof of Theorem 1. It can be seen as the cubic analogue of (10) and is of interest in its own right.

Theorem 2. For any prime p ≥ 5 we have

\frac{1}{6}q(x)^{3} ≡ −x^{p}G_{3}(x) − (1 − x^{p})G_{3}(1 − x) − x^{2p}(1 − x^{p})G_{3}(1 − \frac{1}{x})  (11)

− \frac{2}{3}G_{3}(−1)x^{p}(1 − x^{p}) (mod p).

Proof of Theorem 1. We specialize (11) by setting x = 2. Then it is obvious from (6) that

q(2) ≡ 2q_{p}(2) (mod p).  (12)

Also, with (8) we have

x^{p}G_{3}(\frac{1}{x}) = ∑_{j=1}^{p−1} \frac{x^{p−j}}{j^{3}} = ∑_{j=1}^{p−1} \frac{x^{j}}{(p − j)^{3}} ≡ −G_{3}(x) (mod p),  (13)

so that

2^{p}G_{3}(\frac{1}{2}) ≡ −G_{3}(2) (mod p).  (14)

Finally, if we note that 2^{p} ≡ 2 (mod p), we get

q_{p}(2)^{3} ≡ −3G_{3}(2) + \frac{3}{4}G_{3}(−1) − \frac{3}{2} (−\frac{2}{3}G_{3}(−1)) (mod p).  (15)

This is obviously (4); the equivalence to (5) will be shown in Proposition 5 below.

In the remainder of this section we will give the first half of the proof of Theorem 2. We begin by noting that from (6) it follows that

q′(x) ≡ − ∑_{j=1}^{p−1} x^{j−1} = x^{p−1} − \frac{1 − x^{p}}{1 − x} (mod p)  (16)

(see also [2, p. 2]). Also, from (7) and (8) it is obvious that

G′_{3}(x) = \frac{1}{x}G(x).  (17)

Adapting the main idea of proof in [2], we use (10) and (16) to obtain

\frac{d}{dx}q(x)^{3} = 3q(x)^{2}q′(x)  (18)

≡ 3(−2x^{p}G(x) − 2(1 − x^{p})G(1 − x)) (x^{p−1} − \frac{1 − x^{p}}{1 − x} )

= −6x^{2p} \frac{G(x)}{x} + 6(1 − x^{p})^{2} \frac{G(1 − x)}{1 − x}

+ 6x^{p}(1 − x^{p}) (\frac{G(x)}{1 − x} − \frac{G(1 − x)}{x}) (mod p).

With (9) we now get

\frac{G(x)}{1 − x} ≡ \frac{G(1 − x) + x^{p}G(1 − \frac{1}{x})}{1 − x} = \frac{G(1 − x)}{1 − x} − x^{p} \frac{1}{x} \frac{G(1 − \frac{1}{x})}{1 − \frac{1}{x}} (mod p)

and

\frac{G(1 − x)}{x} ≡ \frac{G(x) − x^{p}G(1 − \frac{1}{x})}{x} = \frac{G(x)}{x} − x^{p} (\frac{1}{x} − \frac{1}{x^{2}} ) \frac{G(1 − \frac{1}{x})}{1 − \frac{1}{x}} (mod p),

so that

\frac{G(x)}{1 − x} − \frac{G(1 − x)}{x} ≡ \frac{G(1 − x)}{1 − x} − \frac{G(x)}{x} − x^{p} \frac{1}{x^{2}} \frac{G(1 − \frac{1}{x})}{1 − \frac{1}{x}} (mod p).  (19)

Combining (18) and (19), we obtain after some simplification,

\frac{1}{6} \frac{d}{dx}q(x)^{3} ≡ −x^{p} \frac{G(x)}{x} + (1 − x^{p})\frac{G(1 − x)}{1 − x} − x^{2p}(1 − x^{p})\frac{1}{x^{2}} \frac{G(1 − \frac{1}{x})}{1 − \frac{1}{x}} (mod p). (20)

Now the essential step consists of taking the antiderivative on both sides of (20), using (17):

\frac{1}{6}q(x)^{3} ≡ −x^{p}G_{3}(x) − (1 − x^{p})G_{3}(1 − x) − x^{2p}(1 − x^{p})G_{3}(1 − \frac{1}{x})  (21)
+ c_{0} + c_{1}x^{p} + c_{2}x^{2p} (mod p).

Here we have used the fact that the only powers of x occurring in (20) are powers of x^{p}, and the constants c_{0}, c_{1}, c_{2} come from the fact that the polynomials on both sides of (21) have degree < 3p. To determine these constants we note that, as observed in [2], we have

q(0) ≡ q(1) ≡ 0 (mod p),  (22)

but also

G_{3}(0) ≡ G_{3}(1) ≡ 0 (mod p),  (23)

by a well-known congruence which is easy to prove. If we set x = 0 in (21) and note that x^{p}G_{3}(1 − \frac{1}{x}) is actually a polynomial in x, then we see that each term, with the exception of c_{0}, is congruent to 0 (mod p); hence c_{0} ≡ 0 (mod p). Similarly, if we set x = 1 in (21) then by (22) and (23) we have c_{1} + c_{2} ≡ 0 (mod p), so that (21) becomes

\frac{1}{6}q(x)^{3} ≡ −x^{p}G_{3}(x) − (1 − x^{p})G_{3}(1 − x) − x^{2p}(1 − x^{p})G_{3}(1 − \frac{1}{x})  (24)
+ c_{1}x^{p}(1 − x^{p}) (mod p).

It is important to note that c_{1} is a constant that still depends on the prime p.

Thus it remains to evaluate the constant c_{1} (mod p). The main idea of both proofs rests on the fact that the function q(x) has, in addition to x = 0 and x = 1, another zero in ℤ/pℤ, or in an extension of this field.

3. First Proof of Theorem 2

The following determination of the constant c_{1}, which completes the proof of Theorem 2, is due to the referee.

The congruence (24) can be seen as an identity in ℚ[x] if we add a polynomial with rational coefficients whose numerators are all divisible by p. Now let a be a primitive sixth root of unity in ℂ, which means its minimal polynomial is x^{2} − x + 1. Then a − 1 = a^{2}, and so a^{p} − (a − 1)^{p} − 1 = −((a^{p})^{2} − a^{p} + 1) = 0 since a^{p} is also a primitive sixth root of unity, and thus q(a) = 0 by the definition (6). Since a^{p}(1 − a^{p}) = 1 and 1 − \frac{1}{a} = a, as well as 1 − a = \overline{a} and 1 − a^{p} = \overline{a}^{p} with \overline{a} the conjugate of a, (24) with x = a gives

c_{1} ≡ 2a^{p}G_{3}(a) + \overline{a}^{p}G_{3}(\overline{a}) (mod p).  (25)

Replacing a by \overline{a} and comparing with (25), we get a^{p}G_{3}(a) ≡ \overline{a}^{p}G_{3}(\overline{a}) (mod p), and therefore

c_{1} ≡ 3a^{p}G_{3}(a) (mod p).  (26)

Now we define, for any integer r,

t(r) := ∑_{\begin{matrix}j=1 \\ j ≡ r (mod 6) \end{matrix}}^{p−1} \frac{1}{j^{3}} ;  (27)

then t(R) = t(r) if R ≡ r (mod 6). Note that

G_{3}(−1) = ∑_{j=0}^{5}(−1)^{j}t(j) ≡ 2(t(0) + t(2) + t(4)),  (28)

and that

t(0) + t(2) + t(4) = ∑_{\begin{matrix}j=1 \\ j ≡ 0 (mod 2) \end{matrix}}^{p−1} \frac{1}{j^{3}} ≡ ∑_{\begin{matrix}j=1 \\ j ≡ 0 (mod 6) \end{matrix}}^{3p−1} \frac{1}{j^{3}}

= 3^{3} ∑_{i=0}^{2} ∑_{\begin{matrix}j=ip+1 \\ j ≡ 0 (mod 6) \end{matrix}}^{(i+1)p} \frac{1}{j^{3}} = 3^{3} ∑_{i=0}^{2} ∑_{\begin{matrix}k=1 \\ k ≡ −ip (mod 6) \end{matrix}}^{p} \frac{1}{j^{3}}

= 27(t(0) + t(−p) + t(−2p)) (mod p),

where we have written j = k + ip. From the definition (27) we also have t(j) ≡ −t(p − j) (mod p). We now consider two cases.

If p ≡ 1 (mod 6), then t(−p) ≡ −t(2p) = −t(2) (mod p) and t(−2p) = t(4), so that

t(0) + t(2) + t(4) ≡ 27(t(0) − t(2) + t(4)) (mod p).  (29)

Then

a^{p}G_{3}(a) = ∑_{j=0}^{5} a^{p+j}t(j) ≡ t(0)(a − a^{2}) + t(2)(a^{3} − a^{6}) + t(4)(a^{5} − a^{4})

= t(0) − 2t(2) + t(4) = \frac{3}{2}(t(0) − t(2) + t(4)) − \frac{1}{2}(t(0) + t(2) + t(4)),

and with (29) and (28) we get

a^{p}G_{3}(a) ≡ −\frac{4}{9}(t(0) + t(2) + t(4)) ≡ −\frac{2}{9}G_{3}(−1) (mod p).  (30)

Second, if p ≡ −1 (mod 6), then t(−p) ≡ −t(2p) = −t(−2) = −t(4) (mod p) and t(−2p) = t(2), so that

t(0) + t(2) + t(4) ≡ 27(t(0) + t(2) − t(4)) (mod p).  (31)

Then, as before,

a^{p}G_{3}(a) = ∑_{j=0}^{5} a^{p+j}t(j) ≡ t(0)(a^{5} − a^{4}) + t(2)(a − a^{2}) + t(4)(a^{3} − a^{0})

= t(0) + t(2) − 2t(4) = \frac{3}{2}(t(0) + t(2) − t(4)) − \frac{1}{2}(t(0) + t(2) + t(4)),

and with (31) and (28) we get (30) again. Finally, (30) combined with (26) gives c_{1} ≡ −\frac{2}{3}G_{3}(−1) (mod p), as required. This completes the first proof of Theorem 2.

4. Sums of Certain Arithmetic Functions Modulo p

Let f : ℤ → ℤ and suppose that there are fixed integers c and d with p ∤ d such that for all x, y ∈ ℤ we have

f(x) ≡ f(y) (mod p) whenever x ≡ y (mod p),  (32)
f(−x) ≡ −f(x) (mod p),  (33)
f(2x) ≡ cf(x) (mod p),  f(6x) ≡ df(x) (mod p).  (34)

Then clearly

∑_{j=1}^{p−1} f(j) ≡ 0 (mod p).  (35)

Furthermore, for each 0 ≤ r ≤ 5 we set

t(r) := ∑_{\begin{matrix}j=1 \\ j ≡ r (mod 6) \end{matrix}}^{p−1} f(j) and u(r) := ∑_{r \frac{p}{6} <j<(r+1) \frac{p}{6}} f(j).  (36)

For integers j and r as in the sum for t(r) we have 1 ≤ p − j ≤ p − 1 and p − j ≡ 1 − r (mod 6) when p ≡ 1 (mod 6), and p − j ≡ 5 − r (mod 6) when p ≡ 5 (mod 6). Therefore we get with (33),

t(r) ≡ \begin{cases}−t(1 − r) (mod p) & for 0 ≤ r ≤ 1 and p ≡ 1 (mod 6), \\ −t(7 − r) (mod p) & for 2 ≤ r ≤ 5 and p ≡ 1 (mod 6), \\ −t(5 − r) (mod p) & for 0 ≤ r ≤ 5 and p ≡ 5 (mod 6). \end{cases}  (37)

We also need congruences connecting the sums t(r), u(r) with each other.

Proposition 1. Let p ≥ 5 be a prime. Then for p ≡ 1 (mod 6) we have

t(r) ≡ \begin{cases}−du(5) (mod p) & for r = 0, \\ −du(r − 1) (mod p) & for 1 ≤ r ≤ 5, \end{cases}  (38)

while for p ≡ 5 (mod 6) we have

t(r) ≡ du(r) (mod p),  0 ≤ r ≤ 5 (p ≡ 5 (mod 6)).  (39)

Proof. First, let p ≡ 1 (mod 6). When r = 0 we get with (36), and using successively the congruences (34), (33), and (32),

t(0) = ∑_{j=1}^{\frac{p−1}{6}} f(6j) ≡ d ∑_{j=1}^{\frac{p−1}{6}} f(j) ≡ −d ∑_{j=1}^{\frac{p−1}{6}} f(−j) (mod p)

≡ −d ∑_{j=1}^{\frac{p−1}{6}} f(p − j) = −d ∑_{\frac{5p}{6} <j<p} f(j) = −du(5) (mod p).

Now let 1 ≤ r ≤ 5. Then we get, using the same congruences as above,

t(r) = ∑_{j=0}^{\frac{p−1}{6} −1} f(r + 6j) ≡ − ∑_{j=0}^{\frac{p−1}{6} −1} f(rp − r − 6j) (mod p)

≡ −d ∑_{j=0}^{\frac{p−1}{6} −1} f(r\frac{p−1}{6} − j) = −d ∑_{(r−1) \frac{p}{6} <j<r \frac{p}{6}} f(j) = −du(r − 1) (mod p).

Now let p ≡ 5 (mod 6) and 0 ≤ r ≤ 5. Using (32) and (34), as well as the fact that f(0) ≡ 0 (mod p) by (33), we get with (36),

t(r) = ∑_{j=0}^{\frac{p+1}{6} −1} f(r + 6j) ≡ ∑_{j=0}^{\frac{p+1}{6} −1} f(r + 6j + rp) (mod p)

≡ d ∑_{j=0}^{\frac{p+1}{6} −1} f(j + r\frac{p+1}{6}) = d ∑_{r \frac{p}{6} <j<(r+1) \frac{p}{6}} f(j) = du(r) (mod p),

which completes the proof of the proposition.

Combining (38) and (39) with (37), we obtain the following congruence for both cases p ≡ 1, 5 (mod 6); it also follows directly from the definition of u(r).

Corollary 1. For p ≥ 5 and 0 ≤ r ≤ 5 we have

u(r) ≡ −u(5 − r) (mod p).  (40)

Next we derive congruences for several other sums involving the function f(j).

Proposition 2. Let p ≥ 5 be a prime and suppose that the function f : ℤ → ℤ satisfies (32) – (34). Then

∑_{j=1}^{p−1}(−1)^{j}f(j) ≡ 2c ∑_{j=1}^{\frac{p−1}{2}} f(j) (mod p),  (41)

∑_{\frac{p}{6} <j< \frac{p}{3}} f(j) ≡ \frac{d − c}{2d} ∑_{j=1}^{\frac{p−1}{2}} f(j) (mod p).  (42)

Proof. To simplify notation, let γ be the left-hand sum in (41) and w the right-hand sum in both (41) and (42). Furthermore, set

S = ∑_{\begin{matrix}j=1 \\ j even \end{matrix}}^{p−1} f(j), L = ∑_{\begin{matrix}j=1 \\ j odd \end{matrix}}^{p−1} f(j).

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 6 (2006), #A24 9

Then

S = ∑_{j=1}^{\frac{p−1}{2}} f(2j) ≡ c ∑_{j=1}^{\frac{p−1}{2}} f(j) = cw (mod p).

From (34) we get L ≡ −S (mod p); therefore γ = −L + S ≡ 2S (mod p), and

γ ≡ 2cw (mod p),  (43)

which gives (41). On the other hand,

γ = t(0) + t(2) + t(4) − t(1) − t(3) − t(5),

and by (38) and (40) we get for p ≡ 1 (mod 6),

γ ≡ −d(u(5) + u(1) + u(3) − u(0) − u(2) − u(4)) (mod p)
≡ −d(−2u(0) + 2u(1) − 2u(2)) = 2d(w − 2u(1)) (mod p).

Similarly, with (39) and (40) we get for p ≡ 5 (mod 6),

γ ≡ d(u(0) + u(2) + u(4) − u(1) − u(3) − u(5)) (mod p)
≡ d(2u(0) − 2u(1) + 2u(2)) = 2d(w − 2u(1)) (mod p).

Combining this with (43), we get in both cases,

u(1) ≡ \frac{d − c}{2d}w (mod p),  (44)

which is the same as (42).

Finally we derive the following consequence which will be useful later. Corollary 2. Let p ≥ 5 be a prime, and let A := t(0) − t(2) − t(3) + t(5), B := t(1) + t(2) −

t(4) − t(5), and w := ∑j=1^{\frac{p−1}{2}} f(j). Then

A ≡ −B ≡ \frac{3d − c}{2}w (mod p)  for p ≡ 1 (mod 6),  (45)
A ≡ 0 (mod p), B ≡ \frac{3d − c}{2}w (mod p)  for p ≡ 5 (mod 6).  (46)

Proof. With (37), (38), and (40) we get for p ≡ 1 (mod 6),

A ≡ t(0) − 2t(2) − t(3) ≡ d(u(0) + 2u(1) + u(2)) (mod p),

B ≡ −t(0) + 2t(2) + t(3) ≡ −A (mod p),

while with (37) and (39) we get for p ≡ 5 (mod 6),

A ≡ 0 (mod p),

B ≡ t(0) + 2t(1) + t(2) ≡ d(u(0) + 2u(1) + u(2)) (mod p).

In both cases (44) is valid, so that

d(u(0) + 2u(1) + u(2)) ≡ d(w + \frac{d − c}{2d}w) = \frac{3d − c}{2}w (mod p),

which completes the proof.

5. Second Proof of Theorem 2

Let p ≥ 5 be a prime, and let 𝔽 be a field containing ℤ/pℤ such that the polynomial x^{2} − x + 1 = x(x − 1) + 1 has a root a in 𝔽. Then a is a primitive 6th root of unity, and in 𝔽 we have for each integer n,

a^{n} = \begin{cases}a & if n ≡ 1 (mod 6), \\ −a + 1 & if n ≡ 5 (mod 6). \end{cases}  (47)

Also, in Section 3 we saw that q(a) = 0.

The following results deal with values of the sum G_{3}(x) defined in (8). In analogy to the general sum w in Corollary 2 we denote

W := ∑_{j=1}^{\frac{p−1}{2}} \frac{1}{j^{3}} .

Proposition 3. For all primes p ≥ 5 we have in the field 𝔽

G_{3}(a) = \begin{cases}\frac{a−1}{18}W & when p ≡ 1 (mod 6), \\ −\frac{a}{18}W & when p ≡ 5 (mod 6), \end{cases}  (48)

or equivalently,

aG_{3}(a) = \begin{cases}−\frac{1}{18}W & when p ≡ 1 (mod 6), \\ −\frac{a−1}{18}W & when p ≡ 5 (mod 6). \end{cases}  (49)

Proof. We set f(x) = x^{p−4} for x ∈ ℤ. Then f(x) ≡ \frac{1}{x^{3}} (mod p) for p ∤ x, and f has all the properties required in Section 4, with c ≡ \frac{1}{2^{3}} (mod p) and d ≡ \frac{1}{6^{3}} (mod p). Using the sums t(r) as defined in (36) we get the following identity in 𝔽:

G_{3}(a) = ∑_{j=1}^{p−1} \frac{a^{j}}{j^{3}} = (t(0) − t(2) − t(3) + t(5)) + a(t(1) + t(2) − t(4) − t(5)).

The identities in (48) now follow from Corollary 2. Finally, (48) and (49) are equivalent since in 𝔽 we have a(a − 1) = −1.

We are now ready to determine the constant c_{1} in (24).

Proposition 4. For primes p ≥ 5 we have

c_{1} ≡ −\frac{1}{6} ∑_{j=1}^{\frac{p−1}{2}} \frac{1}{j^{3}} (mod p).  (50)

Proof. We consider (24) as a polynomial identity in 𝔽 and evaluate the various members for x = a. Since q(a) = 0, the left-hand side is 0. Next, by (48) and (47) we get

a^{p}G_{3}(a) = \begin{cases}a\frac{a−1}{18}W = \frac{a−1−a}{18}W & when p ≡ 1 (mod 6), \\ −(−a + 1)\frac{a}{18}W = \frac{a−1−a}{18}W & when p ≡ 5 (mod 6), \end{cases}

and thus

a^{p}G_{3}(a) = −\frac{1}{18}W.  (51)

Now we consider the congruence (13) as a polynomial identity in 𝔽 and obtain, since \frac{1}{a} = 1−a,

G_{3}(1 − a) = G_{3}(\frac{1}{a}) = −\frac{1}{a^{p}} G_{3}(a).

Using (49) and (47) we get

G_{3}(1 − a) = \begin{cases}−\frac{a}{18}W & when p ≡ 1 (mod 6), \\ \frac{a−1}{18}W & when p ≡ 5 (mod 6). \end{cases}  (52)

Since 1 − \frac{1}{a} = \frac{a−1}{a} = a we have, again with (48),

G_{3}(1 − \frac{1}{a}) = \begin{cases}\frac{a−1}{18}W & when p ≡ 1 (mod 6), \\ −\frac{a}{18}W & when p ≡ 5 (mod 6). \end{cases}  (53)

If we note that, by (47), a^{p}(1 − a^{p}) = 1 for all primes p ≥ 5, and

1 − a^{p} = \begin{cases}1 − a, \\ a, \end{cases} a^{2p}(1 − a^{p}) = \begin{cases}a & for p ≡ 1 (mod 6), \\ −a + 1 & for p ≡ 5 (mod 6), \end{cases}

then with (51) – (53) the right-hand side of (24) with x = a becomes

\begin{cases}\frac{W}{18}(1 − (1 − a)(−a) − a(a − 1)) + c_{1} & for p ≡ 1 (mod 6), \\ \frac{W}{18}(1 − a(a − 1) − (−a + 1)(−a)) + c_{1} & for p ≡ 5 (mod 6). \end{cases}

Since a(a − 1) = −1 and q(a) = 0, we get in both cases c_{1} = −\frac{1}{6}W, which completes the proof of (50).

Proposition 5. For primes p ≥ 3 we have

4G_{3}(−1) ≡ ∑_{j=1}^{\frac{p−1}{2}} \frac{1}{j^{3}} (mod p).  (54)

Proof. For p ≥ 5 let f be the function defined in the proof of Proposition 3. Then (41) gives

G_{3}(−1) = ∑_{j=1}^{p−1} \frac{(−1)^{j}}{j^{3}} ≡ ∑_{j=1}^{p−1}(−1)^{j}f(j) ≡ \frac{1}{4} ∑_{j=1}^{\frac{p−1}{2}} f(j) (mod p),

which is the same as (54). The case p = 3 can be verified directly.

It is now obvious that (24) combined with (50) and (54) completes the proof of Theorem 2. The congruence (54) also shows that (4) and (5) are equivalent.

Acknowledgments

Research on this paper was begun while the first author visited Masaryk University in Brno, partly supported by the Grant Agency of the Czech Republic. He wishes to thank the Department of Mathematics and Professor Radan Kučera for their hospitality.

References

[1] J. W. L. Glaisher, On the residues of the sums of products of the first p − 1 numbers and their powers to modulus p^{2} or p^{3}, Quart. J. Math. Oxford 31 (1900), 321–353.

[2] A. Granville, The square of the Fermat quotient, Integers: Electronic J. of Combinatorial Number Theory 4 (2004), #A22 (electronic).

[3] P. Ribenboim, 13 Lectures on Fermat’s Last Theorem. Springer-Verlag, New York, 1979.