1 Introduction

Special values of trigonometric Dirichlet series have been studied by Cauchy, Lerch, Mellin, Hardy, Ramanujan, Watson and many others since the early twentieth century. Examples, which we will refer to later, include [13, 6, 7, 9, 11]. Many further references, especially to early publications, can be found in [4, Chap. 14] and [5, Chap. 37]. The long history of these series includes, as an early example, the formulas

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\cot (\pi n i)}{n^{2 r - 1}} = \frac{1}{2} (2 \pi i)^{2 r - 1} \sum _{m = 0}^r (- 1)^{m + 1} \frac{B_{2 m}}{(2 m) !} \frac{B_{2 (r - m)}}{(2 (r - m)) !}, \end{aligned}$$
(1)

for even r, which go back to Cauchy and Lerch with later proofs given by several authors; see [1, (6.2)] or [4, Entry 14.25] for a detailed history. In particular, the special case \(r = 4\) in (1), that is

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\cot (\pi n i)}{n^7} = - \frac{19 i}{56, 700} \pi ^7, \end{aligned}$$
(2)

was one of the formulas Ramanujan included in his first letter to Hardy [4, Entry 14.25(ii)]. These series are usually written in terms of the hyperbolic cotangent (so that all quantities involved are real), but the above forms are more natural for our purposes. The evaluations (1) are a consequence of and are explained by Ramanujan’s famous and inspiring formula

$$\begin{aligned}&\alpha ^{- m} \left\{ \frac{\zeta (2 m + 1)}{2} + \sum _{n = 1}^{\infty } \frac{n^{- 2 m - 1}}{e^{2 \alpha n} - 1} \right\} \nonumber \\&\quad =\, (- \beta )^{- m} \left\{ \frac{\zeta (2 m + 1)}{2} + \sum _{n = 1}^{\infty } \frac{n^{- 2 m - 1}}{e^{2 \beta n} - 1} \right\} \nonumber \\&\qquad - 2^{2 m} \sum _{n = 0}^{m + 1} (- 1)^n \frac{B_{2 n}}{(2 n) !} \frac{B_{2 m - 2 n + 2}}{(2 m - 2 n + 2) !} \alpha ^{m - n + 1} \beta ^n, \end{aligned}$$
(3)

where \(\alpha \) and \(\beta \) are positive numbers with \(\alpha \beta = \pi ^2\) and m is any nonzero integer. We refer to [2] or [4, Entry 14.21(i)], as well as the references therein. In modern language, (3) can be seen to express the fact that, for odd s, the cotangent Dirichlet series [8]

$$\begin{aligned} \xi _s (\tau ) = \sum _{n = 1}^{\infty } \frac{\cot (\pi n \tau )}{n^s} \end{aligned}$$
(4)

is an Eichler integral of the Eisenstein series of weight \(s + 1\) and level 1. We briefly review Eichler integrals in Sect. 4. As a consequence, for certain s, \(\xi _s (\tau )\) can be explicitly evaluated at the values \(\tau = i\) or \(\tau = e^{2 \pi i / 3}\), which are fixed points of linear fractional transformations induced by the modular group \(\mathrm{SL}_2 (\mathbb {Z})\). Up to the action of \(\mathrm{SL}_2 (\mathbb {Z})\), these are the only fixed points in the upper half-plane. More generally, however, every real quadratic irrationality occurs as the fixed point of some \(\gamma \in \mathrm{SL}_2 (\mathbb {Z})\). This is reviewed in Sect. 3. Although convergence of series such as (4) becomes an interesting issue when \(\tau \) is real, see Sect. 2, one finds that \(\xi _s (\rho ) \in \rho \pi ^s \mathbb {Q}\) for any real quadratic irrational \(\rho \) provided that \(s \geqslant 2\) is odd. For instance,

$$\begin{aligned} \xi _3 ( \sqrt{7}) = \sum _{n = 1}^{\infty } \frac{\cot (\pi n \sqrt{7})}{n^3} = - \frac{\sqrt{7}}{20} \pi ^3 . \end{aligned}$$
(5)

Such evaluations of the cotangent Dirichlet series are discussed in [1]. See Example 1.4 for similar known results.

As a recent addition to the zoo of special values of trigonometric Dirichlet series, Komori et al. [9], based on formulas for the Barnes multiple zeta-functions, discovered identities including

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\cot ^2 (\pi n \zeta _3)}{n^4} = - \frac{31}{2835} \pi ^4, \quad \sum _{n = 1}^{\infty } \frac{\csc ^2 (\pi n \zeta _3)}{n^4} = \frac{1}{5670} \pi ^4, \end{aligned}$$
(6)

where \(\zeta _3 = e^{2 \pi i / 3}\) is the cube root of unity. One purpose of and motivation for the present note is to put all these evaluations into a general context.

Our main result shows that, depending on the parity of s, any trigonometric Dirichlet series

$$\begin{aligned} \psi ^{a, b}_s (\tau ) = \sum _{n = 1}^{\infty } \frac{\mathrm{trig}^{a, b} (\pi n \tau )}{n^s}, \quad \mathrm{trig}^{a, b} = \sec ^a \csc ^b, \end{aligned}$$

where ab are integers, has the property that it can be evaluated when \(\tau \) is a real quadratic irrationality. Note that any product of the trigonometric functions \(\cos (x)\), \(\sin (x)\), \(\sec (x)\), \(\csc (x)\), \(\tan (x)\), and \(\cot (x)\) can be expressed as \(\sec ^a (x) \csc ^b (x)\) for (unique) integers a and b. Our main result is the following.

Theorem 1.1

Let \(\rho \) be a real quadratic irrationality, and let abs be integers such that, for convergence, \(s \geqslant \max (a, b, 1) + 1\). If s and b have the same parity, then

$$\begin{aligned} \psi ^{a, b}_s (\rho ) = \sum _{n = 1}^{\infty } \frac{\mathrm{trig}^{a, b} (\pi n \rho )}{n^s} \in \pi ^s \mathbb {Q} (\rho ) . \end{aligned}$$

Moreover, if, in addition, \(\rho ^2 \in \mathbb {Q}\) and \(a + b \geqslant 0\), then \(\psi ^{a, b}_s (\rho ) \in (\pi \rho )^s \mathbb {Q}\).

The underlying reason for Theorem 1.1, which we prove in Sect. 5, is that \(\psi ^{a, b}_s (\tau )\) can be expressed as a linear combination of derivatives of Eichler integrals and polylogarithms. That the series \(\psi ^{a, b}_s (\tau )\) indeed converges when \(\tau \) is a real algebraic irrationality and \(s \geqslant \max (a, b, 1) + 1\) is proved in Sect. 2.

