**Namhoon Kim**

Department of Mathematics Education, Hongik University, 94 Wausan-ro, Mapo-gu, Seoul 04066, Korea; nkim@hongik.ac.kr

Received: 29 July 2019; Accepted: 8 September 2019; Published: 11 September 2019

**Abstract:** By considering a contour integral of a cotangent sum, we give a simple derivation of a transformation formula of the series *<sup>A</sup>*(*<sup>τ</sup>*,*<sup>s</sup>*) = ∑∞*<sup>n</sup>*=<sup>1</sup> *<sup>σ</sup>s*−<sup>1</sup>(*n*)*e*2*πin<sup>τ</sup>* for complex *s* under the action of the modular group on *τ* in the upper half plane. Some special cases directly give expressions of generalized Dedekind sums as cotangent sums.

**Keywords:** Lambert series; cotangent sum; modular transformation; Dedekind sum

**MSC:** 11F99; 11F20
