<ph f="cmr"> </ph><ph f="cmbx">Determinations of Analogues of Gauss Sums and Other Trigonometric Sums</ph>

Matthias Beck, Bruce C. Berndt1, O-Yeat Chan, and Alexandru Zaharescu

Department of Mathematics, San Francisco State University, 1600 Holloway Ave, San Francisco, CA 94132 Department of Mathematics, University of Illinois, 1409 West Green Street, Urbana, IL 61801, USA E-mail address : beck@math.sfsu.edu E-mail address : berndt@math.uiuc.edu E-mail address : ochan@math.uiuc.edu E-mail address : zaharesc@math.uiuc.edu
DETERMINATIONS OF ANALOGUES OF GAUSS SUMS AND OTHER TRIGONOMETRIC SUMS MATTHIAS BECK, BRUCE C. BERNDT1 2 , O-YEAT CHAN3 , and ALEXANDRU ZAHARESCU
Abstract. Explicit evaluations of several classes of trigonometric sums in closed form are given.
These sums can be viewed as analogues or generalizations of Gauss sums. In a previous paper, two of the present authors considered primarily sine sums associated with primitive odd characters. In this paper, we establish two general theorems involving both sines and cosines, with more attention given to cosine sums in special cases.
2000 AMS Classification Numbers: Primary, 11L03; Secondary, 11R29, 11L10.

1 Introduction