Note that Theorem 1.1 includes as a special case the recent conjecture [11] of Lalín, Rodrigue and Rogers that, for even \(s > 0\) and all rational \(r > 0\), the values

$$\begin{aligned} \psi _s^{1, 0} ( \sqrt{r}) = \sum _{n = 1}^{\infty } \frac{\sec (\pi n \sqrt{r})}{n^s} \end{aligned}$$

are rational multiples of \(\pi ^s\). Independent proofs of this conjecture have been given by Charollois and Greenberg [7] as well as Berndt and Straub [6].

Example 1.2

We record some random examples to illustrate Theorem 1.1:

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\sec ^2 (\pi n \sqrt{5})}{n^4}= & {} \frac{14}{135} \pi ^4,\\ \sum _{n = 1}^{\infty } \frac{\cot ^2 (\pi n \sqrt{5})}{n^4}= & {} \frac{13}{945} \pi ^4,\\ \sum _{n = 1}^{\infty } \frac{\csc ^2 (\pi n \sqrt{11})}{n^4}= & {} \frac{8}{385} \pi ^4,\\ \sum _{n = 1}^{\infty } \frac{\sec ^3 (\pi n \sqrt{2})}{n^4}= & {} - \frac{2483}{5220} \pi ^4,\\ \sum _{n = 1}^{\infty } \frac{\tan ^3 (\pi n \sqrt{6})}{n^5}= & {} \frac{35{,} 159}{17{,} 820 \sqrt{6}} \pi ^4 . \end{aligned}$$

These values have been obtained by tracing the proof of Theorem 1.1, which provides a method to compute such evaluations.

In addition, the evaluation

$$\begin{aligned} \psi _3^{- 2, 1} ( \sqrt{2}) = \sum _{n = 1}^{\infty } \frac{(\cos \cot ) (\pi n \sqrt{2})}{n^3} = \left[ \frac{1}{2} - \frac{253}{360 \sqrt{2}} \right] \pi ^3 \end{aligned}$$

illustrates that the condition \(a + b \geqslant 0\) is required for the last part of Theorem 1.1.

Remark 1.3

Theorem 1.1 is stated for real quadratic irrationalities \(\rho \) only. Its proof, however, extends to certain nonreal \(\rho \) which are the fixed points of linear fractional transformations \(\gamma \in \mathrm{SL}_2 (\mathbb {Z})\). For instance, the evaluation of \(\psi ^{- 2, 2}_4 (\zeta _3)\) in Eq. (6) can be achieved by our method because \(\zeta _3\) is fixed by S T, defined in (14), and because the cotangent Dirichlet series is an Eichler integral for the full modular group. Similarly, formula (2) and more generally (1) follow by evaluating \(\psi _{4 r - 1}^{- 1, 1} (i)\) as in the proof of Theorem 1.1.

There are, however, two complications for these (and other) nonreal values. Firstly, for instance, while \(\zeta _3\) is fixed by \(\pm S T\) and \(\pm (S T)^2\), it is easily seen from (15) that \(\zeta _3\) is not fixed by any other nontrivial linear fractional transformation. In particular, it is not fixed by any transformation in \(\Gamma (2)\). In consequence, we cannot apply our approach to evaluate the secant Dirichlet series \(\psi _s^{1, 0} (\zeta _3)\) for any s (and, to our knowledge, no evaluation as an algebraic multiple of \(\pi ^s\) is known).

Secondly, the quantity in Eq. (23), which we divide by in our approach, can be zero. This is the reason why we can evaluate \(\psi ^{- 2, 2}_s (\zeta _3)\) only for s of the form \(s = 6 r + 4\). These are exactly the cases for which these series are evaluated in [9, Corollary 6.4] by different means.

Example 1.4

Besides (4) or (6), other types of natural trigonometric Dirichlet series have been considered by many authors. For instance, Ramanujan recorded

$$\begin{aligned} \sum _{n = 0}^{\infty } \frac{\tan (\pi (2 n + 1) i / 2)}{(2 n + 1)^3} = \frac{i \pi ^3}{32}, \quad \sum _{n = 1}^{\infty } \frac{(- 1)^n \csc (\pi n i)}{n^3} = \frac{i \pi ^3}{360}, \end{aligned}$$

as well as

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\chi (n) \sec (\pi n i / 2)}{n^5} = \frac{\pi ^5}{768}, \end{aligned}$$

where \(\chi = ( \tfrac{- 4}{\cdot })\) denotes the nonprincipal Dirichlet character modulo 4 (that is, \(\chi (n) = 0\) for even n, and \(\chi (n) = (- 1)^{(n - 1) / 2}\) for odd n). These formulas can be found in [4, Entry 14.25] along with their history and generalizations. Since it might not be immediately obvious, let us indicate in (7), (8) and (9) how these series relate to the series \(\psi ^{a, b}_s\) that we consider here. In particular, this demonstrates that the approach of Theorem 1.1 applies to establishing the corresponding evaluations given by Ramanujan.

To begin with, since \(\csc ( z + \pi n) = ( - 1)^n \csc ( z)\), we find

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{(- 1)^{n + 1} \csc (\pi n \tau )}{n^s} = - \psi ^{0, 1}_s (\tau + 1) . \end{aligned}$$
(7)

Next, note that \(\cot (z + \frac{\pi n}{2})\) equals \(\cot (z)\) if n is even, and \(- \tan (z)\) if n is odd. Consequently,

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\cot (\pi n (\tau + \frac{1}{2}))}{n^s} = \frac{1}{2^s} \sum _{n = 1}^{\infty } \frac{\cot (2 \pi n \tau )}{n^s} - \sum _{n = 0}^{\infty } \frac{\tan (\pi (2 n + 1) \tau )}{(2 n + 1)^s}, \end{aligned}$$

or, equivalently,

$$\begin{aligned} \sum _{n = 0}^{\infty } \frac{\tan (\pi (2 n + 1) \tau )}{(2 n + 1)^s} = \frac{1}{2^s} \psi ^{- 1, 1}_s ( 2 \tau ) - \psi ^{- 1, 1}_s \left( \tau + \tfrac{1}{2} \right) . \end{aligned}$$
(8)

Explicit evaluations of the series (8) for certain real quadratic irrationalities \(\tau \) have been obtained in [3, Theorem 4.11]. Theorem 1.1 shows, less explicitly, that such evaluations are possible for all real quadratic irrationalities \(\tau \).

