**1. Introduction**

For *s* ∈ C, let *<sup>σ</sup>s*(*n*) = ∑*d*|*n ds* be the sum of positive divisors function. For *τ* in the upper half plane H, consider

$$A(\tau, s) = \sum\_{n=1}^{\infty} \sigma\_{s-1}(n) e^{2\pi i n \tau} = \sum\_{n=1}^{\infty} n^{s-1} \frac{e^{2\pi i n \tau}}{1 - e^{2\pi i n \tau}} \,. \tag{1}$$

*<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) is an entire function of *s* for every *τ* ∈ H and a Lambert series in *q* = *e*2*πi<sup>τ</sup>* for every *s* ∈ C. The study of transformation of *<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) under the action of the modular group

$$
\pi \mapsto \frac{a\pi + b}{c\pi + d} \qquad \left(\left(\begin{smallmatrix} \, \, ^a \, \vert \, \, \, \vert \, \, \vert \, \, \vert \, \, \vert \, \, \vert \, \, \vert \, \, \vert \, \, \right) \right) \tag{2}
$$

has been a classical subject. Since *<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) is manifestly invariant under translation *τ* → *τ* + *b* for *b* ∈ Z, one only needs to consider transformations (2) with *c* > 0. The main result of this article is the following transformation formula of *<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*). For *τ* ∈ H, *s* ∈ C and - *a b cd* ∈ SL(2,Z) with *c* > 0,

$$\begin{split} \left( (c\tau+d)^{-s} A\left(\frac{a\tau+b}{c\tau+d},s\right) = A(\tau,s) + \frac{1}{2} \left(1 - (c\tau+d)^{-s}\right) \zeta(1-s) \\ + \frac{c^{s-1}\sec\frac{\pi s}{2}}{8(c\tau+d)^{s/2}} \int\_{\mathbb{C}} (-z)^{s-1} \left( c + \sum\_{j=0}^{c-1} \cot\pi\left(i\sqrt{c\tau+d}z - \frac{jd}{c}\right) \cot\pi\left(\frac{iz}{\sqrt{c\tau+d}} - \frac{j}{c}\right) \right) d\boldsymbol{z} \end{split} \tag{3}$$

where *C* is the Hankel contour that encloses the nonnegative real axis in the clockwise direction but not any other poles of the integrand (see Definition 1 and Theorem 1).

Many previously known transformation formulas can be derived as special cases of (3) by considering some particular values of *s* (see Corollary 1). When *s* is an even positive integer, *<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) appears in the Fourier series of the holomorphic Eisenstein series of weight *s* and satisfies a simple transformation law [1,2] (Corollary 1 (i) and (ii)). The case *s* = 0 is closely related to the Dedekind eta-function

$$\eta(\tau) = e^{\pi i \tau/12} \prod\_{n=1}^{\infty} \left( 1 - e^{2\pi i n \tau} \right) \qquad (\tau \in \mathfrak{H})$$

as a branch of log *η* on H is given by

$$
\log \eta(\tau) = \frac{\pi i \tau}{12} - A(\tau, 0). \tag{4}
$$

We can thus derive the transformation law of log *η*(*τ*) by setting *s* = 0 in (3) (Corollary 1 (iii)). Among many other proofs of the eta-transformation formula, we mention the work of Siegel [3], who gave a simple proof of it under *τ* → −1*τ* by considering a certain contour integral of a product of cotangent functions. This method was generalized by Rademacher to the full modular group in [4].

The transformation property of *<sup>A</sup>*(*<sup>τ</sup>*, 0) also has many applications; for example, it is used in Rademacher's derivation of an analytic formula of the partition function [5], which improved the result of Hardy and Ramanujan [6]. The formula also brings out the notion of the Dedekind sum, which has interesting arithmetic properties [7]. In Corollary 1 (iii), we obtain the cotangent sum representation of the Dedekind sum directly from (3).

The transformation formula of *<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) when *s* is an even negative integer, which led to the idea of generalized Dedekind sums, was found by Apostol [8]. A computational error in [8] was corrected by Mikolás [9] and Iseki [10]. We obtain this formula in Corollary 1 (iv), also with cotangent sum expressions for the generalized Dedekind sums.