Motivated by two trigonometric identities
sin ( 2 π / 7 ) sin 2 ( 3 π / 7 ) sin ( π / 7 ) sin 2 ( 2 π / 7 ) + sin ( 3 π / 7 ) sin 2 ( π / 7 ) = 2 7 (1.1)
and
sin 2 ( 3 π / 7 ) sin ( 2 π / 7 ) sin 2 ( 2 π / 7 ) sin ( π / 7 ) + sin 2 ( π / 7 ) sin ( 3 π / 7 ) = 0 , (1.2)
discovered by Berndt and L.–C. Zhang [4as corollaries of two theta-function identities in Ramanujan's notebooks [8, and also motivated by further identities found by Z.–G. Liu [7,pp. 107–108, Berndt and Zaharescu [3evaluated large classes of trigonometric sums in terms of class numbers of imaginary quadratic fields. As an illustration, we begin by offering one of these general theorems and one of its corollaries.
Theorem 1.1. Let χ   denote an odd, real, non-principal, primitive character of modulus k   , where k   is odd and k 7   . Let
S 1 ( k , χ , a , b ) : = 0 < n < k / 2 χ ( n ) sin a ( b π n / k ) sin a + 1 ( π n / k ) , (1.3)
where a   and b   are positive integers with a   odd, b   even, and a b a 3 < 2 k   .
Define
C a , b : = n , m , r 0 n + b m + r = ( a b a 1 ) / 2 ( 1 ) m χ ( n ) ( a m ) ( a + r r ) . (1.4)
Then
S 1 ( k , χ , a , b ) = k ( b a h ( k ) 2 C a , b ) , (1.5)
where h ( k )   denotes the class number of the imaginary quadratic field Q ( k )   .
The requirement a b a 3 < 2 k   is technical; we could dispense with this condition, but then C a , b   would have to be replaced by a more complicated sum.
Corollary 1.2. If χ   is given as above, then
0 < n < k / 2 χ ( n ) sin ( 4 π n / k ) sin 2 ( π n / k ) = k ( 4 h ( k ) 2 ) . (1.6)
The evaluation  1.1 is the special case of  1.6 when k = 7   and χ ( n )   is the Legendre symbol ( n 7 )   .
The proofs in [3depend on contour integration and elementary properties of Gauss sums.
While sums involving powers of the sine function, odd characters, and class numbers of imaginary quadratic fields are the focus of [3, in this paper we consider sums with both sines and cosines, and sums involving either odd or even characters. Some of our main theorems are for odd characters, and others are for even characters. Although some of our evaluations can be expressed in terms of class numbers in special cases, we do not emphasize such instances in the present paper.
Before embarking on the proofs of our general theorems, we thought it best to begin with the evaluation of a class of cosine sums associated with even characters. Thus, in Section  2 , we alter our ideas from [3to evaluate a large class of trigonometric sums involving even characters.
In Section  3 , we establish our main general theorems, while in the following section we apply the aforementioned results and prove two principal general theorems on sums of trigonometric functions. We also offer several corollaries.
Some of the identities found by Liu [7are not associated with characters. In Section  5 , we evaluate a large class of trigonometric sums which includes four of Liu's identities.
We close the introduction by recording those properties of Gauss sums that are used in the sequel. Throughout this paper, χ   denotes a non-principal, real, primitive character modulo k   , where k   is an odd positive integer at least equal to 3. Define the Gauss sum G ( z , χ )   for any complex number z   by
G ( z , χ ) : = j = 0 k 1 χ ( j ) e 2 π i j z / k . (1.7)
Then, for each integer n   , we have the factorization theorem [2,p. 9,Thm. 1.1.3
G ( n , χ ) = χ ( n ) G ( 1 , χ ) = : χ ( n ) G ( χ ) . (1.8)
In fact,  1.8 characterizes real primitive characters, i.e.,  1.8 holds if and only if χ   is real and primitive [1,p. 482,Thm. 1, [6,pp. 65–66. We need Gauss's famous evaluation [5,p. 349,Thm. 7, [2,p. 22,Thm. 1.3.4
G ( χ ) = { k , if χ is even i k , if χ is odd . (1.9)
In the sequel, R α ( f ) = R α   denotes the residue of a meromorphic function f   at a pole α   .

2 Trigonometric Sums Associated with Even Characters

At the outset, we remark that we consider less general functions in Theorem  2.1 than we did for the corresponding theorem in [3, because otherwise the computations of residues would have been more cumbersome and the results less elegant.
Theorem 2.1. Let χ   be a real, non-principal, even, primitive character of modulus k   , where k   is odd. For each nonnegative integer a   and even positive integer b   , define
S 1 ( a , b , χ ) : = 0 < n < k / 2 χ ( n ) cos a ( b π n / k ) cos 2 ( π n / k ) (2.1)
and
E ( a , b , χ ) : = 1 2 a 2 n , j , r 02 ( n + j + b r ) = a b ( 1 ) j j χ ( n ) ( a r ) , (2.2)
where the sum is over all nonnegative integers n   , j   , and r   satisfying the condition 2 ( n + j + b r ) = a b   . Also, set
g ( χ ) : = j = 1 k 1 ( 1 ) j j χ ( j ) . (2.3)
Then,
S 1 ( a , b , χ ) = k ( ( 1 ) a b / 2 g ( χ ) + E ( a , b , χ ) ) . (2.4)
  • Proof. For N > 0   , let C N   denote the positively oriented indented rectangle with horizontal sides through ± i N   and vertical sides through 0   and k   . On the left side of C N   , there is a semicircular indentation I 0   of radius less than 1   centered at 0   and to its left. On the right side of C N   , the semicircular indentation comprises the points I 0 + k   .
    Consider the meromorphic function
    f ( z ) = G ( z , χ ) G ( χ ) cos a ( b π z / k ) cos 2 ( π z / k ) 1 e 2 π i z 1 . (2.5)
    We shall integrate f ( z )   over the contour C N   , on the interior of which the function f ( z )   has simple poles (at most) at z = 1 , 2 , . . . , k 1   . Also on the interior of C N   , f ( z )   has a simple pole at z = k / 2   . This pole is simple because k   is odd and because G ( k / 2 , χ ) = 0   . To see this, use  1.7 , replace j   by k j   , and recall that χ   is even. We thus find that G ( k / 2 , χ ) = G ( k / 2 , χ )   , i.e., G ( k / 2 , χ ) = 0   . Lastly, since G ( 0 , χ ) = 0   , f ( z )   does not have a pole at z = 0   .
    We first calculate the residues of the poles of f ( z )   on the interior of C N   . Using  1.8 , we easily find that for each positive integer n   ,
    R n = G ( n , χ ) G ( χ ) cos a ( b π n / k ) cos 2 ( π n / k ) 1 2 π i = χ ( n ) 2 π i cos a ( b π n / k ) cos 2 ( π n / k ) (2.6)
    and
    R k n = G ( k n , χ ) G ( χ ) cos a ( b π ( k n ) / k ) cos 2 ( π ( k n ) / k ) 1 2 π i = R n , (2.7)
    because χ   and b   are even. Secondly, using  1.9 , we readily find that
    R k / 2 = lim z k / 2 1 G ( χ ) G ( z , χ ) cos ( π z / k ) z k / 2 cos ( π z / k ) cos a ( b π z / k ) e 2 π i z 1
    = ( 1 ) a b / 2 k i π j = 1 k 1 ( 1 ) j j χ ( j )
    = ( 1 ) a b / 2 k i π g ( χ ) , (2.8)
    by  2.3 . Hence, by the residue theorem,  2.6  2.8 , and  2.1 ,
    C N f ( z ) d z = 2 ( 1 ) a b / 2 k g ( χ ) + 2 S 1 ( a , b , χ ) . (2.9)
    Next, we let N   in order to calculate directly the integral in  2.9 . Firstly, observe from  2.5 that because b   is even, f ( z )   has period k   , and so the integrals over the indented vertical sides of C N   cancel. Secondly, examine the integral over the top horizontal side C N T   of C N   . Set z = x + i N   , 0 x k   , and
    μ : = e 2 π i z / k = e 2 π N / k e 2 π i x / k . (2.10)
    Then, by  1.7 ,
    G ( z , χ ) e 2 π i z 1 = ( j = 0 k 1 χ ( j ) μ j ) ( n = 0 μ k n ) = n = 0 j = 0 k 1 χ ( j ) μ k n + j
    = n = 0 j = 0 k 1 χ ( k n + j ) μ k n + j = m = 0 χ ( m ) μ m , (2.11)
    cos a ( b π z / k ) = ( μ b / 2 + μ b / 2 2 ) a = 1 2 a μ a b / 2 ( 1 + μ b ) a = 1 2 a μ a b / 2 r = 0 a ( a r ) μ b r , (2.12)
    and cos 2 ( π z / k ) = 4 μ 1 ( 1 + μ ) 2 = 4 j = 1 ( 1 ) j 1 j μ j . (2.13)
    Thus, f ( z )   has the form
    f ( z ) = f ( x + i N ) = n = a b / 2 0 c n μ n + n = 1 c n μ n (2.14)
    for some constants c n   , along the top horizontal side C N T   . Observe that we can ignore the terms of the form c n μ n   with n > 0   , since their contributions to the integral of f ( z )   over C N T   tend to 0 as N   tends to   (recall that | μ | = e 2 π N / k   ). Thus, we truncate  2.14 , keeping only the first sum in  2.14 , and integrate termwise. Since, for n 0   ,
    k 0 μ n d x = 0 , (2.15)
    we find that
    C N T f ( z ) d z = k c 0 . (2.16)
    Since f ( z )   is an odd function with period k   , we find that
    C N T f ( z ) d z = z = k + i N z = i N f ( z ) d z = z = k i N z = i N f ( z ) d z
    = u = k i N u = i N f ( u ) d u = u = i N u = k i N f ( u ) d u = C N B f ( z ) d z , (2.17)
    where C N B   is the lower horizontal path of C N   . Thus, by  2.9 and  2.16 , we conclude that
    2 k c 0 = 2 ( 1 ) a b / 2 k g ( χ ) + 2 S 1 ( a , b , χ ) , (2.18)
    where c 0   is defined in  2.14 . To compute c 0   , we utilize  2.11  2.13 and the definition  2.5 of f   to find that along C N T   ,
    f ( z ) = 1 G ( χ ) μ a b / 2 2 a 2 n = 0 χ ( n ) μ n r = 0 a ( a r ) μ b r j = 1 ( 1 ) j 1 j μ j . (2.19)
    The constant term in  2.19 is equal to
    c 0 = 1 2 a 2 G ( χ ) n , j , r 0 n + j + b r = a b / 2 ( 1 ) j j χ ( n ) ( a r ) = 1 k E ( a , b , χ ) , (2.20)
    by  1.9 and  2.2 . Hence, from  2.18 and  2.20 , we deduce that 2 k c 0 = 2 k E ( a , b , χ ) = 2 ( 1 ) a b / 2 k g ( χ ) + 2 S 1 ( a , b , χ ) ,   which completes the proof of Theorem  2.1 .
We state the special case a = 1   as a separate corollary.
Corollary 2.2. Let b   be a positive even integer, and assume that χ   satisfies the conditions of Theorem  2.1 . Let
E ( b , χ ) : = 2 n , j 12 n + 2 j = b ( 1 ) j j χ ( n ) . (2.21)
Then
0 < n < k / 2 χ ( n ) cos ( b π n / k ) cos 2 ( π n / k ) = k ( ( 1 ) b / 2 g ( χ ) + E ( b , χ ) ) . (2.22)
In particular, if b = 2   , then E ( 2 , χ ) = 0   . We thus deduce the following corollary of Corollary  2.2 .
Corollary 2.3. For χ   as above,
0 < n < k / 2 χ ( n ) cos ( 2 π n / k ) cos 2 ( π n / k ) = g ( χ ) k . (2.23)
In particular, from  2.3 , we note that g ( χ )   is an integer, and so  2.23 is an analogue of Gauss's theorem  1.9 for even χ   , namely,
n = 1 k 1 χ ( n ) cos ( 2 π n / k ) = k . (2.24)
Letting k = 5   in  2.23 and noting that g ( χ ) = 4   , we find that
cos ( 2 π / 5 ) cos 2 ( π / 5 ) + cos ( π / 5 ) cos 2 ( 2 π / 5 ) = 4 5 . (2.25)
Of course, since
cos ( π 5 ) = 5 + 1 4 and cos ( 2 π 5 ) = 5 1 4 , (2.26)
 2.25 may be easily verified directly.

3 A General Theorem

If k   is an odd positive integer, let χ o ( n )   be a real, odd, non-principal, primitive character of period k   , and let χ e ( n )   be a real, even, non-principal, primitive character of period k   . Define
H o ( z ) : = G ( z ; χ o ) G ( χ o ) 1 e 2 π i z 1 ,
H e ( z ) : = G ( z ; χ e ) G ( χ e ) 1 e 2 π i z 1 .
Theorem 3.1. Let k   , χ o   , χ e   , H o   , and H e   be as above, and let f o ( z )   and f e ( z )   be meromorphic functions satisfying the following properties:
  • (i) f o ( z ) = f o ( z + k )   and f e ( z ) = f e ( z + k )   for all z C   ,
  • (ii) f o ( z ) = f o ( z )   and f e ( z ) = f e ( z )   for all z C   ,
  • (iii) f o ( z )   and f e ( z )   are analytic for Im ( z ) 0   as well as at integers not divisible by k   ,
  • (iv) f o   and f e   have poles at the points z 1 o , . . . , z M o   and z 1 e , . . . , z M e   , respectively,
  • (v) f o ( z )   and f e ( z )   have Fourier expansions of the form
    f o ( z ) = m = D A m e 2 π i m z / k , (3.1)
    f e ( z ) = m = D B m e 2 π i m z / k (3.2)
    in the upper half-plane.
Then,
0 < n < k / 2 χ o ( n ) f o ( n ) = i k m = 0 D χ o ( m ) A m π i m = 1 M R z m o ( H o f o ) π i R 0 ( H o f o ) (3.3)
and
0 < n < k / 2 χ e ( n ) f e ( n ) = k m = 0 D χ e ( m ) B m π i m = 1 M R z m e ( H e f e ) π i R 0 ( H e f e ) . (3.4)
  • Proof. We prove  3.3 ; the proof of  3.4 is similar.
    Note that
    H o ( z ) = j = 1 k 1 χ o ( j ) e 2 π i j ( z ) / k G ( χ o ) e 2 π i z e 2 π i z 1
    = j = 1 k 1 χ o ( j ) e 2 π i ( k j ) z / k G ( χ o ) ( e 2 π i z 1 )
    = j = 1 k 1 χ o ( k j ) e 2 π i ( k j ) z / k G ( χ o ) ( e 2 π i z 1 )
    = H o ( z ) .
    Thus, the function F o ( z ) : = H o ( z ) f o ( z )   is an odd function with period k   . This function has poles at z 1 o , . . . , z M o   , and (at most) simple poles at the points z = 1 , . . . , k 1   . It also may have a pole at z = 0   . Let C N   denote the same positively oriented indented rectangle as in Theorem  2.1 . Hence, by the residue theorem,
    1 2 π i C N F o ( z ) d z = j = 1 k 1 R j ( F o ) + m = 1 M R z m o ( F o ) + R 0 ( F o ) . (3.5)
    We first compute the residues at the integers z = 1 , . . . , k 1   . Since these are (at most) simple poles, the residue at z = j   is given by R j ( F o ) = lim z j ( z j ) F o ( z ) = lim z j G ( z ; χ o ) G ( χ o ) f o ( z ) z j e 2 π i z 1 = 1 2 π i χ o ( j ) f o ( j ) ,   where we have used  1.8 in the last step. By the oddness and periodicity of χ o   and f o   , we find that
    j = 1 k 1 R j ( F o ) = j = 1 k 1 1 2 π i χ o ( j ) f o ( j ) = 1 π i 1 j < k / 2 χ o ( j ) f o ( j ) . (3.6)
    Secondly, we evaluate the integral on the left-hand side of  3.5 directly. By periodicity, the integrals along the vertical sides of C N   cancel. Thus, using the oddness of F o ( z )   and periodicity, we see that the integral along the upper horizontal edge is equal to
    z = k + i N z = i N F o ( z ) d z = z = k i N z = i N F o ( z ) d z = u = k i N u = i N F o ( u ) d u = u = i N u = k i N F o ( u ) d u , (3.7)
    which is the integral along the lower horizontal edge. Also, since the right-hand side of  3.5 is independent of N   , we may let N   tend to   . Thus, it remains to evaluate lim N 1 2 π i C N F o ( z ) d z = lim N 1 π i k 0 F o ( x + i N ) d x .   Now let
    μ : = e 2 π i z / k (3.8)
    and expand F o ( z )   in a power series in μ   . Since 1 e 2 π i z 1 = 1 μ k μ 2 k ,  
    F o ( z ) = 1 G ( χ o ) ( j = 0 k 1 χ o ( j ) μ j ) ( m = D A m μ m ) ( n = 0 μ k n )
    = 1 G ( χ o ) ( n = 0 j = 0 k 1 χ o ( j ) μ k n + j ) ( m = D A m μ m )
    = 1 G ( χ o ) ( n = 0 χ o ( n ) μ n ) ( m = D A m μ m )
    = 1 G ( χ o ) m = D c m μ m (3.9)
    for some constants c m , m D   . Since k 0 m = 1 c m μ m d x   tends to 0 as N   tends to   , and k 0 μ m d x = 0   for any m 0   , we find that, upon the use of  3.7 ,
    lim N 1 2 π i C N F o ( z ) d z = k c 0 π i G ( χ o ) = k π i G ( χ o ) m = 0 D A m χ o ( m ) , (3.10)
    by  3.1 .
    In summary, we utilize  3.6 and  3.10 in  3.5 to conclude that
    k π i G ( χ o ) m = 0 D A m χ o ( m ) = 1 π i 1 j < k / 2 χ o ( j ) f o ( j ) + m = 1 M R z m o ( F o ) + R 0 ( F o ) . (3.11)
    Upon using the evaluation  1.9 for G ( χ o )   , we see that  3.11 is equivalent to  3.3 .

4 Two Theorems on Trigonometric Sums and Corollaries

We observe that for any integer b   the sine and cosine functions satisfy the following properties:
sin ( b π ( x + k ) / k ) = ( 1 ) b sin ( b π x / k ) ,
cos ( b π ( x + k ) / k ) = ( 1 ) b cos ( b π x / k ) .
Thus, we may construct odd and even functions satisfying properties (i)–(v) in Theorem  3.1 by taking appropriate products and quotients of sines and cosines. In particular, we have the following theorem.
Theorem 4.1. Let k   be an odd positive integer, and let χ e   be a real, even, non-principal, primitive character of period k   . Let L   , a   , and J   be non-negative integers with a J + 1   . Let b 1 , . . . , b L , c 1 , . . . , c L , d 1 , . . . , d J   be positive integers such that the sum E : = a + = 1 L ( b c ) + j = 1 J d j   is even, and that d 1 , . . . , d a 1   are odd. Suppose also that ( c , k ) = 1   for 1 L   , and ( c i , c j ) = 1   for each i j   . Define
g ( χ e ) = j = 1 k 1 ( 1 ) j j χ e ( j ) , (4.1)
and let P o ( n )   (resp., P e ( n )   ) denote the number of solutions in the ( 2 L + J + a )   -tuples ( ɛ 1 , . . . , ɛ L , m 1 , . . . , m L , ɛ 1 , . . . , ɛ J , m 1 , . . . , m a )   to the equation
n = ɛ 1 b 1 + + ɛ L b L + m 1 c 1 + + m L c L + ɛ 1 d 1 + + ɛ J d J + m 1 + + m a , (4.2)
where ɛ i + m i   is odd (resp., even ), and ɛ i , ɛ i { 0 , 1 } , m i , m i N { 0 }   .
Then
0 < n < k / 2 χ e ( n ) ( L = 1 sin ( b π n / k ) sin ( c π n / k ) ) ( j = 1 J cos ( d j π n / k ) cos a ( π n / k ) )
= k { 2 a J m = 0 E / 2 χ e ( m ) ( P e ( E 2 m ) P o ( E 2 m ) )
i ( M = 1 L 1 n < c M n c M / 2 ( 1 ) n c M G ( n k / c M , χ e ) = 1 L sin ( n b π / c M ) j = 1 J cos ( n d j π / c M ) ( e 2 π i n k / c M 1 ) cos a ( n π / c M ) M sin ( n c π / c M ) )
1 M L c M even ( 1 ) c M / 2 c M ( 1 ) a g ( χ e ) j = 1 a 1 ( 1 ) ( d j 1 ) / 2 d j = 1 L sin ( b π / 2 ) j = a J cos ( d j π / 2 ) M sin ( c π / 2 ) } . (4.3)
In the preceding theorem, and throughout the rest of this section, we adopt the convention that the empty products j = 1 0 a j = 1   and j = 1 1 a j = 0   .
  • Proof. In Theorem  3.1 , let f e ( z )   be given by
    f e ( z ) = ( L = 1 sin ( b π z / k ) sin ( c π z / k ) ) ( j = 1 J cos ( d j π z / k ) cos a ( π z / k ) ) . (4.4)
    The function f e   has possible poles at the points n k / c   , where 1 n < c   . We note that none of these values are integers, because ( c , k ) = 1   for all   . Since ( c i , c j ) = 1   for all i j   , these values are distinct. Thus, these are at most simple poles, with the possible exception of k / 2   , which occurs if one of the c   is even. Since at least a 1   of the d j   are odd, the point z = k / 2   contributes a pole of order at most 1 from the cosine factors. Since the numbers of sine factors in the numerator and denominator are equal, z = 0   is a removable singularity.
    Since H e   has a removable singularity at z = 0   and a simple zero at z = k / 2   (since G ( k / 2 , χ e ) = 0   ), we conclude that H e f e   has at most simple poles at n k / c   for each 1 n < c , 1 L   . Thus, the residue at the point n k / c M   , where 1 M L   and n c M / 2   , is
    R n k / c M ( H e f e ) = lim z n k / c M z n k / c M sin ( c M π z / k ) G ( z , χ e ) = 1 L sin ( b π z / k ) j = 1 J cos ( d j π z / k ) G ( χ e ) ( e 2 π i z 1 ) cos a ( π z / k ) M sin ( c π z / k )
    = ( 1 ) n k c M π G ( n k / c M , χ e ) = 1 L sin ( n b π / c M ) j = 1 J cos ( n d j π / c M ) G ( χ e ) ( e 2 π i n k / c M 1 ) cos a ( n π / c M ) M sin ( n c π / c M ) . (4.5)
    When z = ( c M / 2 ) k / c M   , where c M   is the unique even c   (if there is such a c   ), the residue is
    R k / 2 ( H e f e ) = lim z k / 2 z k / 2 sin ( c M π z / k ) G ( z , χ e ) j = 1 a 1 cos ( d j π z / k ) cos a ( π z / k )
    × = 1 L sin ( b π z / k ) j = a J cos ( d j π z / k ) G ( χ e ) ( e 2 π i z 1 ) M sin ( c π z / k )
    = ( 1 ) c M / 2 k c M π 2 π i g ( χ e ) j = 1 a 1 ( 1 ) ( d j 1 ) / 2 d j = 1 L sin ( b π / 2 ) j = a J cos ( d j π / 2 ) π ( 1 ) a G ( χ e ) ( 2 ) M sin ( c π / 2 ) . (4.6)
    Lastly, we need to compute the Fourier expansion of f e ( z )   in the upper half-plane.
    We note that, with μ = e 2 π i z / k   as in  3.8 ,
    f e ( z ) = ( L = 1 e i b π z / k e i b π z / k e i c π z / k e i c π z / k ) 2 a J j = 1 J ( e i d j π z / k + e i d j π z / k ) ( e i π z / k + e i π z / k ) a
    = 2 a J μ { = 1 L ( b c ) a + j = 1 J d j } / 2 L = 1 1 μ b 1 μ c j = 1 J ( 1 + μ d j ) ( 1 + μ ) a
    = 2 a J μ E / 2 L = 1 ( 1 μ b ) L = 1 ( m = 0 μ m c ) J j = 1 ( 1 + μ d j ) ( m = 0 ( 1 ) m μ m ) a . (4.7)
    By  3.4 , we need to determine the coefficient B m   of μ m   , as defined in  3.2 . Collecting powers in  4.7 , we see that
    B m = 2 a J ( P e ( E 2 m ) P o ( E 2 m ) ) . (4.8)
    Using  4.5 ,  4.6 , and  4.8 in  3.4 , along with the evaluation of G ( χ e )   in  1.9 , we complete the proof.
Theorem 4.2. For each pair of odd positive integers a   and b   ,
0 < n < k / 2 χ e ( n ) cos a ( b π n / k ) cos ( π n / k ) = k F ( a , b , χ ) , (4.9)
where F ( a , b , χ ) : = 1 2 a 1 n , j , r 02 ( n + j + b r ) = a b 1 ( 1 ) j χ ( n ) ( a r ) ,   where the sum is over all nonnegative integers n   , j   , and r   satisfying the condition 2 ( n + j + b r ) = a b 1   .
  • Proof. In Theorem  4.1 , let L = 0   , a = 1   , J = a   , and d 1 = = d J = b   . Then we find that E = a b 1   is even, and that the second and third sums on the right-hand side of  4.3 equal 0   . We also find that the right-hand side of  4.2 becomes b ( ɛ 1 + + ɛ a ) + m 1   .
    Therefore, P e ( a b 1 2 m ) P o ( a b 1 2 m ) = m 1 , r 0 ( a b 1 ) / 2 m m 1 b r = 0 ( 1 ) r ( a r ) ,   where the sum is over all non-negative integers m 1 , r   satisfying the condition ( a b 1 ) / 2 m m 1 b r = 0   . Rearranging the expression for the indices of summation, and summing over m   , we complete the proof.
We now examine some special cases of Theorem  4.2 when b = 1   .
Corollary 4.3. If a   is odd and χ   is even,
0 < n < k / 2 χ ( n ) cos a 1 ( π n / k ) = k F ( a , 1 , χ ) . (4.10)
  • Proof. Set b = 1   in Theorem  4.2 .
If a = 1   , then trivially F ( 1 , 1 , χ ) = 0   , and so Corollary  4.3 reduces to
0 < n < k / 2 χ ( n ) = 0 , (4.11)
which is easy to establish directly.
If a = 3   , observe that F ( 3 , 1 , χ ) = 1 4   . Thus, from Corollary  4.3 ,
0 < n < k / 2 χ ( n ) cos 2 ( π n / k ) = 1 4 k . (4.12)
The evaluation  4.12 is also elementary, because if one applies the double angle formula for cos ( 2 π n / k )   on the left side of  4.12 and uses both  2.24 and  4.11 ,  4.12 easily follows.
If k = 5   in  4.12 , we deduce that cos 2 ( π / 5 ) cos 2 ( 2 π / 5 ) = 1 4 5 ,   which of course is an easy consequence of  2.26 .
If a = 5   , Corollary  4.3 reduces to
0 < n < k / 2 χ ( n ) cos 4 ( π n / k ) = 1 16 ( 4 + χ ( 2 ) ) k . (4.13)
Using the double angle for cosine twice, along with  2.24 ,  4.11 , and  4.12 , we can verify  4.13 directly.
Corollary 4.4. Let a   , d   , and J   be nonnegative integers such that a J + 1   and E : = d J a + 12   is even. Then
0 < n < k / 2 χ e ( n ) sin ( 3 π n / k ) sin ( 5 π n / k ) sin ( 7 π n / k ) cos J ( d π n / k ) sin 3 ( π n / k ) cos a ( π n / k )
= k 2 J a G ( χ e ) m = 0 E / 2 χ e ( m ) E / 2 m 3 ɛ 1 5 ɛ 2 7 ɛ 3 d j > 0 ɛ i { 0 , 1 } , 0 j J ( 1 ) j + ɛ 1 + ɛ 2 + ɛ 3
× ( E / 2 m 3 ɛ 1 5 ɛ 2 7 ɛ 3 d j + 3 + a 3 + a ) . (4.14)
  • Proof. Put L = 3   and set c = 1   , 1 3   . Thus, the second and third sums on the right-hand side of  4.3 equal 0   . By moving the terms involving ɛ i   and ɛ i   to the left-hand side of  4.2 , we find that the number of representations in ( m 1 , m 2 , m 3 , m 1 , . . . , m a )   of E / 2 m ɛ i b i ɛ i d i = m 1 + m 2 + m 3 + m 1 + . . . + m a   is equal to ( E / 2 m ɛ i b i ɛ i d i + 3 + a 3 + a ) .   The desired result now follows.
The next result is an analogue of Theorem 7.1 in [3. Technically, this theorem follows from Theorem  4.1 , but it is perhaps easier to derive the result from Theorem  3.1 .
Theorem 4.5. Let χ   be even, and suppose that b   is an even positive integer. Then
S 3 ( b , χ ) : = 0 < n < k / 2 χ ( n ) sin ( b π n / k ) cot ( π n / k ) = k H ( b , χ ) , (4.15)
where
H ( b , χ ) : = 1 2 χ ( b 2 ) + n , j 12 n + 2 j = b χ ( n ) . (4.16)
  • Proof. We let f e ( z ) = sin ( b π z / k ) cot ( π z / k )   and χ e = χ   in Theorem  3.1 . Observe that f ( z )   has no poles at non-integer points. To compute its Fourier expansion, note that
    sin ( b π z / k ) = 1 2 i μ b / 2 ( 1 μ b ) (4.17)
    and cot ( π z / k ) = i ( 1 + 2 j = 1 μ j ) . (4.18)
    Thus,
    f e ( z ) = 1 2 μ b / 2 ( 1 μ b ) + μ b / 2 ( 1 μ b ) j = 1 μ j
    = μ b / 2 μ b / 2 2 + μ b / 2 j = 1 b 1 μ j . (4.19)
    Therefore the coefficient B m   of μ m   when m 0   is
    B m = { 1 / 2 , if m = b / 2 , 1 , otherwise . (4.20)
    Using  4.20 in  3.4 , we obtain  4.15 , and the proof of Theorem  4.5 is complete.
Corollary 4.6. For even χ   ,
0 < n < k / 2 χ ( n ) cos 2 ( π n / k ) = 1 4 k . (4.21)
  • Proof. Set b = 2   and use the identity sin ( 2 θ ) = 2 sin θ cos θ   in  4.15 . Then note that H ( 2 , χ ) = 1 2   .
The identity  4.21 is identical to  4.12 .
We now derive an analogue of Theorem  4.1 for odd characters.
Theorem 4.7. Let k   be an odd positive integer, and let χ o   be a real, odd, non-principal, primitive character of period k   . Let L   , a   , and J   be non-negative integers with a J + 1   . Let b 1 , . . . , b L , c 1 , . . . , c L , d 1 , . . . , d J   denote positive integers such that the sum E : = 1 a + = 1 L ( b c ) + j = 1 J d j   is even and such that d 1 , . . . , d a 1   are odd. Suppose also that ( c , k ) = 1   for 1 L   and that ( c i , c j ) = 1   for i j   . Let P o ( n )   (resp., P e ( n )   ) denote the number of solutions in the ( 2 L + J + a + 1 )   -tuples ( ɛ 1 , . . . , ɛ L , m 0 , m 1 , . . . , m L , ɛ 1 , . . . , ɛ J , m 1 , . . . , m a )   to the equation
n = ɛ 1 b 1 + + ɛ L b L + m 0 + m 1 c 1 + + m L c L + ɛ 1 d 1 + + ɛ J d J + m 1 + + m a , (4.22)
where ɛ i + m i   is odd (resp., even ), ɛ i , ɛ i { 0 , 1 }   , and m i , m i N { 0 }   .
Then
0 < n < k / 2 χ o ( n ) ( 1 sin ( π n / k ) L = 1 sin ( b π n / k ) sin ( c π n / k ) ) ( j = 1 J cos ( d j π n / k ) cos a ( π n / k ) )
= k { 2 1 + a J m = 0 E / 2 χ o ( m ) ( P e ( E 2 m ) P o ( E 2 m ) )
M = 1 L 1 n < c M ( 1 ) n c M G ( n k / c M , χ o ) = 1 L sin ( n b π / c M ) j = 1 J cos ( n d j π / c M ) ( e 2 π i n k / c M 1 ) sin ( n π / c M ) cos a ( n π / c M ) M sin ( n c π / c M )
+ G ( k / 2 , χ o ) j = 1 a 1 ( 1 ) ( d j 1 ) / 2 d j = 1 L sin ( b π / 2 ) j = a J cos ( d j π / 2 ) 2 = 1 L sin ( c π / 2 )
j = 1 k 1 j χ o ( j ) k L = 1 b c } . (4.23)
  • Proof. The proof is analogous to that of Theorem  4.1 . We highlight the main differences.
    We let f o ( z )   in Theorem  3.1 be given by
    f o ( z ) = 1 sin ( π z / k ) ( L = 1 sin ( b π z / k ) sin ( c π z / k ) ) ( j = 1 J cos ( d j π z / k ) cos a ( π z / k ) ) . (4.24)
    We now need to determine the poles of the function H o f o   . Note that again we have poles at each of the points n k / c   , 1 n < c   , 1 L   . There is also (at most) a simple pole at k / 2   . Note that for odd characters G ( k / 2 , χ o ) 0   , but there is a possible pole at k / 2   arising from an even c   . Finally, there exists a pole at z = 0   arising from the extra sine factor in the denominator.
    For 1 M L   , 1 n < c M   ,
    R n k / c M ( H o f o )
    = lim z n k / c M z n k / c M sin ( c M π z / k ) G ( z , χ o ) = 1 L sin ( b π z / k ) j = 1 J cos ( d j π z / k ) G ( χ o ) ( e 2 π i z 1 ) sin ( π z / k ) cos a ( π z / k ) M sin ( c π z / k )
    = ( 1 ) n k c M π G ( n k / c M , χ o ) = 1 L sin ( n b π / c M ) j = 1 J cos ( n d j π / c M ) G ( χ o ) ( e 2 π i n k / c M 1 ) sin ( n π / c M ) cos a ( n π / c M ) M sin ( n c π / c M ) . (4.25)
    Next,
    R k / 2 ( H o f o )
    = lim z k / 2 ( z k / 2 ) j = 1 a 1 cos ( d j π z / k ) cos a ( π z / k ) G ( z , χ o ) = 1 L sin ( b π z / k ) j = a J cos ( d j π z / k ) G ( χ o ) ( e 2 π i z 1 ) sin ( π z / k ) = 1 L sin ( c π z / k )
    = k j = 1 a 1 ( 1 ) ( d j 1 ) / 2 d j π G ( k / 2 , χ o ) = 1 L sin ( b π / 2 ) j = a J cos ( d j π / 2 ) G ( χ o ) ( 2 ) = 1 L sin ( c π / 2 ) . (4.26)
    Finally,
    R 0 ( H o f o ) = lim z 0 z sin ( π z / k ) G ( z , χ o ) G ( χ o ) ( e 2 π i z 1 ) ( L = 1 sin ( b π z / k ) sin ( c π z / k ) ) j = 1 J cos ( d j π z / k ) cos a ( π z / k )
    = k π j = 1 k 1 j χ o ( j ) k G ( χ o ) L = 1 b c . (4.27)
    Lastly, we determine the Fourier expansion of f o ( z )   . We readily find that, again with μ = e 2 π i z / k   as in  3.8 ,
    f o ( z ) = 2 i e i π z / k e i π z / k ( L = 1 e i b π z / k e i b π z / k e i c π z / k e i c π z / k ) 2 a J j = 1 J ( e i d j π z / k + e i d j π z / k ) ( e i π z / k + e i π z / k ) a
    = 2 1 + a J i μ { 1 + = 1 L ( b c ) a + j = 1 J d j } / 2 1 1 μ L = 1 1 μ b 1 μ c j = 1 J ( 1 + μ d j ) ( 1 + μ ) a
    = 2 1 + a J i μ E / 2 ( m = 1 μ m ) L = 1 ( 1 μ b ) L = 1 ( m = 0 μ m c )
    × J j = 1 ( 1 + μ d j ) ( m = 0 ( 1 ) m μ m ) a . (4.28)
    Collecting powers, we find that the coefficient A m   of μ m   , as defined in  3.1 , is equal to P e ( E 2 m ) P o ( E 2 m )   .
    If we integrate F e ( z )   over the contour C N   , apply the residue theorem, and calculate directly the integral of F e ( z )   over C N   , using the calculation of the preceding paragraph for the horizontal sides, we complete the proof in the same manner as we did for Theorem  4.1 .
Theorem 4.8. If b   and d   are odd positive integers,
S 4 ( b , d ) : = 4 0 < n < k / 2 χ o ( n ) sin ( b π n / k ) cos ( d π n / k ) sin 2 ( 2 π n / k )
= k ( 4 I ( b , d , χ o ) ( 1 ) ( b + d ) / 2 2 G ( k / 2 , χ o ) ) b k j = 1 k 1 j χ o ( j ) , (4.29)
where
I ( b , d , χ o ) : = m , r 0 χ o ( m ) { ( 1 ) r ( r + 1 ) ( ( ( b + d ) / 2 m r 2 ) + ( ( b d ) / 2 m r 2 ) ) .
+ ( 1 ) r + 1 ( r + 1 ) ( ( d b ) / 2 m r 2 ) } . (4.30)
  • Proof. Let L = J = 1   , b 1 = b   , d 1 = d   , c 1 = 1   , and a = 2   in Theorem  4.7 . Then, upon the use of the identity sin ( 2 θ ) = 2 sin θ cos θ   , we find that the left-hand side of  4.23 is equal to S 4 ( b , d )   . We also find that E = 1 2 + ( b 1 ) + d = b + d 4   is even. We compute the right-hand side of  4.23 . With our choice of parameters, the right-hand side of  4.22 becomes
    b ɛ 1 + m 0 + m 1 + d ɛ 1 + m 1 + m 2 . (4.31)
    We let r = m 1 + m 2   and observe that for each fixed r 0   , we obtain exactly r + 1   ordered pairs of nonnegative integers ( m 1 , m 2 )   . Therefore, for each fixed m   ,
    P e ( 1 2 E m ) P o ( 1 2 E m )
    = r 0 ( 1 ) r ( r + 1 ) ( ( ( b + d 4 ) / 2 m r + 2 2 ) + ( ( b d 4 ) / 2 m r + 2 2 ) )
    + ( 1 ) r + 1 ( r + 1 ) ( ( d b 4 ) / 2 m r + 2 2 ) . (4.32)
    Note that the second sum on the right hand side of  4.23 is empty, and thus is equal to zero. Using  4.32 in  4.23 and simplifying the remaining sums with our choice of parameters, we conclude the proof.
Corollary 4.9. If b   is a positive odd integer,
2 0 < n < k / 2 χ o ( n ) sin ( 2 b π n / k ) sin 2 ( 2 π n / k ) = 4 k m , r 0 χ o ( m ) ( 1 ) r ( r + 1 ) ( b m r 2 )
k ( 1 ) b 2 G ( k / 2 , χ o ) b k j = 1 k 1 j χ o ( j ) . (4.33)
  • Proof. Let b = d   in Theorem  4.8 .
Theorem 4.10. If a   , b   , and d   are integers with a 0   , b 0   and even, and d   odd, then
S 5 ( a , b , d ) : = 2 0 < n < k / 2 χ o ( n ) cos a + b ( d π n / k ) sin ( 2 π n / k ) cos a ( π n / k )
= { k ( 2 2 b J ( a , b , d , χ o ) 1 k j = 1 k 1 j χ o ( j ) ) , if b > 0 , k ( 4 J ( a , 0 , d , χ o ) + ( 1 ) a ( d 1 ) / 2 2 d a G ( k / 2 , χ o ) 1 k j = 1 k 1 j χ o ( j ) ) , if b = 0 , (4.34)
where
J ( a , b , d , χ o ) : = m , r , m 0 , n 02 d n + a + 2 + 2 m + 2 r + 2 m 0 = d ( a + b ) χ o ( m ) ( 1 ) r ( a + r + 1 a + 1 ) ( a + b n ) . (4.35)
  • Proof. In Theorem  4.7 , replace a   by a + 1   and let L = 0   , J = a + b   , and d 1 = = d J = d .   Then upon applying the identity sin ( 2 θ ) = 2 sin θ cos θ   , we find that the left hand side of  4.23 is equal to S 5 ( a , b )   . Note that E = 1 ( a + 1 ) + d ( a + b ) = a ( d 1 ) + d b 2   is even. The right hand side of  4.22 is
    m 0 + d ( ɛ 1 + + ɛ a + b ) + m 1 + + m a + 1 . (4.36)
    Therefore, it is easy to see that if we let r = m 1 + + m a + 1   , for each fixed m 0   ,
    P e ( a d + b d a 2 1 m ) P o ( a d + b d a 2 1 m )
    = r 0 ( 1 ) r ( a + r + 1 a + 1 ) m 0 0 ( a + b ( ( a d + b d a ) / 2 1 m r m 0 ) / d )
    = r , m 0 , n 02 d n + a + 2 + 2 m + 2 r + 2 m 0 = d ( a + b ) ( 1 ) r ( a + r + 1 a + 1 ) ( a + b n ) . (4.37)
    Using  4.37 and evaluating the remaining terms on the right hand side of  4.23 , we easily complete the proof.
Corollary 4.11. If a 1   is even, and if b 0   is odd, then
2 0 < n < k / 2 χ o ( n ) cos a ( b π n / k ) sin ( 2 π n / k )
= k ( 2 2 a m , r , m 0 , n 02 ( b n + m + r + m 0 ) = a b χ o ( m ) ( 1 ) r ( r + 1 ) ( a n ) 1 k j = 1 k 1 j χ o ( j ) ) . (4.38)
  • Proof. Let a = 0 , b = a ,   and d = b   in Theorem  4.10 .
We note that Corollary  4.11 is analogous to Theorem 5.5 of [3. The main difference is that the parameter b   in Corollary  4.11 above is odd, whereas the corresponding parameter in Theorem 5.5 of [3is even.

5 Evaluations of Trigonometric Sums Not Involving Characters

Theorem 5.1. Suppose that a   , b   , and k   are positive integers, where b > 1   and k   is odd. Then
0 < n < k / 2 sin a ( 2 π b n / k ) sin a ( 2 π n / k ) = 1 2 b a + 1 2 k S ( a , b ) , (5.1)
where
S ( a , b ) : = 2 m , n , r 02 b n + 2 m + r k = a b a ( 1 ) n ( a n ) ( a 1 + m m ) , (5.2)
where in the case r = 0   , the terms are to be multiplied by 1 2   .
Theorem  5.1 includes four identities found by Liu [7, namely, the special cases ( a , b , k ) = ( 1 , 2 , 7 ) ,   ( 1 , 3 , 7 )   , ( 7 , 2 , 7 )   , and ( 7 , 3 , 7 )   .
  • Proof. Let
    f ( z ) : = sin a ( 2 π b z / k ) sin a ( 2 π z / k ) cot π z , (5.3)
    and integrate over the same contour C N   described at the beginning of the proof of Theorem  2.1 . Observe that f ( z )   has simple poles at z = 0 , 1 , 2 , . . . , k 1   . A simple calculation shows that
    R 0 = b a π . (5.4)
    For 0 < n < k   , we easily find that
    R n = sin a ( 2 π b n / k ) π sin a ( 2 π n / k ) = R k n . (5.5)
    Hence, by the residue theorem,  5.4 , and  5.5 ,
    C N f ( z ) d z = 2 i b a + 4 i 0 < n < k / 2 sin a ( 2 π b n / k ) sin a ( 2 π n / k ) . (5.6)
    Next we calculate the integral above directly. From the periodicity of f ( z )   , we see that the integrals along the vertical sides of C N   cancel. To compute the integrals on the horizontal pieces, let μ = e 2 π i z / k   . Then
    sin a ( 2 π b z / k ) = ( i 2 ) a μ a b n = 0 a ( 1 ) n ( a n ) μ 2 b n ,
    sin a ( 2 π z / k ) = ( i 2 ) a μ a m = 0 ( a 1 + m m ) μ 2 m ,
    cot π z = i μ k + 1 μ k 1 = i ( 1 + 2 j = 1 μ k j ) .
    Hence,
    f ( z ) = i μ a b + a ( n = 0 a ( 1 ) n ( a n ) μ 2 b n ) ( m = 0 ( a 1 + m m ) μ 2 m ) ( 1 + 2 r = 1 μ k r ) . (5.7)
    As in the proofs in the preceding section, we need to determine the constant term, say C 1   , in the expansion  5.7 . With some care, we see that
    C 1 = i S ( a , b ) , (5.8)
    where S ( a , b )   is defined by  5.2 . Hence, letting N   tend to   , we deduce that
    lim N C N T f ( z ) d z = 0 k C 1 = i k S ( a , b ) . (5.9)
    By an analogous argument, we also find that
    lim N C N B f ( z ) d z = i k S ( a , b ) . (5.10)
    Finally, combining  5.6 ,  5.9 , and  5.10 , we conclude that 2 i b a + 4 i 0 < n < k / 2 sin a ( 2 π b n / k ) sin a ( 2 π n / k ) = 2 i k S ( a , b ) ,   which is equivalent to  5.1 
By a similar argument, we can also prove the following theorem.
Theorem 5.2. Suppose that a   , b   , and k   are positive integers, where b > 1   and k   is odd. Then
0 < n < k / 2 cos a ( 2 π b n / k ) cos a ( 2 π n / k ) = 1 2 + 1 2 k T ( a , b ) , (5.11)
where
T ( a , b ) : = 2 m , n , r 02 b n + 2 m + r k = a b a ( a n ) ( a 1 + m m ) , (5.12)
where in the case r = 0   , the terms are to be multiplied by 1 2   .
References

  1. T. M. Apostol, Euler's φ   -function and separable Gauss sums, Proc. Amer. Math. Soc. 24 (1970), 482–485.
  2. B. C. Berndt, R. J. Evans, and K. S. Williams, Gauss and Jacobi Sums, Wiley, New York, 1998.
  3. B. C. Berndt and A. Zaharescu, Finite trigonometric sums and class numbers, Math. Ann. 330 (2004), 551–575.
  4. B. C. Berndt and L.–C. Zhang, Ramanujan's identities for eta-functions, Math. Ann. 292 (1992), 561–573.
  5. Z. I. Borevich and I. R. Shafarevich, Number Theory, Academic Press, New York, 1966.
  6. H. Davenport, Multiplicative Number Theory, 3rd ed., Springer–Verlag, New York, 2000.
  7. Z.–G. Liu, Some Eisenstein series identities related to modular equations of the seventh order, Pacific J. Math. 209 (2003), 103–130.
  8. S. Ramanujan, Notebooks (2 volumes), Tata Institute of Fundamental Research, Bombay, 1957.

Department of Mathematics, San Francisco State University, 1600 Holloway Ave, San Francisco, CA 94132 Department of Mathematics, University of Illinois, 1409 West Green Street, Urbana, IL 61801, USA E-mail address : beck@math.sfsu.edu E-mail address : berndt@math.uiuc.edu E-mail address : ochan@math.uiuc.edu E-mail address : zaharesc@math.uiuc.edu

1 Research partially supported by grant MDA904-00-1-0015 from the National Security Agency.

2 Research partially supported by the Korea Institute for Advanced Study.

3 Research partially supported by a grant from the University of Illinois Research Board.