Similarly, \(\csc (z + \frac{\pi n}{2})\) equals \((- 1)^{n / 2} \csc (z)\) if n is even, and \((- 1)^{(n - 1) / 2} \sec (z)\) if n is odd. We thus conclude

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\chi (n) \sec (\pi n \tau )}{n^s} = \psi _s^{0, 1} \left( \tau + \tfrac{1}{2} \right) - \frac{1}{2^s} \psi _s^{0, 1} (2 \tau + 1) . \end{aligned}$$
(9)

For each of the series (7), (8) and (9), Theorem 1.1 proves that, depending on parity, they evaluate at real quadratic irrationalities \(\tau \) as multiples of \(\pi ^s\). We conclude with some simple explicit examples:

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{(- 1)^{n + 1} \csc (\pi n \sqrt{13})}{n^3}= & {} - \frac{\pi ^3}{12 \sqrt{13}},\\ \sum _{n = 0}^{\infty } \frac{\tan (\pi (2 n + 1) \sqrt{5})}{(2 n + 1)^5}= & {} \frac{23 \pi ^5}{3456 \sqrt{5}},\\ \sum _{n = 1}^{\infty } \frac{\chi (n) \sec (\pi n \sqrt{7})}{n^3}= & {} - \frac{7 \pi ^3}{96} . \end{aligned}$$

2 Convergence

Let \(a \geqslant 0\) and \(b \geqslant 0\) and assume that at least one of them is positive. Then the series

$$\begin{aligned} \psi ^{a, b}_s (\tau ) = \sum _{n = 1}^{\infty } \frac{(\sec ^a \csc ^b) (\pi n \tau )}{n^s} \end{aligned}$$

converges absolutely for all nonreal \(\tau \). For rational \(\tau \), the series \(\psi ^{a, b}_s (\tau )\) converges absolutely for \(s > 1\) provided that all its terms are finite; this requires \(b \leqslant 0\) and, in addition, \(\tau \) needs to have odd denominator if \(a > 0\). Convergence for real irrationalities \(\tau \), on the other hand, is a much more subtle question; see, for instance, [15].

It is shown in [11, Theorem 1] that the secant Dirichlet series \(\psi _s^{1, 0} (\tau )\) converges absolutely for algebraic irrational \(\tau \) whenever \(s \geqslant 2\). While the case \(s > 2\) follows from an application of the Thue–Siegel–Roth Theorem, the case \(s = 2\) requires a rather subtle argument due to Florian Luca. The next result generalizes these conclusions to \(\psi _s^{a, b} (\tau )\) for any integers ab. In addition, it strengthens [1, Theorem 5.1], which proves a weaker result in the case \((a, b) = (- 1, 1)\).

Theorem 2.1

Let ab be integers and \(\tau \) real. The series \(\psi ^{a, b}_s (\tau )\) converges absolutely

  1. (1)

    for \(s > 1\), if \(a \leqslant 0\) and \(b \leqslant 0\);

  2. (2)

    for \(s \geqslant \max (a, b) + 1\), if \(\tau \) is algebraic irrational and \(\max (a, b) > 0\).

Proof

The first part is obvious because cosine and sine are bounded on the real line, so that, for \(a \leqslant 0\) and \(b \leqslant 0\), \(\psi ^{a, b}_s (\tau )\) can be bounded from above by the Riemann zeta function \(\zeta (s)\).

For the second part, note that \(\sec ^2 (z) \csc ^2 (z) = \sec ^2 (z) + \csc ^2 (z)\) implies the simple reduction identity

$$\begin{aligned} \mathrm{trig}^{a, b} (z) = \mathrm{trig}^{a - 2, b} (z) + \mathrm{trig}^{a, b - 2} (z) . \end{aligned}$$
(10)

Applying (10) recursively and again using boundedness of cosine and sine, our claim follows if we can show that, for \(\lambda > 0\) and algebraic irrational \(\tau \), the series

$$\begin{aligned} \psi ^{\lambda , 0}_s (\tau ) = \sum _{n = 1}^{\infty } \frac{\sec ^{\lambda } (\pi n \tau )}{n^s}, \quad \psi ^{0, \lambda }_s (\tau ) = \sum _{n = 1}^{\infty } \frac{\csc ^{\lambda } (\pi n \tau )}{n^s} \end{aligned}$$

converge absolutely whenever \(s \geqslant \lambda + 1\). These claims are proved in Lemmas 2.3 and 2.5. \(\square \)

In the same manner as in [11], we will use the following weak version of a result due to Worley [16]. Here and in the sequel, \(p_n / q_n\) denotes the nth convergent of the continued fraction expansion \([a_0 ; a_1, a_2, \ldots ]\) of \(\tau \). It is well known that \(p_n\) and \(q_n\) satisfy

$$\begin{aligned} p_n = a_n p_{n - 1} + p_{n - 2}, \quad q_n = a_n q_{n - 1} + q_{n - 2} . \end{aligned}$$
(11)

Theorem 2.2

Let \(\tau \) be irrational, \(k > \frac{1}{2}\) and p / q a rational approximation to \(\tau \) in reduced form for which

$$\begin{aligned} \left| \tau - \frac{p}{q} \right| < \frac{k}{q^2} . \end{aligned}$$

Then p / q is of the form

$$\begin{aligned} \frac{p}{q} = \frac{a p_m + b p_{m - 1}}{a q_m + b q_{m - 1}}, \quad |a|, |b| < 2 k, \end{aligned}$$

where a and b are integers, and m is the largest index up to which the continued fractions of \(\tau \) and p / q agree.

The next result is proved by a natural extension of the proof of [11, Theorem 1], which is due to Florian Luca. As indicated in Remark 2.4, absolute convergence of \(\sum _{n = 1}^{\infty } \frac{\csc ^{\lambda } (\pi n \tau )}{n^s}\) for \(s > \lambda + 1\) is much simpler to deduce.

Lemma 2.3

Let \(\lambda > 0\) and \(\tau \) be algebraic irrational. Then the series \(\psi ^{0, \lambda }_{\lambda + 1} (\tau ) = \sum _{n = 1}^{\infty } \frac{\csc ^{\lambda } (\pi n \tau )}{n^{\lambda + 1}}\) converges absolutely.

Proof

Starting with the elementary

$$\begin{aligned} | \sin (\pi \tau ) | \geqslant | \tau - k|, \end{aligned}$$

where \(k = [\tau ]\) is the nearest integer to \(\tau \), we obtain

$$\begin{aligned} \frac{| \csc (\pi n \tau ) |^{\lambda }}{n^{\lambda + 1}} \leqslant \frac{1}{n^{\lambda + 1} |n \tau - k_n |^{\lambda }} = \frac{1}{n^{2 \lambda + 1} | \tau - k_n / n|^{\lambda }} \end{aligned}$$