The general transformation property of *<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) for complex *s* was first studied by Lewittes [11] in connection with certain generalized Eisenstein series. Berndt derived a transformation formula involving an integral expression in [12], which is further generalized in [13]. We note that the formula (3) involves an integral expression different from the formula in [12]. Studying the behavior of an integral of a more general cotangent sum may be an interesting topic for further investigation.

Throughout this work, logarithms and powers are taken with the principal argument.

#### **2. Transformation Formula**

**Definition 1.** *Let c*, *d* ∈ Z *with* (*c*, *d*) = 1 *and c* > 0*. For τ* ∈ H *and s* ∈ C, *we denote ρ* = √*cτ* + *d and define*

$$I\_{\varepsilon,d}(\tau,s) = \frac{c^{s-1}}{8\rho^s} \int\_{\mathbb{C}} (-z)^{s-1} \left( c + \sum\_{j=0}^{c-1} \cot \pi \left( i\rho z - \frac{jd}{c} \right) \cot \pi \left( \frac{iz}{\rho} - \frac{j}{c} \right) \right) dz \tag{5}$$

*where C is the Hankel contour that encloses the nonnegative real axis* [0, ∞) *in the clockwise direction excluding any other poles of the integrand.*

Consider the integrand in (5). Since

$$\cot \tau z = -i \left( 1 + 2 \frac{e^{2\pi i z}}{1 - e^{2\pi i z}} \right) \,\,\, \tag{6}$$

