ACTA ARITHMETICA LXI.2 (1992) Determination of p−1 X 2 g ak modulo p k=1 by Kenneth S. Williams∗ and Kenneth Hardy∗∗ (Ottawa, Ont.) 1. Introduction. At the Second Canadian Number Theory Association Conference held at the University of British Columbia in August 1989, Michael Robinson of the Supercomputing Research Center in Bowie, MaryPp−1 k2 land asked the first author for the value modulo p of the sum k=1 g where p is an odd prime and g is a primitive root (mod p). In this paper we determine the value modulo p of the more general sum G(p, a, g) = p−1 X 2 g ak , k=1 where a is an arbitrary integer. The sum G(p, a, g) has the following two basic properties: (i) if a0 ≡ a (mod p − 1) then (as g p−1 ≡ 1 (mod p)) G(p, a0 , g) ≡ G(p, a, g) (mod p) ; (ii) if g 0 is another primitive root (mod p) then G(p, a, g 0 ) ≡ G(p, am, g) (mod p) , where g 0 ≡ g m (mod p), 1 ≤ m ≤ p − 2, GCD(m, p − 1) = 1. 2 If a ≡ 0 (mod p − 1) we have g ak ≡ 1 (mod p) for k = 1, 2, . . . , p − 1 so that G(p, a, g) ≡ p − 1 ≡ −1 (mod p). Thus, from now on, we suppose that p is an odd prime, g is a primitive root (mod p), and a is an integer with a 6≡ 0 (mod p − 1). 1991 Mathematics Subject Classification: 11A07, 11A15, 11L05, 11L10. ∗ Research supported by Natural Sciences and Engineering Research Council of Canada, Grant A-7233. ∗∗ Research supported by Natural Sciences and Engineering Research Council of Canada, Grant A-8049. 162 K. S. Williams and K. Hardy We begin by defining integers d, b, q, α and r, which depend on a and p but not on g, which will be used throughout the paper. We set (1.1) (1.2) d = GCD(a, p − 1) , b = a/d , q = (p − 1)/d , so that b and q are coprime integers with 1 < q ≤ p − 1. We also let 2α denote the largest power of 2 dividing q and set (1.3) r = q/2α , so that r is a positive odd integer. We note that (p − 1)/r is a positive even integer and that if α ≥ 1, b is odd. We remark that if a is changed to a0 = a + (p − 1)w, then d, q, α and r remain unchanged but b is changed to b + qw. An important function in our determination of the sum G(p, a, g) modulo p is the function F (p, a, g) defined by Y (1.4) F (p, a, g) = (g (p−1)t/r − g (p−1)u/r ) , 1≤t<u≤r−1 where the right hand side of (1.4) is understood to be 1 if r = 1. The basic properties of F (p, a, g) are given in Lemma 1 below, which will be proved in Section 2. If n is a positive integer we write ζn for the primitive nth root of unity e2πi/n . We recall that √ r ∈ Q(ζr ) if r ≡ 1 (mod 4) , √ −r ∈ Q(ζr ) if r ≡ 3 (mod 4) . As r divides p − 1 we have Q(ζr ) ⊂ Q(ζp−1 ). Clearly Q(ζp−1 ) ⊂ Q(ζp(p−1) ) so that q (−1)(r−1)/2 r ∈ Q(ζp(p−1) ) . Lemma 1. (i) If a0 ≡ a (mod p − 1) then F (p, a0 , g) = F (p, a, g) . (ii) If g 0 is another primitive root (mod p), say g 0 ≡ g m (mod p), 1 ≤ m ≤ p − 2, GCD(m, p − 1) = 1, then m 0 F (p, a, g ) ≡ F (p, a, g) (mod p) , r where ( m r ) is the Jacobi symbol. (iii) F (p, a, g)2 ≡ (−1)(r−1)/2 rr−2 (mod p). (iv) If P is a prime ideal of Q(ζp(p−1) ) lying above the prime ideal (1−ζp ) of Q(ζp ) and g is a primitive root (mod p) with g ≡ ζp−1 (mod P) then q −2 (r−3)/2 F (p, a, g) ≡ r (−1)(r−1)/2 r (mod P) . r Determination of a sum modulo p 163 It is also convenient to set 1 if α = 0 , 0 if α = 1 , (1.5) E(p, a, g) = α(r−2)/2 (p−1)br/4 2 (1 + g ) if α (even) ≥ 2 , (α(r−2)+1)/2 (p−1)br/8 2 g if α (odd) ≥ 3 . We note that α(r − 2)/2 is an integer for α even and that (α(r − 2) + 1)/2 is an integer for α odd. If α ≥ 2 we have p ≡ 1 (mod 4) so that (p − 1)br/4 is an integer. If α ≥ 3 we have p ≡ 1 (mod 8), so that (p−1)br/8 is an integer. The basic properties of E(p, a, g) are given in Lemma 2 below, which will be proved in Section 2. Lemma 2. (i) If a0 ≡ a (mod p − 1) then E(p, a0 , g) ≡ E(p, a, g) (mod p) . (ii) If g 0 is another primitive root (mod p), say g 0 ≡ g m (mod p), 1 ≤ m ≤ p − 2, GCD(m, p − 1) = 1, then E(p, a, g 0 ) ≡ E(p, am, g) (mod p) . The following determination of G(p, a, g) modulo p is proved in Section 3. Theorem. α+1 b 2 G(p, a, g) ≡ − d(r−1)/2 E(p, a, g)F (p, a, g) (mod p) . r r In Section 4 we examine some special cases of this theorem. 2. Properties of E(p, a, g) and F (p, a, g). We recall that for any positive integer n, ζn denotes the primitive nth root of unity e2πi/n . We will need the following result: if n is a positive odd integer and k is an integer with GCD(k, n) = 1 then Y k (n−1)/2 (n−3)/2 √ kt ku (2.1) n i n (ζn − ζn ) = n 1≤t<u≤n−1 q −2k (n−3)/2 = n (−1)(n−1)/2 n , n where ( n ) is the Jacobi symbol. The result (2.1) can be proved as in [3, pp. 462–465] making use of the following result (see for example [2, p. 186]): (n−1)/2 Y 2πkt k √ (2.2) 2 sin = n. n n t=1 P r o o f o f L e m m a 1. (i) This follows immediately from the remark following (1.3) and the definition (1.4). 164 K. S. Williams and K. Hardy (ii) The result is clearly true for r = 1 as in this case F (p, a, g) = F (p, a, g 0 ) = 1 and ( m r ) = 1. Hence we may suppose that r ≥ 3 so that ζr 6= ±1. Let P be a prime ideal of Q(ζr ) lying above p. Then we have r−1 Y (g (p−1)/r − ζrs ) = g p−1 − 1 ≡ 0 (mod P ) s=0 so that g (p−1)/r ≡ ζrs (mod P ) for some integer s with 0 ≤ s ≤ r − 1. Clearly we have GCD(s, r) = 1 as g is a primitive root (mod p). Let g 0 be another primitive root (mod p), say g 0 ≡ g m (mod p), 1 ≤ m ≤ p − 2, GCD(m, p − 1) = 1. Then we have Y (p−1)t/r (p−1)u/r (g 0 − g0 ) 1≤t<u≤r−1 Y ≡ (g (p−1)mt/r − g (p−1)mu/r ) (mod P ) 1≤t<u≤r−1 Y ≡ (ζrsmt − ζrsmu ) (mod P ) 1≤t<u≤r−1 ≡ ≡ m r m r Y (ζrst − ζrsu ) (mod P ) (by (2.1)) 1≤t<u≤r−1 Y (g (p−1)t/r − g (p−1)u/r ) (mod P ) , 1≤t<u≤r−1 so that m F (p, a, g ) ≡ F (p, a, g) (mod P ) . r As P | p and both sides of this congruence are integers, the congruence holds (mod p), proving (ii). (iii) Let P be a prime ideal of Q(ζp(p−1) ) lying above the prime ideal (1 − ζp ) of Q(ζp ). Let g be a primitive root (mod p). Then we have 0 p−2 Y s (g − ζp−1 ) = g p−1 − 1 ≡ 0 (mod P) , s=0 s ζp−1 so that g ≡ (mod P) for some integer s with 0 ≤ s ≤ p − 2. As g is a primitive root (mod p) we must have GCD(s, p − 1) = 1. Let s0 be an integer such that ss0 ≡ 1 (mod p − 1), and let g 0 denote the primitive root 0 g s (mod p). Then, as 0 0 ss g 0 ≡ g s ≡ ζp−1 ≡ ζp−1 (mod P) , Determination of a sum modulo p 165 by (iv) (to be proved next), we have q −2 (r−3)/2 F (p, a, g 0 ) ≡ r (−1)(r−1)/2 r (mod P) , r so that F (p, a, g 0 )2 ≡ (−1)(r−1)/2 rr−2 (mod P) . As both sides of this congruence are integers, we must have F (p, a, g 0 )2 ≡ (−1)(r−1)/2 rr−2 (mod p) . Finally, as F (p, a, g 0 ) ≡ ±F (p, a, g) (mod p), by (ii), we deduce that F (p, a, g)2 ≡ (−1)(r−1)/2 rr−2 (mod p) , which is (iii). (iv) Let P be a prime ideal of Q(ζp(p−1) ) lying above the prime ideal (1 − ζp ) of Q(ζp ), and let g be a primitive root satisfying g ≡ ζp−1 (mod P). Then we have (p−1)/r g (p−1)/r ≡ ζp−1 ≡ ζr (mod P) so that Y F (p, a, g) = (g (p−1)t/r − g (p−1)u/r ) 1≤t<u≤r−1 Y ≡ (ζrt − ζru ) (mod P) 1≤t<u≤r−1 ≡ q −2 (r−3)/2 r (−1)(r−1)/2 r (mod P) , r by (2.1), as asserted. P r o o f o f L e m m a 2. (i) If a is changed to a0 = a + w(p − 1), the integers d, q, α and r remain unchanged while b becomes b0 = b + wq, so that E(p, a, g) = E(p, a0 , g) if α = 0 or 1. If α ≥ 2 then q ≡ 0 (mod 4) so 0 g (p−1)b r/4 ≡ g (p−1)(b+wq)r/4 ≡ g (p−1)br/4 (g p−1 )w(q/4)r ≡ g (p−1)br/4 (mod p) , showing that E(p, a0 , g) ≡ E(p, a, g) (mod p) if α (even) ≥ 2. If α (odd) ≥ 3, then q ≡ 0 (mod 8), and thus 0 g (p−1)b r/8 ≡ g (p−1)(b+wq)r/8 ≡ g (p−1)br/8 (g p−1 )w(q/8)r ≡ g (p−1)br/8 (mod p) , proving E(p, a0 , g) ≡ E(p, a, g) (mod p) in this case. (ii) If a is replaced by am, where GCD(m, p − 1) = 1, then d, q, α and r remain unchanged while b becomes bm. Hence we have E(p, am, g) ≡ E(p, a, g m ) (mod p). 166 K. S. Williams and K. Hardy 3. Proof of the Theorem. Let P be a prime ideal of Q(ζp(p−1) ) lying above the prime ideal (1 − ζp ) of Q(ζp ). As in the proof of Lemma 1(iii), we may choose g to be a primitive root (mod p) satisfying g ≡ ζp−1 (mod P) . (3.1) If α ≥ 2, so that p ≡ 1 (mod 4), we have g (p−1)/4 ≡ ζ4 (mod P) , (3.2) and if α ≥ 3, so that p ≡ 1 (mod 8), g (p−1)/8 ≡ ζ8 (mod P) . (3.3) Hence we have G(p, a, g) ≡ p−1 X 2 ak ζp−1 (mod P) (by (3.1)) k=1 ≡ dq X 2 ζqbk (mod P) k=1 q X ≡d (by (1.2)) 2 ζqbk (mod P) . k=1 Appealing to the multiplicative property of Gauss sums (see for example [1, p. 163]), we have as q = 2α r (3.4) G(p, a, g) ≡ d 2α X k=1 2 ζ2rbk α r X ζr2 α bk2 (mod P) . k=1 Next, appealing to the well-known evaluation of the Gauss sum (see for example [1, pp. 166–167]), we have 1 if α = 0 , α 2 X 0 if α = 1 , 2 (3.5) ζ2rbk = α α/2 rb 2 (1 + ζ4 ) if α (even) ≥ 2 , k=1 2(α+1)/2 ζ8rb if α (odd) ≥ 3 , and α q r X 2 b 2α bk2 (3.6) ζr = (−1)(r−1)/2 r . r k=1 From (3.2), (3.3) and (3.5) we obtain 1 (mod P) α 2 X 2 0 (mod P) ζ2rbk ≡ α 2α/2 (1 + g (p−1)rb/4 ) (mod P) k=1 (α+1)/2 (p−1)rb/8 2 g (mod P) if if if if α = 0, α = 1, α (even) ≥ 2 , α (odd) ≥ 3 , Determination of a sum modulo p 167 that is, appealing to (1.5), α 2 X (3.7) 2 ζ2rbk ≡ 2α(3−r)/2 E(p, a, g) (mod P) . α k=1 Next from (3.6) and Lemma 1(iv) we obtain α r X α 2 2 b −2 −(r−3)/2 ζr2 bk ≡ r F (p, a, g) (mod P) . r r k=1 α As d2 r ≡ −1 (mod p) we have r−(r−3)/2 ≡ (−1)(r−3)/2 d(r−3)/2 2α(r−3)/2 (mod P) , so that (3.8) r X ζr2 α bk2 k=1 α+1 2 b ≡ (−1) d(r−3)/2 2α(r−3)/2 F (p, a, g) (mod P) . r r Hence, from (3.4), (3.7) and (3.8), we obtain α+1 2 b G(p, a, g) ≡ (−1) d(r−1)/2 E(p, a, g)F (p, a, g) (mod P) . r r As both sides of this congruence are integers and P | p we have α+1 2 b G(p, a, g) ≡ − d(r−1)/2 E(p, a, g)F (p, a, g) (mod p) r r for any primitive root g ≡ ζp−1 (mod P). Now let g 0 be any primitive root (mod p) so that g 0 ≡ g m (mod p) for some integer m satisfying 1 ≤ m ≤ p − 2, GCD(m, p − 1) = 1. Then, working modulo p, we have G(p, a, g 0 ) ≡ G(p, am, g) α+1 2 bm ≡− d(r−1)/2 E(p, am, g)F (p, am, g) r r α+1 b m 2 d(r−1)/2 E(p, a, g 0 )F (p, a, g) ≡− r r r α+1 b 2 ≡− d(r−1)/2 E(p, a, g 0 )F (p, a, g 0 ) r r as asserted. 4. Special cases of the Theorem. An obvious interesting special case arises when r is a square, say r = R2 , R > 0. If P is a prime ideal of 168 K. S. Williams and K. Hardy Q(ζp(p−1) ) lying above the prime ideal (1 − ζp ) of Q(ζp ) and g is a primitive root (mod p) with g ≡ ζp−1 (mod P) then, by Lemma 1(iv), we have, as r = R2 ≡ 1 (mod 8) F (p, a, g) ≡ RR 2 −2 (mod P) . As both sides of this congruence are integers and P | p, we must have (4.1) F (p, a, g) ≡ RR 2 −2 (mod p) . By Lemma 1(ii) we see that (4.1) holds for any primitive root g (mod p). Further, as r = R2 ≡ 1 (mod 8), we see that 1 if α = 0 , 0 if α = 1 , E(p, a, g) = α(R2 −2)/2 (p−1)b/4) 2 (1 + g if α (even) ≥ 2 , (α(R2 −2)+1)/2 (p−1)b/8 2 g if α (odd) ≥ 3 . Hence, by the Theorem, we obtain (as d 2α R2 ≡ −1 (mod p)) Corollary 1. If r is a square, say r = R2 , where R > 0, then −1/R (mod p) if α = 0 , 0 (mod p) if α = 1 , G(p, a, g) ≡ (p−1)b/4 α/2 −(1 + g )/R2 (mod p) if α (even) ≥ 2 , (p−1)b/8 (α−1)/2 −g /R2 (mod p) if α (odd ) ≥ 3 . A particular case of Corollary 1 is the following result: If p = M 2 + 1 (M > 0) is a prime then p−1 X M − 1 (mod p) if g (p−1)/4 ≡ M (mod p) , k2 g ≡ M + 1 (mod p) if g (p−1)/4 ≡ −M (mod p) . k=1 Next we examine the relationship between G(p, l, g) and G(p, 4l, g), where l is an integer such that GCD(l, p − 1) = 1, as in this case the two values of r given by (1.3) with a = l and a = 4l are the same. Corollary 2. If GCD(l, p − 1) = 1 and p ≡ 1 (mod 4) then G(p, 4l, g) ≡ ε(p, l, g)G(p, l, g) (mod p) , where 2 ε(p, l, g) = 0 2 1 − g l(p−1) /16 If GCD(l, p − 1) = 1 and p ≡ 3 (mod 4) if p ≡ 1 (mod 16) , if p ≡ 9 (mod 16) , if p ≡ 5 (mod 8) . then G(p, l, g) ≡ 0 (mod p) . Determination of a sum modulo p 169 P r o o f. With a = 4l, where GCD(l, p − 1) = 1, we have d = GCD(a, p − 1) = GCD(4l, p − 1) = GCD(4, p − 1) 4 if p ≡ 1 (mod 4) , = 2 if p ≡ 3 (mod 4) , l if p ≡ 1 (mod 4) , b = a/d = 2l if p ≡ 3 (mod 4) , (p − 1)/4 if p ≡ 1 (mod 4) , q = (p − 1)/d = (p − 1)/2 if p ≡ 3 (mod 4) , α ≥ 2 if p ≡ 1 (mod 16) , α = 1 if p ≡ 9 (mod 16) , α = 0 if p ≡ 5 (mod 8) or p ≡ 3 (mod 4) , (p − 1)/2α+2 if p ≡ 1 (mod 4) , r= (p − 1)/2 if p ≡ 3 (mod 4) , and with a0 = l, where GCD(l, p − 1) = 1, we have d0 = GCD(a0 , p − 1) = GCD(l, p − 1) = 1 , b0 = a0 /d0 = l , q 0 = (p − 1)/d0 = p − 1 , α + 2 if p ≡ 1 (mod 4) , 0 α = 1 if p ≡ 3 (mod 4) , 0 r0 = q 0 /2α = r , so that: F (p, 4l, g) = F (p, l, g) in all cases, and if p ≡ 5 (mod 8) E(p, l, g) = 2r−2 (1 + g (p−1)lr/4 ) ; E(p, 4l, g) = 1 , if p ≡ 3 (mod 4) E(p, 4l, g) = 1 , E(p, l, g) = 0 ; if p ≡ 9 (mod 16) E(p, 4l, g) = 0 , E(p, l, g) = 2(3r−5)/2 g (p−1)lr/8 ; if p ≡ 1 (mod 16) E(p, l, g) = 2r−2 E(p, 4l, g) . Corollary 2 now follows from the Theorem. We observe that Corollary 2 can be proved directly without appealing to the Theorem. We first treat the case p ≡ 3 (mod 4). We have, modulo p, G(p, l, g) ≡ p−1 X k=1 g lk2 ≡ p−1 X k=1 g l(k+(p−1)/2)2 ≡g l((p−1)/2)2 p−1 X k=1 2 g lk ≡ −G(p, l, g), 170 K. S. Williams and K. Hardy so that G(p, l, g) ≡ 0 (mod p). Next we treat the case p ≡ 1 (mod 4). We have G(p, l, g) ≡ p−1 X g lk2 ≡ k=1 p−1 X 2 g l(k+(p−1)/4) (mod p) , k=1 that is, G(p, l, g) ≡ g l((p−1)/4) (4.2) 2 p−1 X 2 (−1)k g lk (mod p) ; k=1 and working modulo p we have G(p, 4l, g) ≡ p−1 X g 4lk2 ≡ k=1 ≡2 (p−3)/2 p−1 X g 4lk2 ≡2 k=0 k6=(p−1)/2 p−2 X g lk2 k=0 k even ≡ p−2 X X g 4lk 2 k=0 k lk2 (−1) g + k=0 p−2 X 2 g lk , k=0 that is, G(p, 4l, g) ≡ (4.3) p−1 X 2 (−1)k g lk + G(p, l, g) (mod p) . k=1 Eliminating k lk2 k=1 (−1) g Pp−1 from (4.2) and (4.3), we obtain 2 G(p, 4l, g) ≡ (1 + g −l((p−1)/4) )G(p, l, g) ≡ ε(p, l, g)G(p, l, g) (mod p) . Corollary 3. −d (mod p) if α = 0 , G(p, a, g)G(p, −a, g) ≡ 0 (mod p) if α = 1 , −2d (mod p) if α ≥ 2 . P r o o f. We have by (1.4) F (p, a, g) = F (p, −a, g) so that by Lemma 1(iii) we obtain F (p, a, g)F (p, −a, g) ≡ F (p, a, g)2 ≡ (−1)(r−1)/2 rr−2 (mod p) . From (1.5) we deduce E(p, a, g)E(p, −a, g) = 1 if α = 0 , 0 if α = 1 , E(p, a, g)E(p, −a, g) ≡ 2α(r−2)+1 (mod p) if α ≥ 2 . Determination of a sum modulo p 171 Hence by the Theorem we have −1 r−1 d (−1)(r−1)/2 rr−2 G(p, a, g)G(p, −a, g) ≡ r if α = 0 1 × 0 if α = 1 (mod p) α(r−2)+1 2 if α ≥ 2 if α = 0 −d ≡ 0 if α = 1 (mod p) , −2d if α ≥ 2 as d 2α r ≡ −1 (mod p). This result can also be proved directly. We have working modulo p G(p, a, g)G(p, −a, g) ≡ p−1 X g ak 2 p−1 X k=1 ≡ p−1 X g a((l+m) 2 −l2 ) ≡ l,m=1 ≡ l=1 p−1 X p−1 X 2 g −al ≡ 2 −l2 ) k,l=1 2 g a(2lm+m ) p−1 X ≡ 2 g am m=1 l,m=1 p−1 X g a(k 2 m=1 g 2am ≡1 (mod p) g 2aml l=1 p−1 X g am (p − 1) ≡ − p−1 X 2 g am , m=1 2am≡0 (mod p−1) that is, p−1 X G(p, a, g)G(p, −a, g) ≡ − 2 g am . m=1 2m≡0 (mod q) If α = 0 we have dr X G(p, a, g)G(p, −a, g) ≡ − 2 g bdm ≡ − m=1 m≡0 (mod r) ≡− d X d X g bdr 2 n2 n=1 2 g (p−1)brn ≡ −d . n=1 If α = 1, so that b ≡ 1 (mod 2), we have 2dr X G(p, a, g)G(p, −a, g) ≡ − g bdm2 ≡− m=1 m≡0 (mod r) ≡− 2d X n=1 (g 2d X g bdr 2 n2 n=1 (p−1)/2 brn2 ) ≡− 2d X n=1 (−1)n ≡ 0 . 172 K. S. Williams and K. Hardy If α ≥ 2, so that b ≡ 1 (mod 2), we have α 2X dr G(p, a, g)G(p, −a, g) ≡ − 2 g bdm ≡ − 2d X (g p−1 )b2 α−2 rn2 g bd2 2α−2 2 r n2 n=1 m=1 m≡0 (mod 2α−1 r) ≡− 2d X ≡ −2d . n=1 We conclude with two other special cases which follow easily from the Theorem. Corollary 4. If GCD(l, p − 1) = 1 and p ≡ 5 (mod 8) then G(p, 2l, g) ≡ 0 (mod p) . Corollary 5. If GCD(l, p − 1) = 1 then l δ(p, a, l, g)G(p, a, g) (mod p) , G(p, al, g) ≡ r where ( (p−1)br(l−1)/8 g if α (odd ) ≥ 3 , δ(p, a, l, g) = g −(p−1)br/4 if α (even) ≥ 2 and l ≡ 3 (mod 4) , 1 otherwise. References [1] [2] [3] L.-K. H u a, Introduction to Number Theory, Springer, Berlin 1982. T. N a g e l l, Introduction to Number Theory, Almqvist & Wiksell, Stockholm 1951. H. W e b e r, Lehrbuch der Algebra, Vol. 1, 3rd ed., Chelsea, New York 1961. DEPARTMENT OF MATHEMATICS AND STATISTICS CARLETON UNIVERSITY OTTAWA, ONTARIO, CANADA K1S 5B6 Received on 27.9.1990 and in revised form on 12.6.1991 (2085)
© Copyright 2026 Paperzz