with \(k_n = [n \tau ]\), which is the integer maximizing the right-hand side. We first consider those indices n for which the right-hand side is sufficiently small. Indeed, we notice that our series restricted to the indices in the set

$$\begin{aligned} W_{\tau } = \left\{ n \geqslant 0 : \, \left| \tau - \frac{k_n}{n} \right| \geqslant \frac{(\log n)^{\alpha }}{n^2} \right\} \end{aligned}$$

is easily seen to converge when we choose \(\alpha \) large enough, namely,

$$\begin{aligned} \sum _{n \in W_{\tau }} \frac{| \csc (\pi n \tau ) |^{\lambda }}{n^{\lambda + 1}} \leqslant \sum _{n \in W_{\tau }} \frac{1}{n^{2 \lambda + 1} | \tau - k_n / n|^{\lambda }} \leqslant \sum _{n \in W_{\tau }} \frac{1}{n (\log n)^{\alpha \lambda }} < \infty \end{aligned}$$

provided that \(\alpha \lambda > 1\). In the sequel, we assume that \(\alpha \) has been chosen such that \(\alpha \lambda > 1\).

On the other hand, assume that \(n \not \in W_{\tau }\) in which case

$$\begin{aligned} \left| \tau - \frac{k_n}{n} \right| \leqslant \frac{(\log n)^{\alpha }}{n^2} . \end{aligned}$$
(12)

Let \(p_m / q_m\) be the convergents of \(\tau \) and let \(\ell \) be such that \(n < q_{\ell }\). Then Worley’s Theorem 2.2 applied with \(k = (\log q_{\ell })^{\alpha } / d^2\), where \(d = (k_n, n)\), shows that

$$\begin{aligned} \frac{k_n}{n} = \frac{a p_m + b p_{m - 1}}{a q_m + b q_{m - 1}}, \end{aligned}$$

where \(m < \ell \) and ab are integers with \(|a|, |b| < 2 (\log q_{\ell })^{\alpha } / d^2\). In particular, \(n = d (a q_m + b q_{m - 1}) = r q_m + s q_{m - 1},\) where \(m < \ell \) and rs are integers with \(|r|, |s| < 2 (\log q_{\ell })^{\alpha }\). We conclude that there can be at most \(16 \ell (\log q_{\ell })^{2 \alpha }\) values of n less than \(q_{\ell }\) for which (12) holds.

Since \(\tau \) is algebraic irrational, the Thue–Siegel–Roth Theorem implies that, for each \(\varepsilon > 0\), there is a constant \(C (\tau , \varepsilon )\) such that

$$\begin{aligned} \left| \tau - \frac{p}{q} \right| > \frac{C (\tau , \varepsilon )}{q^{2 + \varepsilon }} \end{aligned}$$
(13)

for all fractions p / q. On the other hand, we have

$$\begin{aligned} \frac{1}{q_{\ell } q_{\ell + 1}} > \left| \tau - \frac{p_{\ell }}{q_{\ell }} \right| , \end{aligned}$$

which combined with the Thue–Siegel–Roth Theorem shows that \(q_{\ell + 1} \!<\! C (\tau , \varepsilon ) q_{\ell }^{1 + \varepsilon }\). Because the convergents \(p_{\ell } / q_{\ell }\) of continued fractions provide the best possible approximations to \(\tau \) among fractions with denominator at most \(q_{\ell }\), we find that, for \(n < q_{\ell }\),

$$\begin{aligned} \left| \tau - \frac{k_n}{n} \right| > \left| \tau - \frac{p_{\ell }}{q_{\ell }} \right| > \frac{C (\tau , \varepsilon )}{q_{\ell }^{2 + \varepsilon }} . \end{aligned}$$

Assuming, in addition, \(n \geqslant q_{\ell - 1}\), we thus obtain

$$\begin{aligned} \frac{| \csc (\pi n \tau ) |^{\lambda }}{n^{\lambda + 1}} \leqslant \frac{1}{n^{2 \lambda + 1} | \tau - k_n / n|^{\lambda }} < \frac{q_{\ell }^{(2 + \varepsilon ) \lambda }}{C (\tau , \varepsilon )^{\lambda } q_{\ell - 1}^{2 \lambda + 1}} < \frac{C (\tau , \varepsilon )^{(1 + \varepsilon ) \lambda }}{q_{\ell - 1}^{1 - \varepsilon (3 + \varepsilon ) \lambda }} = \frac{C (\tau , \varepsilon ')}{q_{\ell - 1}^{1 - \varepsilon '}}, \end{aligned}$$

where \(\varepsilon ' = \varepsilon (3 + \varepsilon ) \lambda > 0\).

Combining our observations, we have

$$\begin{aligned} \sum _{n \not \in W_{\tau }} \frac{| \csc (\pi n \tau ) |^{\lambda }}{n^{\lambda + 1}} \leqslant \sum _{\ell = 1}^{\infty } 16 \ell (\log q_{\ell })^{2 \alpha } \frac{C (\tau , \varepsilon ')}{q_{\ell - 1}^{1 - \varepsilon '}}, \end{aligned}$$

and convergence follows from the fact that, by comparison with the Fibonacci numbers \(F_{\ell }\) via (11), the sequence \(q_{\ell }\) grows at least as fast as \(\varphi ^{\ell }\) with \(\varphi = (1 + \sqrt{5}) / 2\). \(\square \)

Remark 2.4

With \(\lambda \) and \(\tau \) as in Lemma 2.3, absolute convergence of the series

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\csc ^{\lambda } (\pi n \tau )}{n^{\lambda + 1 + \delta }}, \end{aligned}$$

for \(\delta > 0\), is much simpler to deduce. Indeed, estimating as in the proof of Lemma 2.3, we find

$$\begin{aligned} \frac{| \csc (\pi n \tau ) |^{\lambda }}{n^{\lambda + 1 + \delta }} \leqslant \frac{1}{n^{2 \lambda + 1 + \delta } | \tau - k_n / n|^{\lambda }} < \frac{C (\tau , \varepsilon )^{- \lambda }}{n^{1 + \delta - \lambda \varepsilon }}, \end{aligned}$$

where \(C (\tau , \varepsilon )\) is the constant from applying the Thue–Siegel–Roth Theorem (13). Convergence follows upon choosing \(\varepsilon \) such that \(\lambda \varepsilon < \delta \).

Lemma 2.5