cot *πz* → −*i* exponentially as Im *z* → ∞. Since both *iρ* and *i*/*ρ* are in the upper half plane, the integrand in (5) decays exponentially as Re *z* → ∞ and thus (5) is an entire function in *s*.

We also note that for *s* ∈ Z, the integral (5) along *C* reduces to the integral around the origin, and *Ic*,*<sup>d</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) = 0 whenever *s* is an odd integer as the integrand becomes even.

We write the following standard argumen<sup>t</sup> as a lemma.

**Lemma 1.** *For* Re *s* < 0,

$$I\_{\mathsf{c},\mathsf{d}}(\mathsf{r},\mathsf{s}) = \frac{\pi i \mathsf{c}^{s-1}}{4\rho^{s}} \sum\_{z \in \mathsf{C} \backslash [0,\infty)} \left( (-z)^{s-1} \sum\_{j=0}^{\mathsf{c}-1} \cot \pi \left( i\rho z - \frac{jd}{c} \right) \cot \pi \left( \frac{iz}{\rho} - \frac{j}{c} \right) \right) \tag{7}$$

*where the sum denotes the sum of all residues in* C\[0, <sup>∞</sup>). **Proof.** Let *KN* = *CN* + *SN* be the keyhole contour in C\[0, <sup>∞</sup>), where *CN* is the part of *C* in Definition 1 in the region |*z*| ≤ *N*, and *SN* traverses along the circle |*z*| = *N*.

We can choose a sequence *N* → ∞ such that each *KN* stays well away from the poles of the integrand of (5). The integral over *CN* is 2*πi* times the sum of the residues inside *KN* minus the integral along *SN*.

The lemma follows since the integral along *SN* vanishes as *N* → ∞ for Re *s* < 0. Under this assumption, the sum of the residues in C\[0, ∞) is absolutely convergent, and the term (−*<sup>z</sup>*)*<sup>s</sup>*−1*<sup>c</sup>* of the integrand can be ignored as it is holomorphic in the slit plane.

We now restate and prove (3) using the notation introduced above.

**Theorem 1.** *For τ* ∈ H *and s* ∈ C, *let <sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) *be the series given by (1). For γ* = - *a b c d* ∈ SL(2,Z) *with c* > 0, *we have*

$$(c\tau + d)^{-s}A\left(\gamma\tau, s\right) = A\left(\tau, s\right) + \frac{1}{2}\left(1 - (c\tau + d)^{-s}\right)\zeta(1-s) + \left(\sec\frac{\pi s}{2}\right)I\_{c,d}(\tau, s) \tag{8}$$

*where γτ* = *aτ*+*b cτ*+*d* , *Ic*,*<sup>d</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) *is given by (5) and ζ*(*s*) *is the Riemann zeta-function.*

**Proof.** Since both sides of (8) are entire in *s*, it suffices to prove the equality for Re *s* < 0. We use Lemma 1 to compute *Ic*,*<sup>d</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*).

For each 0 ≤ *j* < *c*, the factor cot *π*(*<sup>i</sup>ρz* − *jd*/*c*) of (7) has poles at *z* = (*k* + *jd*/*c*)/(*<sup>i</sup>ρ*) for *k* ∈ Z with residue 1/(*πiρ*). Hence the contribution to *Ic*,*<sup>d</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) from the residues of (7) at these poles, excluding *z* = 0, is given by

$$\frac{ie^{s-1}}{4\rho^{s}}\sum\_{\substack{k\in\mathbb{Z},\,0\le j<\varepsilon}}'\frac{1}{i\rho}\left(-\left(k+\frac{jd}{c}\right)\frac{1}{i\rho}\right)^{s-1}\cot\pi\left(\left(k+\frac{jd}{c}\right)\frac{1}{\rho^{2}}-\frac{j}{c}\right)\tag{9}$$

where the prime in the sum indicates that the term with (*k*, *j*)=(0, 0) is omitted.

Since (*c*, *d*) = 1, every integer can be uniquely written in the form *kc* + *jd* for *k* ∈ Z and 0 ≤ *j* < *c*. Let −*n* = *kc* + *jd*. Since *ad* ≡ 1 mod *c*, we have *na* ≡ −*j* mod *c*, and (9) equals

$$\frac{i\varepsilon^{s-1}}{4\rho^s} \sum\_{n\neq 0} \frac{1}{i\rho} \left(\frac{n}{i\rho c}\right)^{s-1} \cot \pi \left(-\frac{n}{\rho^2 c} + \frac{na}{c}\right) \,. \tag{10}$$

We now use the fact that cot *z* is odd. For *n* positive,

$$\frac{1}{i\rho} \left(\frac{n}{i\rho c}\right)^{s-1} - \frac{1}{i\rho} \left(-\frac{n}{i\rho c}\right)^{s-1} = \left(\frac{n}{c}\right)^{s-1} \left(e^{-\frac{\pi i}{2}} + e^{\frac{\pi i}{2}}\right) \rho^{-s} = 2 \left(\cos \frac{\pi s}{2}\right) \left(\frac{n}{c}\right)^{s-1} \rho^{-s},$$

and by (6), (10) becomes

$$\frac{1}{2\rho^{2s}}\cos\frac{\pi s}{2}\left(\zeta(1-s)+2\sum\_{n>0}n^{s-1}\frac{\varepsilon^{2\pi i\left(-\frac{\mathfrak{m}}{\rho^{2}c}+\frac{\mathfrak{m}}{c}\right)}}{1-c}\right).\tag{11}$$

Furthermore, since

$$-\frac{n}{\rho^2 c} + \frac{na}{c} = \frac{n(a\tau + \frac{ad - 1}{c})}{c\tau + d} = n\frac{a\tau + b}{c\tau + d}\lambda$$

the sum in (11) is in fact

$$\sum\_{n>0} n^{s-1} \frac{e^{2\pi i n \frac{a\tau + b}{c\tau + d}}}{1 - e^{2\pi i n \frac{a\tau + b}{c\tau + d}}} = A \left( \frac{a\tau + b}{c\tau + d}, s \right).$$

We now treat the other poles in a similar fashion. For 0 ≤ *j* < *c*, the factor cot *π*(*iz*/*ρ* − *j*/*c*) of (7) has poles at *z* = (*k* + *j*/*c*)(*ρ*/*i*) for *k* ∈ Z with residue *ρ*/(*π<sup>i</sup>*). Summing over the residues of (7) at these poles, excluding *z* = 0, we obtain

$$\frac{ic^{s-1}}{4\rho^s} \sum\_{\substack{k \in \mathbb{Z}, \, 0 \le j < c}}' \frac{\rho}{i} \left(-\left(k + \frac{j}{c}\right) \frac{\rho}{i}\right)^{s-1} \cot \pi \left(\left(k + \frac{j}{c}\right) \rho^2 - \frac{jd}{c}\right). \tag{12}$$

Let *n* = *kc* + *j*, and (12) equals

$$\frac{ic^{s-1}}{4\rho^s} \sum\_{n \neq 0} \frac{\rho}{i} \left(-\frac{n\rho}{ic}\right)^{s-1} \cot \pi \left(\frac{n\rho^2}{c} - \frac{nd}{c}\right) . \tag{13}$$

For *n* positive,

$$\frac{\rho}{i}\left(-\frac{n\rho}{ic}\right)^{s-1} - \frac{\rho}{i}\left(\frac{n\rho}{ic}\right)^{s-1} = -2\left(\cos\frac{\pi s}{2}\right)\left(\frac{n}{c}\right)^{s-1}\rho^s.$$

and thus (13) is

$$-\frac{1}{2}\cos\frac{\pi s}{2}\left(\zeta(1-s)+2\sum\_{n>0}n^{s-1}\frac{e^{2\pi i\left(\frac{np^2}{c}-\frac{nd}{c}\right)}}{1-e^{2\pi i\left(\frac{np^2}{c}-\frac{nd}{c}\right)}}\right),\tag{14}$$

and since *nρ*2/*c* − *nd*/*c* = *n*(*cτ* + *d*)/*c* − *nd*/*c* = *nτ*, the sum in (14) is

$$\sum\_{n>0} n^{s-1} \frac{e^{2\pi i n \tau}}{1 - e^{2\pi i n \tau}} = A(\tau, s).$$

Finally, adding (11) with (14), we obtain

$$I\_{\rm c,d}(\tau,s) = \frac{1}{2\rho^{2s}}\cos\frac{\pi s}{2}\left(\zeta(1-s) + 2A\left(\gamma\tau,s\right)\right) - \frac{1}{2}\cos\frac{\pi s}{2}\left(\zeta(1-s) + 2A(\tau,s)\right)$$

and the theorem follows by dividing both sides by cos *πs*2.

#### **3. Discussion of Some Special Cases**

**Corollary 1.** *For τ* ∈ H *and γ* = - *a b c d* ∈ SL(2,Z) *with c* > 0, *we have the following transformation formulas for <sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) *for s an even integer.*