Let \(\lambda > 0\) and \(\tau \) be algebraic irrational. Then the series \(\psi ^{\lambda , 0}_{\lambda + 1} (\tau ) = \sum _{n = 1}^{\infty } \frac{\sec ^{\lambda } (\pi n \tau )}{n^{\lambda + 1}}\) converges absolutely.

Proof

The proof proceeds along similar lines as the proof of Lemma 2.3. Indeed, we have the elementary relation

$$\begin{aligned} \sec ( \tau ) = \csc \left( \tau + \frac{\pi }{2} \right) , \end{aligned}$$

so that

$$\begin{aligned} \frac{| \sec (\pi n \tau ) |^{\lambda }}{n^{\lambda + 1}} = \frac{| \csc \left( \pi (n \tau + \tfrac{1}{2}) \right) |^{\lambda }}{n^{\lambda + 1}} \leqslant \frac{1}{n^{\lambda + 1} |n \tau + \tfrac{1}{2} - k_n |^{\lambda }} = \frac{1}{n^{2 \lambda + 1} \left| \tau - \tfrac{2 k_n - 1}{2 n} \right| ^{\lambda }} \end{aligned}$$

with \(k_n = [n \tau + \tfrac{1}{2}]\). It remains to argue as in the proof of Lemma 2.3 and we omit the details. \(\square \)

3 Background on fractional linear transformations

We denote with T, S and R the matricesFootnote 1

$$\begin{aligned} T = \begin{bmatrix} 1&1\\ 0&1 \end{bmatrix}, \quad S = \begin{bmatrix} 0&- 1\\ 1&0 \end{bmatrix}, \, R = \begin{bmatrix} 1&0\\ 1&1 \end{bmatrix}, \end{aligned}$$
(14)

and recall that the matrices T and S generate \(\Gamma _1 = \mathrm{SL}_2 (\mathbb {Z})\). The principal congruence subgroup \(\Gamma (N)\) of \(\Gamma _1\) consists of those matrices that are congruent to the identity matrix I modulo N. More generally, congruence subgroups of \(\Gamma _1\) are those subgroups \(\Gamma \leqslant \Gamma _1\) containing \(\Gamma (N)\) for some N, the minimal such N being the level of \(\Gamma \).

As usual, we consider the action of \(\Gamma _1\) on complex numbers \(\tau \) by fractional linear transformations and write

$$\begin{aligned} \begin{bmatrix} a&b\\ c&d \end{bmatrix} \cdot \tau = \frac{a \tau + b}{c \tau + d} . \end{aligned}$$

Correspondingly, \(\Gamma _1\) acts on the space of functions (on the upper half-plane or on the full complex plane) via the slash operators \(|_k\), defined by

$$\begin{aligned} (f|_k \gamma ) (\tau ) = (c \tau + d)^{- k} f (\gamma \tau ), \quad \gamma = \begin{bmatrix} a&b\\ c&d \end{bmatrix} \in \Gamma _1 . \end{aligned}$$

This action extends naturally to the group algebra \(\mathbb {C} [\Gamma _1]\).

Given a quadratic irrationality \(\tau \), let \(A x^2 + B x + C\), with \(A > 0\) and \((A, B, C) = 1\), be its minimal polynomial and \(\Delta = B^2 - 4 A C\) its discriminant. We follow the exposition of [17, p. 72] and observe that the fractional linear transformation

$$\begin{aligned} \gamma = \begin{bmatrix} a&b\\ c&d \end{bmatrix} \in \mathrm{SL}_2 (\mathbb {Z}) \end{aligned}$$

fixes \(\tau \) if and only if \((c, d - a, - b) = u (A, B, C)\) for some integral factor of proportionality u. In that case, writing \(t = a + d\) for the trace of \(\gamma \), we have

$$\begin{aligned} \gamma = \begin{bmatrix} \frac{t - B u}{2}&- C u\\ A u&\frac{t + B u}{2} \end{bmatrix}, \quad \det (\gamma ) = \frac{t^2 - \Delta u^2}{4} . \end{aligned}$$
(15)

Let us now restrict to real quadratic irrationalities \(\tau \). In that case, \(\Delta > 0\). The above argument demonstrates that, if tu are solutions to the Pell equation

$$\begin{aligned} t^2 - \Delta u^2 = 4, \end{aligned}$$

then the fractional linear transformation \(\gamma \) given in (15) fixes \(\tau \) (and all fractional linear transformations fixing \(\tau \) arise that way).

Lemma 3.1

Let \(\tau \) be a quadratic irrationality, and \(\Gamma \leqslant \Gamma _1\) a congruence subgroup. Then there exists \(\gamma \in \Gamma \), with \(\gamma \ne \pm I\), such that \(\gamma \cdot \tau = \tau \).

Proof

Let N be such that \(\Gamma (N) \leqslant \Gamma \). For every positive nonsquare k, Pell’s equation

$$\begin{aligned} X^2 - k Y^2 = 1 \end{aligned}$$
(16)

has nontrivial solutions X, Y. A proof of this fact was first published by Lagrange in 1768 [10], and we refer to [12] for further information and background. As before, let \(\Delta \) be the discriminant of \(\tau \). Then \(k = \Delta N^2\) is positive and not a perfect square, so that we find integers XY, with \(Y \ne 0\), solving (16). In light of the above discussion, setting \(t = 2 X\) and \(u = 2 N Y\) in (15) gives a fractional linear transformation \(\gamma \) which fixes \(\tau \). Clearly, \(\gamma \in \Gamma (N)\) and \(\gamma \ne \pm I\). \(\square \)

4 Eichler integrals

If \(f (\tau )\) is a modular form of weight k with respect to \(\Gamma \leqslant \Gamma _1\), then any \((k - 1)\)st antiderivative of \(f (\tau )\) is called an Eichler integral. Such an Eichler integral \(F (\tau )\) is characterized by the property that, for any \(\gamma \in \Gamma \), \(F|_{2 - k} [\gamma - 1]\) is a polynomial of degree at most \(k - 2\). These are referred to as the period polynomials of f and their coefficients encode the critical L-values of f. For the general theory of period polynomials, we refer to [14] and the references therein.

As mentioned in the introduction, Ramanujan’s formula (3) expresses the fact that, for odd s, the cotangent Dirichlet series \(\xi _s (\tau )\), defined in (4), is essentially an Eichler integral. Indeed, (3) may be expressed as

$$\begin{aligned} \xi _{2 m - 1} |_{2 - 2 m} [S - 1] = (- 1)^m (2 \pi )^{2 m - 1} \sum _{n = 0}^m \frac{B_{2 n}}{(2 n) !} \frac{B_{2 m - 2 n}}{(2 m - 2 n) !} \tau ^{2 n - 1} . \end{aligned}$$

The reason that \(\xi _{2 m - 1} |_{2 - 2 m} [S - 1]\) are rational functions, instead of polynomials, is that the sth derivative of \(\xi _s (\tau )\) is an Eisenstein series with the constant term of its Fourier expansion missing. We refer to [8] for more details on the cotangent Dirichlet series.

Similarly, it was shown in [11] and [6] that, for even s, the secant Dirichlet series

$$\begin{aligned} \psi ^{1, 0}_s (\tau ) = \sum _{n = 1}^{\infty } \frac{\sec (\pi n \tau )}{n^s} \end{aligned}$$

is essentially an Eichler integral of weight \(1 - s\) with respect to the modular group \(\Gamma _2 = \langle T^2, R^2 \rangle \) generated by the matrices

$$\begin{aligned} T^2 = \begin{bmatrix} 1&2\\ 0&1 \end{bmatrix}, \quad R^2 = \begin{bmatrix} 1&0\\ 2&1 \end{bmatrix} . \end{aligned}$$
(17)

In other words, \(\Gamma _2 \leqslant \Gamma ( 2)\) is the subgroup of the principal modular subgroup \(\Gamma ( 2)\) consisting of those matrices whose diagonal entries are congruent to 1 modulo 4. More precisely, for any \(\gamma \in \Gamma _2\),

$$\begin{aligned} \psi ^{1, 0}_s |_{1 - s} [ \gamma - 1] = \pi ^s p_s ( \gamma ; \tau ), \end{aligned}$$
(18)

where \(p_s ( \gamma ; \tau )\) is a rational function in \(\tau \) with rational coefficients. To be explicit, we have

$$\begin{aligned} p_s ( T^2 ; \tau )= & {} 0,\\ p_s ( R^2 ; \tau )= & {} [ z^{s - 1}] \frac{\sin (\tau z)}{\sin (z) \sin ((2 \tau + 1) z)}, \end{aligned}$$

from which \(p_s ( \gamma ; \tau )\) can be derived recursively in light of the cocycle relation

$$\begin{aligned} p_s ( \alpha \beta ; \tau ) = p_s ( \alpha ; \tau ) |_{1 - s} \beta + p_s ( \beta ; \tau ) . \end{aligned}$$

Several alternative expressions for \(p_s ( R^2 ; \tau )\), for instance convolution sums involving Bernoulli numbers, are given in [11] and [6].

5 Evaluating trigonometric Dirichlet series

The goal of this section is to prove Theorem 1.1. Let us begin by first considering the case \(a \leqslant 0\) and \(b \leqslant 0\), which is much simpler and of a rather different nature than the other cases. Indeed, in that case \(\psi ^{a, b}_s (\tau )\), with s of the same parity as b, is piecewise polynomial in \(\tau \).

Lemma 5.1

Let \(\tau \) be real, and let abs be integers such that \(a \leqslant 0\), \(b \leqslant 0\) and \(s > 1\). If s and b have the same parity, then

$$\begin{aligned} \psi ^{a, b}_s (\tau ) = \sum _{n = 1}^{\infty } \frac{\mathrm{trig}^{a, b} (\pi n \tau )}{n^s} = \pi ^s f (\tau ), \end{aligned}$$

where \(f (\tau )\) is a piecewise polynomial in \(\tau \) with rational coefficients on each piece.

Proof

Recall the classical formulas, valid for \(0 < \tau < 1\),

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\cos (2 \pi n \tau )}{n^{2 m}}= & {} \frac{(- 1)^{m + 1}}{2} \frac{(2 \pi )^{2 m}}{(2 m) !} B_{2 m} (\tau ), \end{aligned}$$
(19)
$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\sin (2 \pi n \tau )}{n^{2 m + 1}}= & {} \frac{(- 1)^{m + 1}}{2} \frac{(2 \pi )^{2 m + 1}}{(2 m + 1) !} B_{2 m + 1} (\tau ), \end{aligned}$$
(20)

which may be found, for instance, in [2, Theorem 3.2] or [13, Sect. 7.5.3]. Here, \(B_n (x)\) denotes the nth Bernoulli polynomial. Note that \(\mathrm{trig}_{a, b} (\tau )\) is an even or odd function depending on whether b is even or odd. Writing \(\mathrm{trig}_{a, b} (\tau )\) as a Fourier cosine or Fourier sine series, depending on the parity of b, we may express \(\psi ^{a, b}_s (\tau )\) as a finite linear combination of series of the type (19) or (20). This shows that \(\psi ^{a, b}_s (\tau )\) is indeed \(\pi ^s\) times a piecewise polynomial in \(\tau \) with rational coefficients. \(\square \)

The next result is a crucial building block for our proof of Theorem 1.1. Note that \(\psi ^{1, 0}_s\) is the secant Dirichlet series. We abbreviate \(D = \mathrm {d}/ \mathrm {d}\tau \), and write \(D^j \psi \) for the jth derivative of \(\psi ( \tau )\).

Proposition 5.2

Let \(\psi _s = \psi ^{1, 0}_s\). Let \(\rho \) be a real quadratic irrationality and js nonnegative integers with \(s \geqslant 2 j + 2\). If j and s have the same parity, then

$$\begin{aligned} ( D^j \psi _s) ( \rho ) \in \pi ^s \mathbb {Q} ( \rho ) . \end{aligned}$$

If, in addition, \(\rho ^2 \in \mathbb {Q}\), then \(( D^j \psi _s) ( \rho ) \in ( \pi \rho )^s \mathbb {Q}\).

Proof

Observe that the statement for \(j = 0\) has been proven in [6] and follows from (18). We will prove the general statement by induction on j. In preparation, we first make the effect of differentiation on period functions explicit.

Given a function F, an integer k and \(\gamma = \begin{bmatrix} a&b\\ c&d \end{bmatrix} \in \Gamma ( 1)\), denote with \(p_{F, k} ( \gamma ; \tau )\) the function

$$\begin{aligned} p_{F, k} ( \gamma ; \tau ) = F|_k [ \gamma - 1] ( \tau ) = (c \tau + d)^{- k} F \left( \frac{a \tau + b}{c \tau + d} \right) - F (\tau ) . \end{aligned}$$

If F is an Eichler integral of weight k, which transforms with respect to \(\gamma \), then \(p_{F, k} ( \gamma ; \tau )\) is one of its period polynomials. By differentiating both sides with respect to \(\tau \), we find