(i) For any integer *m* ≥ 2,

$$A(c\tau + d)^{-2m}A(\gamma \tau, 2m) = A(\tau, 2m) + \frac{1}{2} \left(1 - (c\tau + d)^{-2m}\right) \zeta(1 - 2m)$$

and thus, if we define G<sup>2</sup>*m*(*τ*) = 12 *ζ*(1 − <sup>2</sup>*m*) + *<sup>A</sup>*(*<sup>τ</sup>*, <sup>2</sup>*m*), it is a modular form of weight 2*m*.

(ii)

$$(c\tau + d)^{-2}A(\gamma \tau, 2) = A(\tau, 2) - \frac{1}{24} \left( 1 - (c\tau + d)^{-2} \right) + \frac{ic}{4\pi(c\tau + d)'} $$

and thus, if we let G2(*τ*) = − 124 + *<sup>A</sup>*(*<sup>τ</sup>*, <sup>2</sup>), then

$$\mathbb{G}\_2(\gamma \tau) = (c\tau + d)^2 \mathbb{G}\_2(\tau) + \frac{ic}{4\pi}(c\tau + d)\dots$$

(iii)

$$A\left(\gamma\tau,0\right) = A\left(\tau,0\right) - \frac{1}{2}\log\left(c\tau+d\right) + \frac{\pi i}{4} - \frac{\pi i}{12c}\left(\frac{1}{c\tau+d} + c\tau + d\right) + \pi i \,\mathfrak{s}(d,c)$$

where the Dedekind sum <sup>s</sup>(*d*, *c*) satisfies

$$\mathfrak{s}(d,c) = \frac{1}{4c} \sum\_{j=1}^{c-1} \cot \pi \left(\frac{jd}{c}\right) \cot \pi \left(\frac{j}{c}\right) \dots$$

and

$$\begin{aligned} \log \eta(\tau + b) &= \frac{\pi i b}{12} + \log \eta(\tau) & (b \in \mathbb{Z})\\ \log \eta(\gamma \tau) &= \log \eta(\tau) + \frac{1}{2} \log(c \tau + d) - \frac{\pi i}{4} + \frac{\pi i (a + d)}{12c} - \pi i \, \mathfrak{s}(d, c). \end{aligned}$$

(iv) For any integer *m* > 0,

$$\begin{split} \left( (c\tau+d)^{2m} A(\gamma\tau, -2m) = A(\tau, -2m) + \frac{1}{2} \left( 1 - (c\tau+d)^{2m} \right) \zeta \left( 1 + 2m \right) \right) \\ &+ \frac{i}{\pi c^{2m+1}} \sum\_{k=0}^{m+1} \zeta(2k) \zeta(2m+2-2k) (c\tau+d)^{2k-1} \\ &+ \frac{\pi^{2m+1} i}{4c^{2m+1}} \sum\_{k=0}^{2m} \sum\_{j=1}^{c-1} \cot^{(k)} \pi \left( \frac{jd}{c} \right) \cot^{(2m-k)} \pi \left( \frac{j}{c} \right) (c\tau+d)^k. \end{split}$$

where cot(*n*) *z* = 1*n*! dd*z <sup>n</sup>* cot *z*.

**Proof.** (i) and (ii) follow from (8) since

$$\begin{aligned} (-1)^m I\_{c,d}(\tau, 2m) &= 0 \quad (m \ge 2) \\ -I\_{c,d}(\tau, 2) &= -\frac{\pi i c}{4\rho^2} \operatorname{Res}\left(z \cot \pi \left(i\rho z\right) \cot \pi \left(\frac{iz}{\rho}\right)\right) = \frac{ic}{4\pi\rho^2} \end{aligned}$$

Let us show (iii). Since lim*s*→<sup>0</sup> 12 (1 − (*cτ* + *d*)−*<sup>s</sup>*) *ζ*(1 − *s*) = −12 log(*cτ* + *d*), we have

$$A\left(\gamma\tau,0\right) = A\left(\tau,0\right) - \frac{1}{2}\log\left(c\tau+d\right) + I\_{c,d}\left(\tau,0\right)$$

where

$$I\_{c,d}(\tau,0) = \frac{1}{8c} \int\_{\mathcal{C}} (-z)^{-1} \left( c + \sum\_{j=0}^{c-1} \cot \pi \left( i\rho z - \frac{jd}{c} \right) \cot \pi \left( \frac{iz}{\rho} - \frac{j}{c} \right) \right) dz$$

$$= \frac{\pi i}{4} + \frac{\pi i}{4c} \operatorname\*{Res}\_{z=0} \left( \frac{1}{z} \sum\_{j=0}^{c-1} \cot \pi \left( i\rho z - \frac{jd}{c} \right) \cot \pi \left( \frac{iz}{\rho} - \frac{j}{c} \right) \right). \tag{15}$$

.

The *j* = 0 term in (15) gives

$$\frac{\pi i}{4c} \operatorname{Res}\_{z=0} \left( \frac{1}{z} \cot \pi \left( i \rho z \right) \cot \pi \left( \frac{iz}{\rho} \right) \right) = -\frac{\pi i}{12c} \left( \frac{1}{c\tau + d} + c\tau + d \right) \tau$$

and the sum over 0 < *j* < *c* in (15) becomes

$$\frac{\pi i}{4c} \sum\_{j=1}^{c-1} \cot \pi \left(\frac{jd}{c}\right) \cot \pi \left(\frac{j}{c}\right) = \pi i \,\mathfrak{s}(d,c)\_{\prime}$$

proving the claim for *<sup>A</sup>*(*<sup>τ</sup>*, 0) in (iii). The transformation formula for log *η*(*τ*) now follows from (4) and the equality

$$\frac{\pi i}{12} \left( \frac{a\tau + b}{c\tau + d} - \tau \right) + \frac{\pi i}{12c} \left( \frac{1}{c\tau + d} + c\tau + d \right) = \frac{\pi i (a+d)}{12c}.$$

For (iv), let *s* = −2*m* in (8) for a positive integer *m*. Then,

$$A(c\tau + d)^{2m}A(\gamma \tau, -2m) = A(\tau, -2m) + \frac{1}{2} \left( 1 - (c\tau + d)^{2m} \right) \zeta(1 + 2m) + (-1)^m I\_{c,d}(\tau, -2m)$$

where

$$\tau(-1)^{m}I\_{\varepsilon,d}(\tau,-2m) = \frac{\pi i \rho^{2m}(-1)^{m}}{4c^{2m+1}} \operatorname{Res}\left(\frac{1}{z^{2m+1}}\sum\_{j=0}^{c-1} \cot \pi\left(i\rho z - \frac{jd}{c}\right) \cot \pi\left(\frac{iz}{\rho} - \frac{j}{c}\right)\right). \tag{16}$$

From the Laurent expansions

$$\cot \pi (i\rho z) = -\frac{2}{\pi} \sum\_{k \ge 0} \zeta(2k) (i\rho z)^{2k-1}$$

$$\cot \pi \left(\frac{iz}{\rho}\right) = -\frac{2}{\pi} \sum\_{k \ge 0} \zeta(2k) \left(\frac{iz}{\rho}\right)^{2k-1}$$

the *j* = 0 term in (16) is

$$\begin{aligned} \frac{\pi i \rho^{2m} (-1)^m}{4 \mathfrak{c}^{2m+1}} \frac{4}{\pi^2} \sum\_{k\_1 + k\_2 = m+1} \zeta(2k\_1) \zeta(2k\_2) (i\rho)^{2k\_1 - 1} \left( \frac{i}{\rho} \right)^{2k\_2 - 1} \\ &= \frac{i}{\pi \mathfrak{c}^{2m+1}} \sum\_{k\_1 + k\_2 = m+1} \zeta(2k\_1) \zeta(2k\_2) \rho^{2(m + k\_1 - k\_2)} \\ &= \frac{i}{\pi \mathfrak{c}^{2m+1}} \sum\_{k\_2 = 0}^{m+1} \zeta(2k) \zeta(2m + 2 - 2k) (c \tau + d)^{2k - 1}, \end{aligned}$$

and from the Taylor expansions for 0 < *j* < *c*,

$$\cot \pi \left( i\rho z - \frac{jd}{c} \right) = -\sum\_{k \ge 0} (-\pi i \rho z)^k \cot^{(k)} \pi \left( \frac{jd}{c} \right)$$

$$\cot \pi \left( \frac{iz}{\rho} - \frac{j}{c} \right) = -\sum\_{k \ge 0} \left( -\frac{\pi i z}{\rho} \right)^k \cot^{(k)} \pi \left( \frac{j}{c} \right) \rho$$

the sum over 0 < *j* < *c* in (16) is

$$\begin{split} \frac{\pi i \rho^{2m} (-1)^m}{4 c^{2m+1}} \sum\_{k\_1 + k\_2 = 2m} \sum\_{j=1}^{c-1} \cot^{(k\_1)} \pi \left( \frac{j d}{c} \right) \cot^{(k\_2)} \pi \left( \frac{j}{c} \right) (-\pi i \rho)^{k\_1} \left( -\frac{\pi i}{\rho} \right)^{k\_2} \\ &= \frac{\pi^{2m+1} i}{4 c^{2m+1}} \sum\_{k\_1 + k\_2 = 2m} \sum\_{j=1}^{c-1} \cot^{(k\_1)} \pi \left( \frac{j d}{c} \right) \cot^{(k\_2)} \pi \left( \frac{j}{c} \right) \rho^{2m + k\_1 - k\_2} \\ &= \frac{\pi^{2m+1} i}{4 c^{2m+1}} \sum\_{k=0}^{2m} \sum\_{j=1}^{c-1} \cot^{(k)} \pi \left( \frac{j d}{c} \right) \cot^{(2m-k)} \pi \left( \frac{j}{c} \right) (c \tau + d)^{k\_r} \end{split}$$

as claimed.

For *x* ∈ R, we define the periodic Bernoulli functions *B <sup>n</sup>*(*x*), *n* ≥ 0, by the following identity as formal power series in *t*:

$$\sum\_{n=0}^{\infty} \widetilde{B}\_n(\mathbf{x}) \frac{t^n}{n!} = \begin{cases} \frac{t e^{\{x\} \ell}}{e^t - 1} & \text{if } \mathbf{x} \in \mathbb{R} \backslash \mathbb{Z} \\\frac{t}{e^t - 1} + \frac{t}{2} & \text{if } \mathbf{x} \in \mathbb{Z} \end{cases} \tag{17}$$

where {*x*} = *x* − *x* is the fractional part of *x*. Under the condition of Corollary 1 (iv), the series *<sup>A</sup>*(*<sup>τ</sup>*, −2*m*) for any integer *m* > 0 is known to satisfy the formula ([8–10,12])

$$\begin{split} (c\tau+d)^{2m} A(\gamma\tau, -2m) &= A(\tau, -2m) + \frac{1}{2} \left( 1 - (c\tau+d)^{2m} \right) \zeta(1+2m) \\ &+ \frac{(2\pi i)^{2m+1}}{2(2m+2)!} \sum\_{k=0}^{2m+2} \binom{2m+2}{k} \sum\_{j=0}^{c-1} \mathbb{B}\_{k}(j/c) \mathbb{B}\_{2m+2-k}(j d/c) (-(c\tau+d))^{k-1}, \end{split} \tag{18}$$

while the sums

$$\sum\_{j=0}^{c-1} \widetilde{B}\_k(j/c) \widetilde{B}\_{2m+2-k}(jd/c)$$

which appear in (18) are regarded as generalized Dedekind sums.

**Remark 1.** *The notation Bn*(*x*) *is often used for B n*(*x*) *in (17), but it is also used for*

$$\overline{B}\_{\mathfrak{n}}(\mathbf{x}) = B\_{\mathfrak{n}}(\{\mathbf{x}\}) \qquad (n \ge 0) \tag{19}$$

*where Bn*(*x*) *denotes the Bernoulli polynomials. With (19), B n*(*x*) *and Bn*(*x*) *only differ by* 12 *when n* = 1 *and x* ∈ Z*. For m* > 0 *and* 0 ≤ *k* ≤ 2*m* + 2*, one can see that the equality*

$$\sum\_{j=0}^{c-1} \mathbb{E}\_k(ja/c) \mathbb{E}\_{2m+2-k}(j\beta/c) = \sum\_{j=0}^{c-1} \tilde{\mathbb{B}}\_k(ja/c) \tilde{\mathbb{B}}\_{2m+2-k}(j\beta/c) \qquad (a,\beta,c \in \mathbb{Z}; c > 0) \tag{20}$$

*holds as <sup>B</sup>*2*m*+<sup>1</sup>(*x*) = *B* <sup>2</sup>*m*+<sup>1</sup>(*x*) *is a periodic odd function, vanishing at 0 and* 12 *. Therefore, (18) can be stated in the same way in either notation.*

In Corollary 1, we have already obtained the cotangent sum representations for the Dedekind sum and its generalizations in (18). On the other hand, we should also be able to obtain Corollary 1 (iv) by assuming (18) and expanding it in discrete Fourier series. We now present this alternative derivation of Corollary 1 (iv).

We first give a proof of the following lemma (cf. [14]), using the generating function (17).

**Lemma 2.** *For j*, *c* ∈ Z *with c* > 0 *and n* ≥ 0*,*

$$\check{B}\_n(j/c) = \left(\frac{B\_n}{c^n}\right)\_{n\ne 1} + \left(n!\left(\frac{i}{2c}\right)^n \sum\_{k=1}^{c-1} \cot^{(n-1)}\pi\left(\frac{k}{c}\right)\,c^{2\pi ijk/c}\right)\_{n\ge 1}$$

*where the first term is not present for n* = 1 *(so that it is only present for even n) and the second term only for n* ≥ 1, *and* cot(*n*) *z* = 1*n*! dd*z <sup>n</sup>* cot *z*.

**Proof.** Let *Fx*(*t*) denote the right-hand side of (17). For *μ* = *<sup>e</sup>*2*πi*/*<sup>c</sup>*, we let

$$F\_{j/c}(t) = \sum\_{k=0}^{c-1} a\_k(t) \mu^{jk} \qquad (j \in \mathbb{Z}).\tag{21}$$

By multiplying both sides of (21) by *μ*<sup>−</sup>*jl* and summing over *j* mod *c*,

$$
\varepsilon a\_l(t) = \sum\_{j=0}^{c-1} F\_{j/c}(t) \mu^{-jl} = \sum\_{j=0}^{c-1} \frac{t \epsilon^{(j/c)t}}{\varepsilon^t - 1} \mu^{-jl} + \frac{t}{2} \qquad (0 \le l < c). \tag{22}
$$

Now, as formal power series in *t* and *x*,

$$\sum\_{j=0}^{c-1} \frac{t e^{(j/c)t}}{e^t - 1} x^j = \frac{t}{e^t - 1} \sum\_{j=0}^{c-1} (e^{t/c} x)^j = \frac{t}{e^t - 1} \frac{1 - e^t x^c}{1 - e^{t/c} x}. \tag{23}$$

.

By putting *x* = *μ*<sup>−</sup>*<sup>l</sup>* in (23), we obtain from (22)

$$a\_l(t) = \frac{t/c}{e^{t/c}\mu^{-l} - 1} + \frac{t}{2c} = \frac{(t/c)e^{2\pi \text{il}/c - t/c}}{1 - e^{2\pi \text{il}/c - t/c}} + \frac{t}{2c}.$$

For *l* = 0, we have

$$a\_0(t) = \frac{t/c}{c^{t/c} - 1} + \frac{t}{2c} = \sum\_{n \ge 0, n \ne 1} \frac{B\_n}{c^n} \frac{t^n}{n!}.$$

For *l* = 0,

$$a\_l(t) = \frac{(t/c)e^{2\pi il/c - t/c}}{1 - e^{2\pi il/c - t/c}} + \frac{t}{2c} = \frac{it}{2c}\cot\left(\frac{\pi l}{c} + \frac{it}{2c}\right) = \sum\_{n\geq 0} t^{n+1} \left(\frac{i}{2c}\right)^{n+1} \cot^{(n)}\pi\left(\frac{l}{c}\right) \dots$$

The lemma follows by taking the coefficient of *tnn*!in (21).

**Proof of Corollary 1 (iv).** We consider the following sum in (18),

$$\frac{(2\pi i)^{2m+1}}{2(2m+2)!} \sum\_{k=0}^{2m+2} \binom{2m+2}{k} \sum\_{j=0}^{c-1} \widetilde{B}\_k(j/c) \widetilde{B}\_{2m+2-k}(jd/c) \left(-(c\tau+d)\right)^{k-1}.\tag{24}$$

We expand *B k*(*j*/*c*) and *B* <sup>2</sup>*m*+2−*<sup>k</sup>*(*jd*/*c*) in (24) by Lemma 2 and sum over *j*. The first cross terms give, for *k* = 2*l*,

$$\frac{(2\pi i)^{2m+1}}{2(2m+2)!} \sum\_{l=0}^{m+1} \binom{2m+2}{2l} \sum\_{j=0}^{c-1} \frac{B\_{2l}}{c^{2l}} \frac{B\_{2m+2-2l}}{c^{2m+2-2l}} \left(-(c\tau+d)\right)^{2l-1}.\tag{25}$$

Since *ζ*(<sup>2</sup>*n*)=(−<sup>1</sup>)*n*+<sup>1</sup> (<sup>2</sup>*π*)<sup>2</sup>*<sup>n</sup>* <sup>2</sup>(<sup>2</sup>*n*)! *B*2*n* and as the identical sum over *j* gives a factor of *c*, (25) simplifies to

$$\frac{i}{2\pi c^{2m+1}}\sum\_{l=0}^{m+1}\zeta(2l)\zeta(2m+2-2l)(c\tau+d)^{2l-1}.\tag{26}$$

The rest of surviving cross terms give

$$\begin{split} \frac{(2\pi i)^{2m+1}}{2} \sum\_{k=1}^{2m+1} \sum\_{j=0}^{c-1} \left( \left(\frac{i}{2c}\right)^k \sum\_{a=1}^{c-1} \cot^{(k-1)}\pi \left(\frac{a}{c}\right) e^{2\pi i j a/c} \right) \\ & \times \left( \left(\frac{i}{2c}\right)^{2m+2-k} \sum\_{\beta=1}^{c-1} \cot^{(2m+1-k)}\pi \left(\frac{\beta}{c}\right) e^{2\pi i j d\beta/c} \right) (-(c\tau+d))^{k-1}, \end{split}$$

which, since

$$\sum\_{j=0}^{c-1} e^{2\pi i j \alpha / c} e^{2\pi i j d\beta / c} = \begin{cases} c & \text{if } \alpha + d\beta \equiv 0 \text{ mod } c\\ 0 & \text{otherwise} \end{cases}$$

equals

$$\frac{\pi^{2m+1}i}{4c^{2m+1}}\sum\_{k=1}^{2m+1}\sum\_{\beta=1}^{c-1}\cot^{(k-1)}\pi\left(\frac{d\beta}{c}\right)\cot^{(2m+1-k)}\pi\left(\frac{\beta}{c}\right)(c\tau+d)^{k-1}.\tag{27}$$

Hence (24) equals to the sum of (26) and (27), which proves equivalence of (18) and Corollary 1 (iv).

**Funding:** This work was supported by the 2018 Hongik University Research Fund.

**Acknowledgments:** The author wishes to thank Jeong Seog Ryu, Hi-joon Chae and Joongul Lee for helpful comments. **Conflicts of Interest:** The author declares no conflict of interest.