$$\begin{aligned} D p_{F, k} ( \gamma ; \tau )= & {} - c k (c \tau + d)^{- k - 1} F ( \gamma \tau ) + (c \tau + d)^{- k - 2} ( D F) ( \gamma \tau ) - ( D F) (\tau )\\= & {} ( D F) |_{k + 2} [ \gamma - 1] ( \tau ) - \frac{c k}{c \tau + d} F|_k \gamma \\= & {} p_{D F, k + 2} ( \gamma ; \tau ) - \frac{c k}{c \tau + d} ( F ( \tau ) + p_{F, k} ( \gamma ; \tau )), \end{aligned}$$

and hence

$$\begin{aligned} p_{D F, k + 2} ( \gamma ; \tau ) = \frac{c k}{c \tau + d} (F ( \tau ) + p_{F, k} ( \gamma ; \tau )) + D p_{F, k} ( \gamma ; \tau ) . \end{aligned}$$
(21)

We now apply this observation in the case \(F = \psi _s\) and \(k = 1 - s\). Assuming that s is even and \(\gamma \in \Gamma _2\), equation (18) shows that \(p_{\psi _s, 1 - s} ( \gamma ; \tau ) \in \pi ^s \mathbb {Q} ( \tau )\). Inductively applying ( 21), we then find that

$$\begin{aligned} (c \tau + d)^{s - 2 j - 1} ( D^j \psi _s) ( \gamma \tau ) - ( D^j \psi _s) (\tau ) = \pi ^s f ( \tau ) + \sum _{m = 0}^{j - 1} f_m ( \tau ) ( D^m \psi _s) ( \tau ), \end{aligned}$$

where \(f ( \tau ), f_0 ( \tau ), \ldots , f_{j - 1} ( \tau )\) are rational functions in \(\tau \) with rational coefficients (these functions, of course, depend on j and s). By Lemma 3.1, there exists \(\gamma \in \Gamma _2 \geqslant \Gamma (4)\) such that \(\rho \) is fixed by \(\gamma \). Consequently, we obtain

$$\begin{aligned} ( D^j \psi _s) (\rho ) = \pi ^s g ( \rho ) + \sum _{m = 0}^{j - 1} g_m ( \rho ) ( D^m \psi _s) ( \rho ), \end{aligned}$$
(22)

where the rational functions \(g ( \tau ), g_0 ( \tau ), \ldots , g_{j - 1} ( \tau )\) are obtained from \(f ( \tau ), f_0 ( \tau ), \ldots , f_{j - 1} ( \tau )\) by dividing by

$$\begin{aligned} (c \tau + d)^{s - 2 j - 1} - 1. \end{aligned}$$
(23)

It is important to note that the condition \(s \geqslant 2 j + 2\) guarantees (23) to be nonzero when \(\tau \) is a real quadratic irrationality. The first claim, that is \(( D^j \psi _s) ( \rho ) \in \pi ^s \mathbb {Q} ( \rho )\), now follows by induction on j.

For the second claim, suppose that \(\rho = \sqrt{r}\), where \(r \in \mathbb {Q}\). Being algebraic conjugates, \(- \rho \) is fixed by \(\gamma \) as well so that (22) also holds with \(\rho \) being replaced by \(- \rho \). Also, observe that \(( D^m \psi _s) ( \tau ) / \tau ^s\) is an even function of \(\tau \). By induction, we may assume that, for \(m = 0, 1, \ldots , j - 1\),

$$\begin{aligned} \frac{( D^m \psi _s) ( \rho )}{\rho ^s} = \frac{( D^m \psi _s) ( - \rho )}{( - \rho )^s} \in \pi ^s \mathbb {Q}. \end{aligned}$$

In combination with Eq. (22), we thus find that

$$\begin{aligned} \frac{( D^j \psi _s) (\rho )}{\rho ^s} = \pi ^s h ( \rho ), \quad \frac{( D^j \psi _s) (- \rho )}{( - \rho )^s} = \pi ^s h ( - \rho ), \end{aligned}$$

where \(h ( \tau ) \in \mathbb {Q} ( \tau )\) is a (single) rational function with rational coefficients. Since the left-hand sides are equal, we conclude that \(h ( \rho ) = h ( - \rho )\). The rationality of \(h ( \tau )\) then implies that \(h ( \rho ) \in \mathbb {Q}\). This proves the claim. \(\square \)

We next observe that the previous result for the secant Dirichlet series \(\psi ^{1, 0}_s\) carries over to the cases of the cosecant Dirichlet series \(\psi ^{0, 1}_s\), the cotangent Dirichlet series \(\psi ^{- 1, 1}_s\) and the tangent Dirichlet series \(\psi ^{1, - 1}_s\).

Proposition 5.3

Let (ab) be one of (1, 0), (0, 1), \((- 1, 1)\), \((1, - 1)\). Let \(\rho \) be a real quadratic irrationality, and js nonnegative integers with \(s \geqslant 2 j + 2\). If \(j + b\) and s have the same parity, then

$$\begin{aligned} ( D^j \psi _s^{a, b}) ( \rho ) \in \pi ^s \mathbb {Q} ( \rho ) . \end{aligned}$$

If, in addition, \(\rho ^2 \in \mathbb {Q}\), then \(( D^j \psi _s^{a, b}) ( \rho ) \in ( \pi \rho )^s \mathbb {Q}\).

Proof

The case \((a, b) = (1, 0)\) was proved in Proposition 5.2 using the fact that, for s of the required parity (namely, s even), \(\psi ^{1, 0}_s\) is an Eichler integral of weight \(1 - s\) with respect to the modular group \(\Gamma _2\), whose period functions are \(\pi ^s\) times a rational function with rational coefficients.

Recall that, for odd s, the cotangent Dirichlet series \(\psi _s^{- 1, 1}\) is an Eichler integral with respect to the full modular group. Indeed, Ramanujan’s formula (3) shows that, for \(s = 2 m - 1\),

$$\begin{aligned} \psi _s^{- 1, 1} |_{1 - s} [S - 1]= & {} (- 1)^m (2 \pi )^s \sum _{n = 0}^m \frac{B_{2 n}}{(2 n) !} \frac{B_{2 (m - n)}}{(2 (m - n)) !} \tau ^{2 n - 1},\\ \psi _s^{- 1, 1} |_{1 - s} [T - 1]= & {} 0. \end{aligned}$$

Consequently, the period functions are again \(\pi ^s\) times a rational function with rational coefficients. The proof of Proposition 5.2 therefore applies to show the case \((a, b) = (- 1, 1)\) as well.

Finally, note that the trigonometric relation \(\csc (z) = \cot (z / 2) - \cot (z)\) implies that, for odd s, the cosecant Dirichlet series \(\psi _s^{0, 1}\) is an Eichler integral with respect to \(\Gamma ^0 (2)\), the congruence subgroup of \(\Gamma _1\) consisting of those matrices whose upper-right entry is even. Likewise, \(\tan (z) = \cot (z) - 2 \cot (2 z)\) shows that, for odd s, the tangent Dirichlet series \(\psi _s^{1, - 1}\) is an Eichler integral with respect to \(\Gamma _0 (2)\), consisting of those matrices in \(\Gamma _1\) whose lower-left entry is even. Again, the period functions are of the required form to apply the proof of Proposition 5.2 also in these two final cases. \(\square \)

We are finally prepared to prove Theorem 1.1, which is restated below for the convenience of the reader.

Theorem 5.4

Let \(\rho \) be a real quadratic irrationality, and let abs be integers such that, for convergence, \(s \geqslant \max (a, b, 1) + 1\). If s and b have the same parity, then

$$\begin{aligned} \psi ^{a, b}_s (\rho ) = \sum _{n = 1}^{\infty } \frac{\mathrm{trig}^{a, b} (\pi n \rho )}{n^s} \in \pi ^s \mathbb {Q} (\rho ) . \end{aligned}$$

Moreover, if, in addition, \(\rho ^2 \in \mathbb {Q}\) and \(a + b \geqslant 0\), then \(\psi ^{a, b}_s (\rho ) \in (\pi \rho )^s \mathbb {Q}\).

Proof

The case \(a \leqslant 0\) and \(b \leqslant 0\) follows as a special case of Lemma 5.1.

Next, consider the case \(a > 0\) and \(b > 0\). By applying (10), that is \(\psi ^{a, b}_s = \psi _s^{a - 2, b} + \psi _s^{a, b - 2}\), recursively, we find that the general case follows if we can evaluate the cases (ab) with \(a \in \{- 1, 0\}\) and \(b > 0\) as well as the cases (ab) with \(b \in \{- 1, 0\}\) and \(a > 0\).

In the remaining cases, we have either \(a > 0\) and \(b \leqslant 0\), or \(a \leqslant 0\) and \(b > 0\). If \(a < - 1\), then we apply \(\psi _s^{a, b} = \psi _s^{a + 2, b} - \psi _s^{a + 2, b - 2}\), which follows from (10), while, if \(b < - 1\), then we similarly apply \(\psi _s^{a, b} = \psi _s^{a, b + 2} - \psi _s^{a - 2, b + 2}\). Proceeding recursively, the general case reduces to the cases (ab) with \(a \in \{- 1, 0\}\) and \(b \geqslant 0\) as well as the cases (ab) with \(b \in \{- 1, 0\}\) and \(a \geqslant 0\). Note that, if the condition \(a + b \geqslant 0\) holds initially, then it holds for all the recursively generated cases.

In summary, it remains to show the claim in the cases where (ab) takes one of the four forms (a, 0), \((a, - 1)\), (0, b), or \((- 1, b)\) with \(a, b > 0\) (in each of these cases, we obviously have \(a + b \geqslant 0\)). In the remainder, we will show how to prove the case (a, 0). The other cases follow similarly.

Denote, as before, \(D = \mathrm {d}/ \mathrm {d}\tau \). Note that \(D \sec ^a (\tau ) = a \tan (\tau ) \sec ^a (\tau )\). Differentiating once more, we find

$$\begin{aligned} \sec ^{a + 2} (\tau ) = \frac{1}{a^{} (a + 1)} (D^2 + a^2) \sec ^a (\tau ) . \end{aligned}$$

This shows that, for odd a,

$$\begin{aligned} \sec ^a (\tau ) = \frac{1}{(a - 1) !} (D^2 + (a - 2)^2) (D^2 + (a - 4)^2) \cdots (D^2 + 1^2) \sec (\tau ), \end{aligned}$$

which implies that \(\psi ^{a, 0}_s\) is a linear combination of derivatives \(D^j \psi _s^{1, 0}\) of the secant Dirichlet series; more precisely, we find that

$$\begin{aligned} \psi ^{a, 0}_s (\tau ) = \sum _{j = 0}^{(a - 1) / 2} \frac{b_j}{\pi ^{2 j}} (D^{2 j} \psi ^{1, 0}_{s + 2 j}) (\tau ) \end{aligned}$$

for some rational numbers \(b_j\). By the assumption \(s \geqslant a + 1\), Proposition 5.2 applies and the claimed evaluation of \(\psi ^{a, 0}_s (\rho )\) follows when \(a > 0\) is odd. For even a, we similarly have

$$\begin{aligned} \sec ^a (\tau ) = \frac{1}{(a - 1) !} (D^2 + (a - 2)^2) (D^2 + (a - 4)^2) \cdots (D^2 + 2^2) D \tan (\tau ), \end{aligned}$$

demonstrating that \(\psi ^{a, 0}_s\) now is a linear combination of derivatives of the tangent Dirichlet series. Our claim therefore follows analogously from Proposition 5.3. \(\square \)

6 Conclusion

We have shown that all Dirichlet series \(\sum _{n = 1}^{\infty } f (\pi n \tau ) / n^s\) of the appropriate parity, with \(f (\tau )\) an arbitrary product of the elementary trigonometric functions, evaluate as a (simple) algebraic multiple of \(\pi ^s\) if \(\tau \) is a real quadratic irrationality. Can this, in interesting cases, be extended to series such as

$$\begin{aligned} \sum _{n = 1}^{\infty } \frac{\cot (\pi n \tau _1) \cdots \cot (\pi n \tau _r)}{n^s}, \end{aligned}$$

where \(\tau _1, \ldots , \tau _r\) are quadratic (or algebraic) irrationalities? Some examples are given in [9, Example 6.5], where it is shown that, for instance,

$$\begin{aligned} \sum _{n = 1}^{\infty } (- 1)^{n + 1} \frac{\csc (\pi n \zeta _5) \csc (\pi n \zeta _5^2) \cdots \csc (\pi n \zeta _5^4)}{n^6} = \frac{\pi ^6}{935, 550}, \end{aligned}$$

with \(\zeta _5 = e^{2 \pi i / 5}\).

Our method for evaluating trigonometric Dirichlet series proceeds in a recursive way. In certain special cases, such as [1, Theorem 5.2], [9, Corollary 6.4] or [11, Proposition 1], the evaluations can be made entirely explicit. It is natural to wonder how much more explicit the evaluations given in this paper can be made in the general case.