<figure><img src="image_1.png" /></figure>

HAL
open science

# On twisted period functions and Moments of a weighted mean square of Dirichlet L-functions on the critical line

Sebastien Darses, Berend Ringeling, Emmanuel Royer

<figure><img src="image_2.png" /></figure>

## To cite this version:

Sebastien Darses, Berend Ringeling, Emmanuel Royer. On twisted period functions and Moments of a weighted mean square of Dirichlet L-functions on the critical line. 2025. hal-05132126

HAL Id: hal-05132126

https://hal.science/hal-05132126v1

Preprint submitted on 27 Jun 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_3.png" /></figure>

Distributed under a Creative Commons Attribution - ShareAlike 4.0 International License
ON TWISTED PERIOD FUNCTIONS AND MOMENTS OF A WEIGHTED MEAN SQUARE OF DIRICHLET L-FUNCTIONS ON THE CRITICAL LINE

SÉBASTIEN DARSES – BEREND RINGELING – EMMANUEL ROYER

**ABSTRACT.** We extend to Dirichlet $L$-functions associated with arbitrary primitive characters a range of objects and properties – including Eisenstein series and period functions – that were originally introduced and studied by Lewis and Zagier (2001), and later by Bettin and Conrey (2013) in the case of the Riemann zeta function, and more recently by Lewis and Zagier (2019) for odd real characters. These tools yield closed-form expressions for the moments of a measure defined via a weighted mean square of the $L$-function. These moments not only provide a complete characterization of the modulus of the $L$-function on the critical line, but also imply an infinite number of non-trivial positivity conditions valid for all primitive characters, real or not. The methods also involve a general form of an asymptotic formula based on the shifted Euler-Maclaurin summation formula, which may be of independent interest.

# 1. INTRODUCTION

**1.1. Main results.** We write $e(z) = e^{2\pi i z}$ ($i^2 = -1$), for a complex number $z = \mathfrak{R}(z) + i\mathfrak{J}(z)$. The letter $q$ denotes an integer $q \ge 3$, and we use the convenient notation $\xi = \xi_q = e^{2\pi i/q}$.

For a character $\chi$ of conductor $q$, the corresponding Gauss sum and Dirichlet $L$-function are defined respectively as: $\tau(\chi) = \sum_{a=1}^{q-1} \chi(a)\xi^a$, and $L(s, \chi) = \sum_{n=1}^{\infty} \frac{\chi(n)}{n^s}$, for $\mathfrak{R}(s) > 1$ and by analytic continuation on $\mathbb{C}$. Recall that $\tau(\chi) \ne 0$ for a primitive character $\chi$.

The letters $N, a, b, c, j, k, \ell, m, n$ denote non-negative integers and $B_j(\cdot)$ denotes the $j$th Bernoulli polynomial. The Euler totient function is denoted by $\varphi$, and the number of divisors of $n$ by $d(n)$.

Following [Kou82], we define by induction the non-central Stirling numbers of the second kind as: $S_\alpha(n+1, k) = S_\alpha(n, k-1) + (k-\alpha)S_\alpha(n, k)$, $S_\alpha(n, 0) = (-\alpha)^n$ if $n \ge 0$, $S_\alpha(0, k) = 0$ if $k \ge 1$. The non central Stirling numbers arising in our study are $S_{-1/2}(n, k)$.

Our main results are Theorems 1.1 and 1.2.

**Theorem 1.1.** For all primitive characters $\chi$ mod $q$, with $q > 1$, and all $N \ge 0$,

$$ \int_{-\infty}^{\infty} \left| L\left(\frac{1}{2} + it, \chi\right) \right|^2 \frac{t^N dt}{\cosh(\pi t)} = -\chi(-1)(-1)^{\lfloor \frac{N}{2} \rfloor} B_N\left(\frac{1}{2}\right) \frac{\varphi(q)}{q} \\ + \sum_{k=1}^{N+1} S_{-\frac{1}{2}}(N, k-1) \frac{(2\pi iq)^k}{q^2 k^2} \sum_{1 \le a, b \le q} B_k\left(\frac{a}{q}\right) B_k\left(\frac{b}{q}\right) \mathcal{F}_{\chi,N}(ab) \xi_q^{ab}, $$

$$ \text{where } \mathcal{F}_{\chi,N}(c) = -i^N \left[ \tau(\bar{\chi}) \chi(c) + (-1)^N \tau(\chi) \bar{\chi}(c) \right], c \in \mathbb{Z}. $$

A few remarks:

(1) The formula involves only rational numbers, power of $\pi$, and cos, sin evaluated in $2\pi\mathbb{Q}$. Note that $(-1)^{\lfloor \frac{N}{2} \rfloor} B_N(\frac{1}{2}) = 0$ if $N$ is odd, and $(-1)^{\lfloor \frac{N}{2} \rfloor} B_N(\frac{1}{2}) > 0$ if $N \ge 0$ is even. The Stirling numbers involved are positive, while the entire subsequent term is real and may change sign. If $\chi$ is real, the odd moments vanish. If $\chi$ is non-real, the odd moments may be positive or negative. See Section 6 for further details.

<footnote>Keywords: Dirichlet $L$-function, Dirichlet Character, Moment, Weighted Mean Square, Period Function, Eisenstein Series, Bernoulli Polynomial, Non Central Stirling Number, Euler-Maclaurin summation formula.</footnote>
(2) The weight $1/\cosh(\pi t) = |\Gamma(1/2 + it)|^2/\pi$ (Reflexion formula) is not merely cosmetic; it encodes a fundamental interaction between the Gamma function and $L(\cdot, \chi)$, which leads to this closed-form expression.

(3) A nice curiosity: $t \mapsto 2|L(\frac{1}{2} + it, \chi_{22})|^2/\cosh(\pi t)$ is a probability density on $\mathbb{R}$, where $\chi_4$ is the odd character modulo 4, applying Theorem 1.1 with $\chi = \chi_4$ and $N = 0$.

Let $\mathfrak{Jm}(z) > 0$ and $\chi$ be a primitive character mod $q$. Define:

$$ (1) \qquad E_{\chi}(z) = \frac{1}{\tau(\chi)} \sum_{n=1}^{\infty} \chi(n) d(n) e(nz/q) $$

$$ (2) \qquad \psi_{\chi}(z) = E_{\chi}(z) - \frac{\chi(-1)}{z} E_{\bar{\chi}}\left(-\frac{1}{z}\right). $$

Once the tools developed in Section 2 are in place – establishing that $\psi_\chi$ has an analytic continuation to $\mathbb{C} \setminus (-\infty, 0]$ – the previous result is a consequence of the following identity.

**Theorem 1.2.** For all primitive characters $\chi$ mod $q$, and all $n \ge 0$,

$$ (3) \qquad \psi_{n,\chi} := \frac{\psi_{\chi}^{(n)}(1)}{n!} = \frac{\varphi(q) (-1)^n}{2\pi i q n + 1} + \mathcal{B}_{\chi}(n) + (-1)^n \sum_{j=0}^{n} \binom{n}{j} \mathcal{B}_{\bar{\chi}}(j), $$

where

$$ \mathcal{B}_{\chi}(j) = \frac{(2\pi iq)^j}{\tau(\chi)(j+1)(j+1)!} \sum_{1 \le a,b \le q} B_{j+1}\left(\frac{a}{q}\right) B_{j+1}\left(\frac{b}{q}\right) \chi(ab) \xi^{ab}. $$

This generalizes the formula obtained by Bettin and Conrey [BC13b, Lemma 1, Part two] for the coefficient $\psi_n$ of their period function $\psi$, see Eq. (6) here. However, our proof relies on a different approach than that of [BC13b], as explained below.

The curious reader will be pleased to recover $\psi_n$ from $\psi_{n,\chi}$ by specializing to $q = 1$, $a = b = 1$, and $\chi(1) = 1$ in Theorem 1.2.

## 1.2. Why may these identities be interesting/useful?

(1) The moments in Theorem 1.1 arise in generalizations of the Nyman-Beurling-Báez-Duarte criteria. These criteria are approximation problems in $L^2(0, \infty)$ that provide reformulations of the Riemann Hypothesis (RH). They can be generalized in two directions: on the one hand, by altering the structure of the approximation problem related to the Riemann zeta function (see [DH21b, ADH22]); and on the other hand, by considering generalizations of the $\zeta$ function itself (see [DFMR13, LZ19]). In particular, Lewis and Zagier studied in [LZ19] a concrete auto-correlation function (or inner product) involving the primitive character of conductor 4, and derived an equivalent formulation of the Generalized Riemann Hypothesis for odd characters. The quantity we investigate here is related to a different structure of the inner product; see [DH24] for further details.

(2) Theorem 1.1 constitutes a *determinate Hamburger moment problem* – that is, the right-hand side provides a complete characterization, in a discrete setting, of $|L(1/2 + it, \chi)|$, similar to the case of $\zeta$ (cf. [DH24]). A basic upper bound on $L(1/2+it, \chi)$ (see e.g. [Dav80, Chap. 12, (14)]) is enough to ensure that the moments satisfy a standard determinacy criterion (cf. [Sim98, Prop. 1.5, p. 88]). The central question then becomes how to extract information about the behavior of the $L$-function, or about specific values, particularly for small $t$, as suggested by O. Ramaré.

(3) The computation leading to Theorem 1.2 is a *nontrivial application of an asymptotic formula* for sums of the form $\sum_n f((n+\alpha)t)$ – a method described by Zagier as “extremely useful, and not sufficiently well known” (see [Zag06, p.11]). This approach relies on a *shifted Euler-Maclaurin summation formula*. For our purposes, we require a slight extension of this formula to some complex domain, which is presented in detail in Section 5, and may be of independent interest.
(4) The formulas presented here are closed-form identities — that is, finite sums of tabulated quantities — which allow for the evaluation of the integral with near-infinite precision. For numerous insightful examples, see [BoC13]. To the best of our knowledge, the first closed-form expression involving an integral of an L-function was given by Lewis and Zagier for $\chi_4$, by combining Proposition 1, Proposition 2 (p.6), Equation (21), and the Mellin isometry in [LZ19].

(5) Moreover, the variety of tools involved, and the numerous connections with modular forms, Fourier analysis, combinatorics, and special functions, may be of independent interest; see e.g. [BLZ15, LZ19, AIK14, Com12]. The toolbox developed in Section 2 can also be used to extend to L-functions the sixth moment formula obtained for $\zeta$ in [DN24], as suggested by Y. Lamzouri.

(6) Last but not least, considering $2N$ in Theorem 1.1, the positive right hand side yields a sequence of non trivial positive sums involving all primitive characters, wether real or not. For any even $N$, the number $\chi(-1)(-1)^{\lfloor \frac{N}{2} \rfloor} B_N(\frac{1}{2}) \frac{\varphi(q)}{q}$, depending on its sign, then provides either a lower or an upper bound, in terms of $q$ and $N$, for the whole sum in the formula.

### 1.3. Previous works and main ideas.

1.3.1. A formula in the case of $\zeta$. In [DH24] it is proven that for all $N \ge 0$, writing $\sum_{\emptyset} := 0$,

$$ \frac{(-4)^N}{2} \int_{-\infty}^{\infty} \left| \zeta \left( \frac{1}{2} + it \right) \right|^2 \frac{t^{2N}}{\cosh(\pi t)} dt = \log(2\pi) - \gamma - 4N + \left( \frac{4^N}{2} - 1 \right) B_{2N} + \sum_{j=2}^{2N} T_{2N,j} \frac{\zeta(j)B_j}{j}, $$

where $T_{N,j} = (j-1)! \sum_{2 \le n \le N} \binom{N}{n} 2^n [(-1)^n S(n+1, j) + (-1)^j S(n, j-1)]$. This formula can be reformulated by means of the non central Stirling number $S_{-1/2}(N, j)$.

A generalization of this formula has been anticipated independently by C. Delaunay and O. Ramaré [Ram22], for L-functions of quadratic character, at least.

1.3.2. Lewis-Zagier and Folsom twisted period functions. Our definitions (1-2) are consistent with the functions introduced by Lewis and Zagier in [LZ19, p.21] in the case of the primitive character $\chi_4$ of conductor 4 (the authors also notice that their study can be generalized to primitive odd Dirichlet character $\chi_D$). Indeed, they define

$$ f(z) = \sum_{n \ge 1} \chi_4(n) d(n) e(nz/4), \quad \psi_f(z) = f(z) + \frac{1}{z} f(-1/z). $$

Note that $\chi_4(-1) = -1$, $\bar{\chi}_4 = \chi_4$ and $\tau(\bar{\chi}_4) = \tau(\chi_4)$. Hence we see that, up to the common factor $\tau(\chi)^{-1}$, our $E_{\chi_4}$ (resp. $\psi_{\chi_4}$) is their $f$ (resp. $\psi_f$). Let us notice that the factors $\tau(\chi)^{-1}$, $\chi(-1)$ and the conjugation $\bar{\chi}$ in (1-2), will appear as reasonable choices to obtain an exact relation between $\psi_\chi$ and $A_\chi$, see the proof in Section 2.3.

A. Folsom [Fol20] also proposed another large class of twisted Eisenstien series, based on general twisted divisor functions this time, and manage to show the analytic continuation of the associated period functions to $\mathbb{C}'$.

1.3.3. Bettin-Conrey works in the case of $\zeta$ and the connection with an identity of Ramanujan. The function $A$ introduced in [DH21a], is studied for complex numbers in [DN24]:

$$ A(z) = \int_{0}^{\infty} \left( \frac{1}{xz} - \frac{1}{e^{xz} - 1} \right) \left( \frac{1}{x} - \frac{1}{e^x - 1} \right) dx, \quad \Re(z) > 0. $$

It is an auto-correlation function and shows up in a particular generalization of the Nyman-Beurling criterion [DH21b] (see [BDBLS05] for a study of the auto-correlation function in the historical criterion).
The function $A$ has an analytic continuation to $\mathbb{C} \setminus (-\infty, 0]$, and allows to connect continuous and discrete Fourier analysis related to $\zeta$ through the following reformulations of identities by Ramanujan ([Ram15], 1915) and by Bettin and Conrey ([BC13b], 2013), respectively:

$$ (4) \qquad \mathcal{R}(z) := e^{z/2} A(e^z) = \frac{1}{2} \int_{-\infty}^{\infty} e^{itz} \left| \zeta\left(\frac{1}{2} + it\right) \right|^2 \frac{dt}{\cosh(\pi t)}, \quad -\pi < \mathfrak{Im}(z) < \pi, $$

$$ (5) \qquad A(z) = \frac{i\pi}{4}\psi(z) + r(z), \quad z \in \mathbb{C} \setminus (-\infty, 0], $$

where $r(z) = \frac{\log(2\pi) - \gamma}{2} \left(\frac{1}{z} + 1\right) + \frac{1}{2} \left(\frac{1}{z} - 1\right) \log(z)$, and the weight one Eisenstein series and period function defined in [BC13a, BC13b] read: for $\mathfrak{Im}(z) > 0$,

$$ E_1(z) = 1 - 4 \sum_{n=1}^{\infty} d(n)e(nz), \quad \psi(z) = E_1(z) - 1/z \ E_1(-1/z). $$

Based on ideas in [LZ01] they prove that $\psi$ has an analytic continuation to $\mathbb{C} \setminus (-\infty, 0]$, and moreover, see [BC13b, Lemma 1, Part two], for $|z| < 1$,

$$ (6) \qquad \psi(1+z) = \frac{2i}{\pi} \sum_{k=0}^{\infty} \psi_k z^k, \quad \psi_k = \frac{(-1)^k}{k+1} + 2 \sum_{j=1}^{k-1} (-1)^{k-j} \binom{k}{j} \frac{\zeta(j+1)B_{j+1}}{j+1}. $$

To obtain the moments in our study, a natural method is then to differentiate $z \mapsto e^{z/2}A(e^z)$ at 0 and so $A$ at 1, and use Eq. (6). We provide here all the necessary tools to do so in the case of the $L$-function. To prove the counter-part of (6) for $\psi_\chi$, we use an original method based on a double application of a quite general version of the shifted Euler-Maclaurin summation formula discussed by Zagier [Zag06], which may be one of the interests of this paper.

**1.4. Additional notations, properties.** We define $\mathbb{R}_{>0} = (0, \infty)$, $\mathbb{R}_{\ge 0} = [0, \infty)$, $\mathbb{R}_{<0} = (-\infty, 0)$ and so on. We will work with different complex domains: the Poincaré upper half-plane $\mathbb{H} = \{x + iy, y > 0\}$, the right half-plane $\mathfrak{R}_{>0} = \{x + iy, x > 0\}$, and $\mathbb{C}' = \mathbb{C} \setminus (-\infty, 0]$.

The fractional part of a real number $x$ is $\{x\} = x - \lfloor x \rfloor$ where $\lfloor x \rfloor$ is the largest integer less than or equal to $x$. For example, for any $\alpha \in (0, 1)$, on has

$$ \{x - \alpha\} = \begin{cases} x - \alpha + 1 & \text{if } 0 < x \le \alpha, \\ x - \alpha & \text{if } \alpha < x \le 1. \end{cases} $$

The Gamma function is defined as: $\Gamma(s) = \int_0^\infty e^{-x} x^{s-1} dx$, $\mathfrak{R}(s) > 0$.

The Fourier transform $\mathcal{F}[f]$ and Mellin transform $\mathcal{M}[g]$ are defined as:

$$ \mathcal{F}[f](w) = \int_{-\infty}^{\infty} e^{-ixw} f(x) dx, \quad w \in \mathbb{R}, $$

$$ \mathcal{M}[g](s) = \int_{0}^{\infty} g(x) x^{s-1} dx, \quad 0 < \mathfrak{R}(s) < 1, $$

for $f \in L^1(\mathbb{R})$ and $g: \mathbb{R}^+ \to \mathbb{R}$ such that $\int_0^\infty |g(x)|x^{\sigma-1} dx < \infty$ for all $\sigma \in (0, 1)$.

We will also encounter the general Gauss sum

$$ \tau(n, \chi) = \sum_{a=1}^{q-1} \chi(a) \xi^{an} = \bar{\chi}(n) \tau(\chi). $$

Recall that $\overline{\tau(\chi)} = \chi(-1)\tau(\bar{\chi})$.

The Bernoulli polynomials $B_n$ are defined as $B_n(x) = \sum_{k=0}^n \binom{n}{k} B_{n-k}x^k$ where $B_k$ are the $k$-th Bernoulli number: $B_0 = 1$, $B_1 = -1/2$, $B_2 = 1/6$, $B_3 = 0$, etc.

See e.g. [Ap08, p.189] for a review of many important relations.
1.5. **Outline.** Section 2 is devoted to the study of the various generalizations $A_\chi$, $\psi_\chi$ of the functions $A$ and $\psi$. Sections 3 and 4 contain the proofs of Theorems 1.2 and 1.1, respectively. Section 5 presents a general form of the shifted Euler–Maclaurin summation formula, which is used in the proof of Theorem 1.2. Finally, Section 6 collects several numerical experiments.

## 2. THE VARIOUS GENERALIZATIONS, THEIR RELATIONS AND ANALYTIC PROPERTIES

2.1. **The generalization $A_\chi$.** The following relation, for $0 < \Re(s) < 1$,

$$ \Gamma(s)\zeta(s) = \int_0^\infty f(x)x^{s-1}dx, \quad f(x) = \sum_{n=1}^\infty e^{-nx} - \frac{1}{x} = \frac{1}{e^x - 1} - \frac{1}{x}, \quad x > 0, $$

can be generalized to $L$-functions through the classical representation, see e.g. [IR90] p.263,

$$ (7) \qquad \Gamma(s)L(s, \chi) = \int_0^\infty f_\chi(x)x^{s-1}dx, \quad \Re(s) > 0, $$

where

$$ (8) \qquad f_{\chi}(x) = \sum_{n=1}^{\infty} \chi(n)e^{-nx}, \quad x > 0. $$

A possible generalization of the auto-correlation function $A$ is then:

$$ (9) \qquad A_{\chi}(v) = \int_{0}^{\infty} f_{\chi}(xv) f_{\bar{\chi}}(x) dx, \quad v > 0. $$

The reason for conjugating one factor will appear in the proof of Lemmas 2.2 and 2.3.

We provide a few basic properties of $f_\chi$ and $A_\chi$, which will be useful for the proofs.

**Lemma 2.1.** The functions $f_\chi$ and $A_\chi$ can be extended to continuous functions at 0. Moreover, $f_\chi(x) = O(e^{-x})$ as $x \to +\infty$, and $A_\chi(v) = O(1/v)$ as $v \to +\infty$. In particular, $M[A_\chi](s)$ is well defined for $0 < \Re(s) < 1$.

*Proof.* The continuity of $f_\chi$ at 0 is obtained, for instance, by the analytic continuation given by

$$ (10) \qquad f_{\chi}(z) = -\sum_{n=0}^{\infty} (-1)^n \frac{B_{n+1, \chi}}{(n+1)!} z^n, \quad |z| < 2\pi/q, $$

where $(B_{n,\chi})_{n\ge 0}$ is defined by: $\sum_{a=1}^{q-1} \chi(a) \frac{xe^{ax}}{e^{ax}-1} = \sum_{n=0}^{\infty} B_{n,\chi} \frac{x^n}{n!}$, see [IR90, p.264]. A crude bound from the definition (8) yields the bound at infinity for $f_\chi$.

The dominated convergence theorem provides the continuity of $A_\chi$ at 0 for any character, and the functional equation

$$ A_{\chi}(v) = A_{\bar{\chi}}(1/v)/v = \overline{A_{\bar{\chi}}(1/v)}/v, \quad v > 0, $$

gives the bound at infinity for $A_\chi$, which allows to conclude. $\square$

<figure><img src="image_4.png" /></figure>

2.2. **A relation between $A_\chi$ and $L(\cdot, \chi)$: Analytic properties.** We now propose a natural generalization of the function $\mathcal{R}$, introduced by Ramanujan in [Ram15], and of the function $Q$, introduced by Bettin and Conrey in [BC13b]:

$$ \begin{aligned} \mathcal{R}_{\chi}(x) &= e^{x/2} A_{\chi}(e^x) \\ Q_{\chi}(s) &= \Gamma(s)L(s, \chi)\Gamma(1-s)L(1-s, \bar{\chi}) = \frac{\pi}{\sin(\pi s)} L(s, \chi)L(1-s, \bar{\chi}). \end{aligned} $$

The following lemma generalizes the formulation given in [DN24], adapting *mutatis mutandis* the proof in the case of $A_\chi, \mathcal{R}_\chi, Q_\chi$. We only give some essential details.
**Lemma 2.2.** We have

$$ (11) \qquad \mathcal{M}[A_{\chi}](s) = Q_{\chi}(s), \quad 0 < \mathfrak{R}(s) < 1. $$

Moreover, $\mathcal{R}_\chi$, respectively $A_\chi$, has an analytic continuation on $\mathcal{W} = \{x + iy, -\pi < y < \pi\}$, resp. on $\mathcal{C}' = \mathcal{C} \setminus (-\infty, 0]$, given by:

$$ (12) \qquad \mathcal{R}_\chi(w) = \frac{1}{2} \int_{-\infty}^{\infty} e^{itw} \left| L\left(\frac{1}{2} + it, \bar{\chi}\right) \right|^2 \frac{dt}{\cosh(\pi t)}, \quad w \in \mathcal{W}, $$

$$ (13) \qquad A_{\chi}(z) = z^{-1/2} \mathcal{R}_{\chi}(\log z) = \int_{-\infty}^{\infty} z^{-\frac{1}{2}+it} \left| L\left(\frac{1}{2} + it, \bar{\chi}\right) \right|^2 \frac{dt}{\cosh(\pi t)}, \quad z \in \mathbb{C}'. $$

*Proof.* The relevant integrability conditions can be checked as in [DN24]. For $0 < \mathfrak{R}(s) < 1$, writing $-s = (1-s) - 1$ and using (7), we can write

$$ \begin{aligned} \mathcal{M}[A_{\chi}](s) &= \int_{0}^{\infty} \int_{0}^{\infty} f_{\chi}(xv) v^{s-1} dv \, f_{\bar{\chi}}(x) dx \\ &= \int_{0}^{\infty} f_{\chi}(v) v^{s-1} dv \int_{0}^{\infty} f_{\bar{\chi}}(x) x^{-s} dx = Q_{\chi}(s). \end{aligned} $$

Moreover, using the change of variable $y = e^x$, we obtain

$$ \mathcal{F}[\mathcal{R}_{\chi}](t) = \int_{-\infty}^{\infty} e^{-itx} e^{x/2} A_{\chi}(e^x) dx = \int_{0}^{\infty} y^{1/2 - it} A_{\chi}(y) \frac{dy}{y} = \mathcal{M}[A_{\chi}]\left(\frac{1}{2} - it\right). $$

Therefore, (11) and Euler's reflection formula yield:

$$ (14) \qquad \mathcal{F}[\mathcal{R}_{\chi}](t) = \left| L\left(\frac{1}{2} + it, \bar{\chi}\right) \right|^2 \frac{\pi}{\cosh(\pi t)}, \quad t \in \mathbb{R}. $$

We apply the inverse Fourier transform to (14) to obtain $\mathcal{R}_\chi$ and its analytic continuation to $\mathcal{W}$. Finally, we write $A_\chi(y) = y^{-1/2}\mathcal{R}_\chi(\log y)$, for $y > 0$, and note that $\log(\mathcal{C}') = \mathcal{W}$. $\square$

**2.3. A relation between $A_\chi$ and $\psi_\chi$.** Recall that for $\mathfrak{Im}(z) > 0$,

$$ \begin{aligned} E_{\chi}(z) &= \frac{1}{\tau(\chi)} \sum_{n=1}^{\infty} \chi(n) d(n) e(nz/q) \\ \psi_{\chi}(z) &= E_{\chi}(z) - \frac{\chi(-1)}{z} E_{\bar{\chi}}\left(-\frac{1}{z}\right), \end{aligned} $$

where $\chi$ is a primitive character (see [Ten22, p.318] for the general condition for which $\tau(\chi) \neq 0$).

We basically use the same tricks as in the proof of [BC13b, Lemma 1] (see also [DN24]), carefully keeping track of $\chi$ and its modulus $q$, to prove the following generalization.

**Lemma 2.3.** Let $\chi$ be a primitive Dirichlet character modulo $q > 1$.

The analytic continuations of $A_\chi$ and $\psi_\chi$ satisfy:

$$ A_{\chi}(z) = -\chi(-1) i \pi \psi_{\chi}(z), \quad z \in \mathbb{C}'. $$

*Proof.* Let $z \in \mathbb{H}$, then $-iz = e^{-i\pi/2}z \in \mathfrak{R}_{>0}$ and $|\arg(-2\pi iz)| < \pi/2$. Using the expansion

$$ L^2(s, \chi) = \sum_{n=1}^{\infty} \frac{\chi(n) d(n)}{n^s}, $$

and the functional equation

$$ L(s, \chi) = i^{-\delta} \tau(\chi) 2^s \pi^{s-1} q^{-s} \sin\left(\frac{\pi(s+\delta)}{2}\right) \Gamma(1-s) L(1-s, \bar{\chi}), $$
where $\chi(-1) = (-1)^{\delta}$, we obtain

$$
\begin{align*}
E_{\chi}(z) &= \frac{\tau(\chi)^{-1}}{2\pi i} \int_{(2)} \Gamma(s)L(s, \chi)^2 (-2\pi i z/q)^{-s} ds \\
&= \frac{i^{-\delta}}{2\pi i} \int_{(2)} \Gamma(s)L(s, \chi) 2^s \pi^{s-1} q^{-s} \sin(\pi(s+\delta)/2) \Gamma(1-s)L(1-s, \bar{\chi})(-2\pi i z/q)^{-s} ds \\
&= \frac{i^{-\delta}}{2\pi^2 i} \int_{(2)} \sin(\pi(s+\delta)/2) e^{\pi i s/2} Q_{\chi}(s) z^{-s} ds.
\end{align*}
$$

We recall that $Q_{\chi}(s) = \Gamma(s)L(s, \chi)\Gamma(1-s)L(1-s, \bar{\chi})$ and we set

$$
\mathcal{Q}_{\chi}(s, z) = \sin(\pi(s + \delta)/2) e^{\pi i s/2} Q_{\chi}(s) z^{-s}.
$$

Since $\mathcal{Q}_{\chi}(\cdot, z)$ has exponential decay at $\pm i\infty$, and $\mathcal{Q}_{\chi}(\cdot, z)$ has no poles in $\mathfrak{R}(s) > 0$ (which can be seen directly in the previous first expression of $E_{\chi}(z)$), we can move the line of integration to $(1/2)$ and get

$$
E_{\chi}(z) = \frac{i^{-\delta}}{2\pi^2 i} \int_{(1/2)} \mathcal{Q}_{\chi}(s, z) ds.
$$

Therefore, for $z \in \mathbb{H}$, i.e. $0 < \arg z < \pi$,

$$
-\frac{1}{z} E_{\bar{\chi}}\left(-\frac{1}{z}\right) = -\frac{1}{z} \cdot \frac{i^{-\delta}}{2\pi^2 i} \int_{(1/2)} \mathcal{Q}_{\bar{\chi}}(s, -1/z) ds.
$$

We have, using the change of variable $s \to 1-s$,

$$
\begin{align*}
-\frac{1}{z} \int_{(1/2)} \mathcal{Q}_{\bar{\chi}}(s, -1/z) ds &= -\frac{1}{z} \int_{(1/2)} Q_{\bar{\chi}}(s) \sin\left(\frac{\pi(s+\delta)}{2}\right) e^{\frac{\pi i s}{2}} (-\frac{1}{z})^{-s} ds \\
&= \int_{(1/2)} Q_{\bar{\chi}}(1-s) \sin\left(\frac{\pi(1-s+\delta)}{2}\right) e^{\frac{\pi i (1-s)}{2}} (-\frac{1}{z})^{s} ds
\end{align*}
$$

But $Q_{\bar{\chi}}(1-s) = Q_{\chi}(s)$ and

$$
\sin(\pi(1 - s + \delta)/2) = \cos(\pi(s - \delta)/2).
$$

Moreover $(-1/z)^s = e^{\pi i s} z^{-s}$ since $\arg(-1/z) = \pi - \arg z$, and then $e^{\pi i (1-s)/2} e^{\pi i s} = i e^{\pi i s/2}$.
Therefore

$$
-\frac{1}{z} E_{\bar{\chi}}(-\frac{1}{z}) = \frac{i^{-\delta}}{2\pi^2 i} \int_{(1/2)} \cos\left(\frac{\pi(s-\delta)}{2}\right) i e^{\frac{\pi i s}{2}} Q_{\chi}(s) z^{-s} ds.
$$

We now compute

$$
\begin{align*}
\sin\left(\frac{\pi(s+\delta)}{2}\right) e^{i\frac{\pi s}{2}} + (-1)^\delta i \cos\left(\frac{\pi(s-\delta)}{2}\right) e^{i\frac{\pi s}{2}} &= \frac{e^{i\frac{\pi(s+\delta)}{2}} - e^{-i\frac{\pi(s+\delta)}{2}}}{2i} e^{i\frac{\pi s}{2}} + (-1)^\delta i \frac{e^{i\frac{\pi(s-\delta)}{2}} + e^{-i\frac{\pi(s-\delta)}{2}}}{2} e^{i\frac{\pi s}{2}} \\
&= -\frac{i}{2} \left(e^{i\pi s} e^{i\frac{\pi\delta}{2}} - e^{-i\frac{\pi\delta}{2}}\right) + (-1)^\delta \frac{i}{2} \left(e^{i\pi s} e^{-i\frac{\pi\delta}{2}} + e^{i\frac{\pi\delta}{2}}\right) \\
&= \frac{i}{2} e^{i\pi s} \left((-1)^\delta e^{-i\frac{\pi\delta}{2}} - e^{i\frac{\pi\delta}{2}}\right) + \frac{i}{2} \left(e^{-i\frac{\pi\delta}{2}} + (-1)^\delta e^{+i\frac{\pi\delta}{2}}\right) \\
&= i(-i)^\delta,
\end{align*}
$$

where we noted that, either if $\delta = 0$ or $1$, then $(-1)^\delta e^{-i\frac{\pi\delta}{2}} - e^{i\frac{\pi\delta}{2}} = 0$. We then obtain

$$
\psi_{\chi}(z) = E_{\chi}(z) - \frac{(-1)^{\delta}}{z} E_{\bar{\chi}}\left(-\frac{1}{z}\right) = \frac{i^{-\delta}}{2\pi^2 i} \int_{(1/2)} i(-i)^{\delta} Q_{\chi}(s) z^{-s} ds = \frac{i\chi(-1)}{\pi} A_{\chi}(z),
$$

and we conclude due to Lemma 2.2. $\square$

<figure><img src="image_5.png" /></figure>
Another proof can be performed, in the same vein of [LZ19, p.22], computing directly the Mellin transform of $t \mapsto E_\chi(it)$. To do so, we would need to study the behavior at 0. Writing, for $t > 0$,

$$ 
\begin{align*}
\tau(\chi)E_{\chi}(it) &= \sum_{n=1}^{\infty} \chi(n) \sum_{b=1}^{\infty} \chi(b)e^{-b \cdot 2\pi t \frac{n}{q}} \\
&= \sum_{n=1}^{\infty} \chi(n) f_{\chi}(2\pi n t / q) \\
&= \sum_{a=1}^{q-1} \chi(a) \sum_{n=0}^{\infty} f_{\chi}(2\pi(n + a/q)t),
\end{align*}
$$

we can apply the shifted Euler-Maclaurin summation formula of Theorem 5.1 to the function $x \mapsto f_\chi(2\pi x)$ with shift $a/q$, using the expansion of $f_\chi$ given by (10).

We then remark that $t \mapsto E_\chi(it)$ has a continuous extension at 0 since

$$ \tau(\chi)E_{\chi}(it) = \frac{c_{-1}}{t} + c_0 + o(t), \quad t \to 0^{+}, $$

where

$$ c_{-1} = \sum_{a=1}^{q-1} \chi(a) \int_{0}^{\infty} f_{\chi}(t) \frac{dt}{2\pi} = 0. $$

### 3. PROOF OF THEOREM 1.2

The expansion of

$$ \psi_{\chi}(1 + it) = E_{\chi}(1 + it) - \frac{\chi(-1)}{1 + it} E_{\bar{\chi}}\left(-\frac{1}{1 + it}\right) $$

as $t \to 0^+$ will provide the derivatives $\psi_\chi^{(n)}(1)$ at any order.

We need to compute $E_\chi(1 + it)$ and

$$ E_{\bar{\chi}}\left(-\frac{1}{1+it}\right) = E_{\bar{\chi}}\left(-1 + i\frac{t}{1+it}\right). $$

To do so, we study $E_\chi(\pm 1 + iw)$ with $w \in \mathfrak{R}_{>0}$. First let us prove the following decomposition.

**Lemma 3.1.** We have for all $w \in \mathfrak{R}_{>0}$:

$$ E_{\chi}(\pm 1 + iw) = \frac{1}{\tau(\chi)} \sum_{j=1}^{q-1} \chi(j) \sum_{k \ge 0} \mathcal{E}_{\chi, \pm j}((j/q + k)iw), $$

$$ \text{where } \mathcal{E}_{\chi, \pm j}(z) = \sum_{b \ge 1} \chi(b) e(\pm bj/q) e(bz) \text{ for } z \in \mathbb{H}. $$

*Proof.* First, using the definition of the divisor function and summing according to congruence classes mod $q$, we can write:

$$ 
\begin{align*}
\tau(\chi)E_{\chi}(z) &= \sum_{m \ge 1} \chi(m) \sum_{b \ge 1} \chi(b)e(bmz/q) \\
&= \sum_{j=1}^{q-1} \sum_{\substack{m \ge 1 \\ m \equiv j \pmod q}} \chi(m) \sum_{b \ge 1} \chi(b)e(bmz/q) \\
&= \sum_{j=1}^{q-1} \chi(j) \sum_{k \ge 0} \sum_{b \ge 1} \chi(b)e(b(j + kq)z/q).
\end{align*}
$$

Therefore $\tau(\chi)E_\chi(z \pm 1) = \sum_{j=1}^{q-1} \chi(j) \sum_{k \ge 0} \sum_{b \ge 1} \chi(b)e(\pm bj/q) e(b(j/q + k)z)$, as claimed. $\square$
We then need to get the expansion of $\sum_{k \ge 0} \mathcal{E}_{\chi,r}(i(j/q+k)w)$, which is the purpose of the following.

**Lemma 3.2.** We have for all $\pm r \in \{1, \dots, q-1\}$, and $w \in \mathfrak{R}_{>0}$ near 0,

$$ \sum_{k \ge 0} \mathcal{E}_{\chi,r}(i(j/q + k)w) = -\frac{\tau(r, \chi) \log(w)}{2\pi q w} + \frac{1}{w} \left( \frac{\tau(r, \chi)}{2\pi q} K(j/q) + I_{\chi}(r) \right) + \sum_{n=0}^{N} \frac{B_{n+1}(j/q)}{(n+1)} c_{n,\chi}(r) w^n + O(w^N), $$

where $I_{\chi}(r) = \int_{0}^{\infty} \left( \mathcal{E}_{\chi,r}(ix) - \frac{\tau(r, \chi)}{2\pi q} \frac{e^{-x}}{x} \right) dx$, $K(\alpha) = -\gamma - \frac{\Gamma'(\alpha)}{\Gamma(\alpha)}$, and

$$ c_{n,\chi}(r) = \frac{(-2\pi q)^n}{(n+1)!} \sum_{a=1}^{q-1} \chi(a) e(\frac{ra}{q}) B_{n+1}(\frac{a}{q}). $$

*Proof.* This quantity is of the form of the Euler-Maclaurin formula Theorem 5.1 with a shift $j/q$. So let us study the expansion of $\mathcal{E}_{\chi,r}(iw)$.

We write by definition, with $b = a + qc$,

$$ \mathcal{E}_{\chi,r}(iw) = \sum_{b \ge 1} \chi(b)e(br/q)e(biw) = \sum_{a=1}^{q-1} \chi(a)e ra/q \sum_{c \ge 0} e((a+qc)iw). $$

First, we apply the shifted Euler-Maclaurin summation formula in Theorem 5.1 to the function $w \mapsto e^{-2\pi q w}$ with shift $a/q$, to get:

$$ \sum_{c \ge 0} e^{-2\pi(a/q+c)(qw)} = \frac{1}{2\pi q w} - \sum_{m=0}^{N} B_{m+1}(a/q) \frac{(-2\pi q)^m}{(m+1)!} w^m + O(w^{N+1}), $$

as $t \to 0^+$. Notice that $\tau(r, \chi) = \sum_{a=1}^{q-1} \chi(a)e(\frac{ra}{q})$. Hence, summing over $a$, we get

$$ \mathcal{E}_{\chi,r}(iw) = \frac{\tau(r, \chi)}{2\pi q w} - \sum_{m=0}^{N} c_{m,\chi}(r) w^m + O(w^{N+1}), $$

where

$$ c_{m,\chi}(r) = \frac{(-2\pi q)^m}{(m+1)!} \sum_{a=1}^{q-1} \chi(a) e(\frac{ra}{q}) B_{m+1}(\frac{a}{q}). $$

Second, we apply the shifted Euler-Maclaurin summation formula with shift $j/q$ and $w \mapsto \mathcal{E}_{\chi,r}(iw)$ to obtain the conclusion. $\square$

We are now ready to prove the following expansion.

**Lemma 3.3.** We have for $w \in \mathfrak{R}_{>0}$ near 0:

$$ E_{\chi}(\pm 1 + iw) = -\chi(\pm 1) \left( \frac{\varphi(q) \log(w)}{2\pi q w} + \frac{\kappa(q)}{w} \right) + \sum_{n=0}^{N} C_{\pm 1, \chi}(n) w^n + O(w^{N+1}), $$

where

$$ C_{1,\chi}(n) = \frac{(-2\pi q)^n}{\tau(\chi)(n+1)(n+1)!} \sum_{1 \le a,b \le q-1} \chi(ab) \xi^{ab} B_{n+1}(a/q) B_{n+1}(b/q) \\ C_{-1,\chi}(n) = (-1)^{n+1} \chi(-1) C_{1,\chi}(n), $$
and, denoting by $\gamma$ the Euler constant and $\chi_0$ the principal character modulo $q$,

$$ \kappa(q) = \gamma \frac{\varphi(q)}{2\pi q} + \frac{1}{2\pi q} \sum_{\substack{1 \le j \le q \\ (j,q)=1}} \frac{\Gamma'(\frac{j}{q})}{\Gamma(\frac{j}{q})} - \int_0^\infty \left( f_{\chi_0}(2\pi x) - \frac{\varphi(q) e^{-x}}{2\pi q x} \right) dx. $$

*Proof.* Applying the two previous lemmas gives for $w \in \mathfrak{R}_{>0}$ near 0:

$$ \begin{aligned} E_{\chi}(\pm 1 + i\omega) = & -\frac{1}{\tau(\chi)} \sum_{j=1}^{q-1} \chi(j) \frac{\tau(\pm j, \chi) \log(w)}{2\pi q w} \\ & + \frac{1}{w\tau(\chi)} \sum_{j=1}^{q-1} \chi(j) \left( \frac{\tau(\pm j, \chi)}{2\pi q} K(j/q) + I_{\chi}(\pm j) \right) \\ & + \frac{1}{\tau(\chi)} \sum_{j=1}^{q-1} \chi(j) \sum_{n=0}^{N} \frac{B_{n+1}(j/q)}{(n+1)} c_{n,\chi}(\pm j) w^n + O(w^{N+1}). \end{aligned} $$

The equality $\chi(j) \frac{\tau(\pm j, \chi)}{\tau(\chi)} = \chi(\pm 1)$ if $(j, q) = 0$, and 0 if not, allows to simplify the first two sums.

From the expressions

$$ c_{n,\chi}(r) = \frac{(-2\pi q)^n}{(n+1)!} \sum_{a=1}^{q-1} \chi(a) e(\text{ra/q}) B_{n+1}(a/q), $$

and

$$ \begin{aligned} \sum_{a=1}^{q-1} \chi(a) e(-ra/q) B_{n+1}(a/q) &= \sum_{a=1}^{q-1} \chi(q-a) e(-r(q-a)/q) B_{n+1}((q-a)/q) \\ &= (-1)^{n+1} \sum_{a=1}^{q-1} \chi(-a) e(\text{ra/q}) B_{n+1}(a/q), \end{aligned} $$

we get $\chi(-1)c_{n,\chi}(-r) = (-1)^{n+1}c_{n,\chi}(r)$, and the conclusion by computing the term in $1/w$. $\square$

We now finish the proof of Theorem 1.2. From Lemma 3.3, we can write for $t > 0$ near 0:

$$ E_{\chi}(1 + it) = -\frac{\varphi(q) \log(t)}{2\pi q t} - \frac{\kappa(q)}{t} + \sum_{n=0}^{N} C_{1,\chi}(n) t^n + O(t^{N+1}), $$

and

$$ \frac{\chi(-1)}{1+it} E_{\bar{\chi}} \left(-1 + i \frac{t}{1+it}\right) = -\frac{\varphi(q) \log(t)}{2\pi q t} + \frac{\varphi(q) \log(1+it)}{2\pi q t} - \frac{\kappa(q)}{t} + \sum_{n=0}^{N} \bar{\chi}(-1) C_{-1,\bar{\chi}}(n) \frac{t^n}{(1+it)^{n+1}} + O(t^{N+1}). $$

Summing, the divergent terms cancel since we know that $\psi_{\chi}$ is analytic near 1. Therefore

$$ \psi_{\chi}(1 + it) = -\frac{\varphi(q) \log(1 + it)}{2\pi q t} + \sum_{n=0}^{N} (-1)^n C_{1,\bar{\chi}}(n) \frac{t^n}{(1 + it)^{n+1}} + \sum_{n=0}^{N} C_{1,\chi}(n) t^n + O(t^{N+1}). $$

We now use the following series expansion near 0:

$$ \frac{1}{(1 + it)^{n+1}} = \sum_{a=0}^{\infty} \binom{a+n}{n} (-i)^a t^a $$

$$ \frac{\log(1 + it)}{t} = \sum_{n=1}^{\infty} (-1)^{n+1} \frac{i^n}{n} t^{n-1}, $$

and switching the sums, we obtain the desired result by uniqueness of the expansion.
## 4. PROOF OF THEOREM 1.1

First, note that we can use the same tools as in [DH24], especially the differential operator $\mathcal{D}: C^\infty(\mathbb{R}) \to C^\infty(\mathbb{R})$, $\mathcal{D}[\varphi](x) = x\varphi'(x)$, [DH24, Lemma 2.6], based on [AIK14, Prop. 2.6(4)].

Here, we identify in a natural way a specific non central Stirling number, see [Kou82], which simplifies the exposition in [DH24].

**Lemma 4.1.** Let $\varphi \in C^\infty(\mathbb{R})$ and $\phi(x) = e^{x/2}\varphi(e^x)$ for any $x \in \mathbb{R}$. Then, for all $n \ge 0$,

$$ \phi^{(n)}(x) = \sum_{k=0}^{n} S_{-1/2}(n, k) e^{(k+1/2)x} \varphi^{(k)}(e^x). $$

*Proof.* By induction, we have

$$ \phi^{(n)}(x) = \sum_{k=0}^{n} T(n, k) e^{(k+1/2)x} \varphi^{(k)}(e^x), $$

where $(T(n, k))_{0 \le k \le n}$ is defined by $T(n+1, k) = T(n, k-1) + (k+1/2)T(n, k)$, and $T(n, 0) = 1/2^n$ if $n \ge 0$, $T(0, k) = 0$ if $k \ge 1$. This number is known to be the non-central Stirling number $T(n, k) = S_{-1/2}(n, k)$, as defined in [Kou82, Section 2.1]. $\square$

Writing $\mathcal{R}_\chi(x) = e^{x/2}A_\chi(e^x)$, using the previous Lemma 4.1, and differentiating the integral expression of $B_\chi$, we obtain

$$ \mathcal{R}_{\chi}^{(N)}(0) = \frac{1}{2} \int_{-\infty}^{\infty} (it)^N e^{it \cdot 0} \left| L\left(\frac{1}{2} + it, \bar{\chi}\right) \right|^2 \frac{dt}{\cosh(\pi t)} = \sum_{n=0}^{N} S_{-1/2}(N, n) A_{\chi}^{(n)}(1). $$

Hence, from Lemma 2.3, i.e. $A_\chi(z) = -\chi(-1)i\pi \psi_\chi(z)$, and Theorem 1.2, i.e.

$$ \psi_{\chi}^{(k)}(1) = \frac{\varphi(q) (-1)^k}{2\pi iq k + 1} k! + \mathcal{B}_{\chi}(k)k! + (-1)^k k! \sum_{j=0}^{k} \binom{k}{j} \mathcal{B}_{\bar{\chi}}(j), $$

where

$$ (15) \qquad \mathcal{B}_{\chi}(k) = \frac{(2\pi iq)^k}{\tau(\chi)(k+1)(k+1)!} \sum_{1 \le a, b \le q} B_{k+1}(a/q) B_{k+1}(b/q) \chi(ab) \xi^{ab} $$

we finally obtain:

$$ \int_{-\infty}^{\infty} t^N \left| L\left(\frac{1}{2} + it, \bar{\chi}\right) \right|^2 \frac{dt}{\cosh(\pi t)} = -\chi(-1)i\pi \frac{2}{i^N} \left( \begin{aligned} & \frac{\varphi(q)}{2\pi iq} \sum_{k=0}^{N} S_{-1/2}(N, k) \frac{(-1)^k}{k+1} k! \\ & + \frac{1}{\tau(\chi)} \sum_{1 \le a, b \le q-1} \chi(ab) \xi^{ab} \mathcal{P}_N(a, b) \\ & + \frac{1}{\tau(\bar{\chi})} \sum_{1 \le a, b \le q-1} \bar{\chi}(ab) \xi^{ab} \mathcal{R}_N(a, b) \end{aligned} \right), $$

where

$$ \mathcal{P}_{\chi,N}(a,b) = \sum_{k=0}^{N} S_{-1/2}(N, k) \frac{(2\pi iq)^k}{(k+1)^2} B_{k+1}(a/q) B_{k+1}(b/q) $$

$$ \mathcal{R}_{\chi,N}(a,b) = \sum_{k=0}^{N} S_{-1/2}(K, k) (-1)^k k! \sum_{j=0}^{k} \binom{k}{j} \frac{q^j (2\pi i)^j}{(j+1)(j+1)!} B_{j+1}(a/q) B_{j+1}(b/q) $$

$$ = \sum_{j=0}^{N} \frac{1}{j!} \sum_{k=j}^{N} S_{-1/2}(K, k) (-1)^k k! \binom{k}{j} \frac{(2\pi iq)^j}{(j+1)^2} B_{j+1}(a/q) B_{j+1}(b/q). $$

We now simplify the previous expressions.
**Lemma 4.2.** We have for $N \ge 0$ and $0 \le j \le n$:

$$ \sum_{k=0}^{N} S_{-1/2}(N, k) \frac{(-1)^k}{k+1} k! = (2^{1-N} - 1) B_N. $$

*Proof.* We use Lemma 3.4 in [DH24], i.e.

$$ \sum_{n=0}^{N} \binom{N}{n} 2^n \sum_{k=0}^{n} S(n, k) k! \frac{(-1)^k}{k+1} = (2 - 2^N) B_N, $$

and the expression (2.5) in [Kou82]: $S_{-1/2}(N, k) = \frac{1}{2^N} \sum_{n=k}^{N} \binom{N}{n} 2^n S(n, k)$. $\square$

The exponential generating function of $S_{-1/2}(n, k)$ is given by, see [Kou82, Sec. 2.2],

$$ (16) \qquad \sum_{n \ge k} S_{-1/2}(n, k) \frac{u^n}{n!} = \frac{e^{u/2}}{k!} (e^u - 1)^k. $$

We now simplify $\mathcal{R}_{\chi,N}(a,b)$.

**Lemma 4.3.** We have

$$ S'_{-1/2}(N, j) := \frac{1}{j!} \sum_{k=j}^{N} S_{-1/2}(N, k) (-1)^k k! \binom{k}{j} = (-1)^N S_{-1/2}(N, j). $$

*Proof.* We compute the corresponding exponential generating function:

$$ \begin{aligned} \sum_{n \ge j} (-1)^n S'_{-1/2}(n, j) \frac{u^n}{n!} &= \sum_{n \ge j} \frac{(-1)^n}{j!} \sum_{k=j}^{n} S_{-1/2}(n, k) (-1)^k k! \binom{k}{j} \frac{u^n}{n!} \\ &= \frac{1}{j!} \sum_{k \ge j} \binom{k}{j} (-1)^k k! \sum_{n \ge k} S_{-1/2}(n, k) \frac{(-u)^n}{n!} \\ &= \frac{1}{j!} e^{-u/2} \sum_{k \ge j} \binom{k}{j} (-1)^k (e^{-u} - 1)^k \\ &= \frac{1}{j!} e^{-u/2} (1 - e^{-u})^j \sum_{k \ge j} \binom{k}{j} (1 - e^{-u})^{k-j} \\ &= \frac{1}{j!} e^{-u/2} \frac{(1 - e^{-u})^j}{(e^{-u})^{j+1}} = \frac{e^{u/2}}{j!} (e^u - 1)^j, \end{aligned} $$

which gives the conclusion.

Therefore

$$ \mathcal{R}_{\chi,N}(a,b) = (-1)^N \sum_{j=0}^{N} S_{-1/2}(N,j) \frac{(2\pi iq)^j}{(j+1)^2} B_{j+1}(a/q) B_{j+1}(b/q). $$

Notice, using $\chi(-1)\tau(\bar{\chi}) = \overline{\tau(\chi)}$ and $|\tau(\chi)|^2 = q$

$$ \begin{aligned} \chi(-1) \left( \frac{\chi(ab)}{\tau(\chi)} + (-1)^N \frac{\bar{\chi}(ab)}{\tau(\bar{\chi})} \right) &= \frac{\chi(ab)}{\tau(\bar{\chi})} + (-1)^N \frac{\bar{\chi}(ab)}{\tau(\chi)} \\ &= \frac{1}{q} \left( \chi(ab)\tau(\bar{\chi}) + (-1)^N \bar{\chi}(ab)\tau(\chi) \right). \end{aligned} $$

We now write $(\frac{1}{2^{N-1}} - 1) B_N = B_N(\frac{1}{2})$ in the first term, see e.g. [Coh07, Cor. 9.1.5 p.5-6].

Multiplying by $2\pi i$ and $-1/(i^N) = -(-i)^N$, and then factorizing the expression, yields the form given in Theorem 1.1 (replacing $\bar{\chi}$ by $\chi$).
5. THE SHIFTED EULER-MACLAURIN SUMMATION FORMULA

The goal of this section is to establish the variant of the Euler-Maclaurin formula that we will use. This variant is inspired by [Zag06].

For all $\varphi \in (-\frac{\pi}{2}, \frac{\pi}{2})$, we set

$$ \mathcal{C}_{\varphi}^{*} = \{z \in \mathbb{C}^{*} : |\arg(z)| < \varphi\} \text{ and } \mathcal{C}_{\varphi} = \mathcal{C}_{\varphi}^{*} \cup \{0\}. $$

A function $f$ is said to be rapidly decreasing if it is analytic on $\mathfrak{R}_{>0}$ and satisfies

$$ \forall (m, n) \in \mathbb{Z}_{\ge 0}^2 \quad \lim_{\substack{z \to \infty \\ z \in \mathfrak{R}_{>0}}} z^m f^{(n)}(z) = 0. $$

Finally, we say that a function $f$ defined on $\mathfrak{R}_{>0} \cup \{0\}$ is $\mathcal{C}$-analytic if:

(i) $f$ is rapidly decreasing;

(ii) $f$ admits an absolutely convergent power series expansion

$$ f(z) = \sum_{n=0}^{\infty} \check{f}_n z^n $$

near 0 (and hence is analytic on an open set $\mathcal{C}_{\varphi} \cup B(0, \rho)$ for all $\varphi \in (-\frac{\pi}{2}, \frac{\pi}{2})$ and some $\rho > 0$).

**Theorem 5.1.** Let $f: \mathfrak{R}_{>0} \to \mathbb{C}$. Assume that there exists a constant $\check{f}_{-1}$ such that the function $z \mapsto f(z) - \frac{\check{f}_{-1}}{z}$ is $\mathcal{C}$-analytic. Then $f$ admits a Laurent expansion with coefficients $(\check{f}_n)_{n \ge -1}$.

Let $h: \mathbb{R}_{>0} \to \mathfrak{R}_{>0}$. Suppose that $h(t) \to 0$ as $t \to 0$, and that there exist $\varphi \in (-\frac{\pi}{2}, \frac{\pi}{2})$ and $t_0 \in \mathbb{R}_{>0}$ such that $h((0, t_0)) \subset \mathcal{C}_{\varphi}$.

Then, for any $\alpha \in (0, 1)$, we have

$$ \sum_{m=0}^{\infty} f((m+\alpha)h(t)) = -\check{f}_{-1} \frac{\log h(t)}{h(t)} + \left( \check{f}_{-1} K(\alpha) + \int_{0}^{\infty} \left( f(x) - \check{f}_{-1} \frac{e^{-x}}{x} \right) dx \right) \frac{1}{h(t)} \\ - \sum_{n=0}^{N} \frac{B_{n+1}(\alpha)}{n+1} \check{f}_n h(t)^n + O(h(t)^N) $$

where $K(\alpha) = -\gamma - \frac{\Gamma'(\alpha)}{\Gamma(\alpha)}$.

The rest of this section is devoted to proving this theorem, starting with two auxiliary lemmas. The arguments are adapted from those presented in [Bak22].

**Lemma 5.2.** Let $f$ be a $\mathcal{C}$-analytic function. Then

$$ \sum_{m=0}^{\infty} f((m+\alpha)z) = \left(\int_{0}^{\infty} f\right) \frac{1}{z} - \sum_{n=0}^{N} \frac{B_{n+1}(\alpha)}{n+1} \check{f}_n z^n - R_N(z) $$

where

$$ R_N(z) = (-z)^{N+1} \int_0^\infty \frac{B_{N+1}(\{x-\alpha\})}{(N+1)!} f^{(N+1)}(xz) dx $$

for all $z \in \mathfrak{R}_{>0}$. Moreover, for any $\varphi \in (-\frac{\pi}{2}, \frac{\pi}{2})$, as $z \to 0$ in $\mathcal{C}_{\varphi}$, we have $R_N(z) = O(z^N)$.

*Proof.* By integration by parts,

$$ \int_{0}^{\alpha} \frac{B_{n}(x - \alpha + 1)}{n!} f^{(n)}(x) dx = \frac{B_{n+1}(1)}{(n+1)!} f^{(n)}(\alpha) - \frac{B_{n+1}(1 - \alpha)}{(n+1)!} f^{(n)}(0) \\ - \int_{0}^{\alpha} \frac{B_{n+1}(x - \alpha + 1)}{(n+1)!} f^{(n+1)}(x) dx $$
and

$$ \int_{\alpha}^{1} \frac{B_n(x - \alpha)}{n!} f^{(n)}(x) dx = \frac{B_{n+1}(1 - \alpha)}{(n + 1)!} f^{(n)}(1) - \frac{B_{n+1}(0)}{(n + 1)!} f^{(n)}(\alpha) \\ - \int_{\alpha}^{1} \frac{B_{n+1}(x - \alpha)}{(n + 1)!} f^{(n+1)}(x) dx $$

since $B'_{n+1}(x) = (n+1)B_n(x)$. For $n \ge 1$, we have $B_{n+1}(0) = B_{n+1}(1)$, $B_1(1) = -B_1(0) = 1/2$, and $B_{n+1}(1 - \alpha) = (-1)^{n+1}B_{n+1}(\alpha)$. Summing these two equalities and then summing the resulting identity over $n$, we get

$$ \int_0^1 f - f(\alpha) = - \sum_{n=0}^N \frac{B_{n+1}(\alpha)}{(n+1)!} (f^{(n)}(1) - f^{(n)}(0)) + (-1)^{N+1} \int_0^1 \frac{B_{N+1}(\{x-\alpha\})}{(N+1)!} f^{(N+1)}(x) dx $$

Applying this identity to the function $x \mapsto f(x+m)$ and summing over $m$, we obtain

$$ \sum_{m=0}^{\infty} f(\alpha + m) = \int_{0}^{\infty} f - \sum_{n=0}^{N} \frac{B_{n+1}(\alpha)}{n+1} \frac{f^{(n)}(0)}{n!} + (-1)^{N} \int_{0}^{\infty} \frac{B_{N+1}(\{x-\alpha\})}{(N+1)!} f^{(N+1)}(x) dx $$

We then apply this identity to the function $x \mapsto f(xz)$ for $z \in \mathfrak{R}_{>0}$. Noting that

$$ z \int_{0}^{\infty} f(xz) dx = \int_{0}^{\infty} f $$

(for instance by integrating over a contour supported on the real axis, the line through 0 with direction $z$, bounded by two arcs centered at 0, or via holomorphic extension from the identity valid for real $z$), we obtain

$$ \sum_{m=0}^{\infty} f((\alpha + m)z) = \frac{1}{z} \int_{0}^{\infty} f - \sum_{n=0}^{N} \frac{B_{n+1}(\alpha)}{n+1} \frac{f^{(n)}(0)}{n!} z^n + \tilde{R}_N(z) $$

where

$$ \tilde{R}_N(z) = (-1)^N z^{N+1} \int_0^\infty \frac{B_{N+1}(\{x-\alpha\})}{(N+1)!} f^{(N+1)}(xz) dx $$

The integral is $O(1/|z|)$ near 0. Indeed, suppose $|z| \ge 1$. The integral over $[0, 1/|z|]$ is $O(1/|z|)$, since its integrand is uniformly bounded by $\|B_{N+1}f^{(N+1)}\|_{\infty}$, the norm being taken over $[0, 1]$; the integral over $[1/|z|, \infty)$ is also $O(1/|z|)$ due to the rapid decay of $f$, which implies the existence of a constant $A > 0$ such that $|f^{(N+1)}(\xi)| \le A/|\xi|^2$ for $|\xi| \ge 1$. We deduce that $|\tilde{R}_N(z)| = O(|z|^N)$. $\square$

**Remark 5.3.** Lemma 5.2 implies, under the same assumptions,

$$ \sum_{m=0}^{\infty} f((m + \alpha)z) = \left( \int_{0}^{\infty} f \right) \frac{1}{z} - \sum_{n=0}^{N} \frac{B_{n+1}(\alpha)}{n+1} \tilde{f}_n z^n + O(z^{N+1}). $$

**Corollary 5.4.** Let $\varphi \in (-\frac{\pi}{2}, \frac{\pi}{2})$. As $w \to 0$ in $\mathscr{C}_{\varphi}^*$, we have

$$ \sum_{m=0}^{\infty} \frac{e^{-(m+\alpha)w}}{(m+\alpha)w} = -\frac{\log(w)}{w} + \frac{K(\alpha)}{w} + \sum_{m=0}^{N} \frac{B_{m+1}(\alpha)}{m+1} \frac{(-1)^m}{(m+1)!} w^m + O(w^{N+1}) $$

where $K(\alpha) = -\gamma - \frac{\Gamma'(\alpha)}{\Gamma(\alpha)}$.

*Proof.* Let $w \in \mathfrak{R}_{>0}$ and $\varphi \in (-\frac{\pi}{2}, \frac{\pi}{2})$ such that $w \in \mathscr{C}_{\varphi}^*$. We apply Lemma 5.2 to write

$$ \sum_{m=0}^{\infty} e^{-(m+\alpha)\xi} = \frac{1}{\xi} - \sum_{n=0}^{N+1} \frac{(-1)^n B_n(\alpha)}{(n+1)!} \xi^n - R_{N+1}(\xi) $$

for all $\xi \in \mathscr{C}_{\varphi}^*$. The bound $B_n(\alpha) = O(n!(2\pi)^n)$ (see [Leh40]) implies that

$$ R_{N+1}(\xi) = \sum_{n=N+2}^{\infty} \frac{(-1)^n B_n(\alpha)}{(n+1)!} \xi^n $$
and hence, $R_{N+1}$ has a primitive on a disc centered a 0. Let $\tilde{R}_{N+1}$ denote such a primitive vanishing at 0.

We get

$$ \sum_{m=0}^{\infty} \frac{e^{-(m+\alpha)w}}{m+\alpha} = K(\alpha) + \log(w) - \sum_{n=0}^{N+1} \frac{(-1)^n B_n(\alpha)}{(n+1)(n+1)!} w^{n+1} - \tilde{R}_{N+1}(w). $$

To evaluate $K(\alpha)$, we observe that

$$ \begin{aligned} \sum_{m=0}^{\infty} \frac{e^{-(m+\alpha)\epsilon}}{m+\alpha} &= \sum_{m=0}^{\infty} \int_{\epsilon}^{\infty} e^{-(m+\alpha)x} dx = \int_{\epsilon}^{\infty} \frac{e^{(1-\alpha)x}}{e^x - 1} dx \\ &= e^{-\alpha\epsilon} \log(e^{\epsilon} - 1) + \alpha \int_{\epsilon}^{\infty} e^{-\alpha x} \log(e^x - 1) dx \end{aligned} $$

so that

$$ \sum_{m=0}^{\infty} \frac{e^{-(m+\alpha)\epsilon}}{m+\alpha} + \log(\epsilon) = \alpha \int_{0}^{1} (1-u)^{1-\alpha} \log(u) du + o(1) = -\gamma - \frac{\Gamma'(\alpha)}{\Gamma(\alpha)} + o(1) $$

using [GR07, 4.253.1, 8.384.1, 8.366.1, 8.365.1].

Finally,

$$ |\tilde{R}_{N+1}(w)| \le \max_{z \in [\epsilon, w]} |R_{N+1}(z)| \cdot |w - \epsilon| = O(|w|^{N+1}). \quad \square $$

*Proof of Theorem 5.1.* Define $g(z) = f(z) - \tilde{f}_{-1} \frac{e^{-z}}{z}$. Then $g$ is $\mathscr{C}$-analytic and

$$ \tilde{g}_n = \tilde{f}_n + \frac{(-1)^n}{(n+1)!} \tilde{f}_{-1} $$

for all integers $n \ge 0$. Lemma 5.2 then gives

$$ \sum_{m=0}^{\infty} g((m+\alpha)h(t)) = \frac{1}{h(t)} \int_{0}^{\infty} \left( f(t) - \tilde{f}_{-1} \frac{e^{-t}}{t} \right) dt \\ - \sum_{n=0}^{N} \frac{B_{n+1}(\alpha)}{n+1} \left( \tilde{f}_n + \frac{(-1)^n}{(n+1)!} \tilde{f}_{-1} \right) h(t)^n + O(h(t)^N). $$

The result then follows from Corollary 5.4. $\square$

<figure><img src="image_6.png" /></figure>

# 6. EXAMPLES AND NUMERICAL EXPERIMENTS

## 6.1. A few remarks and examples. We now set

$$ m_N(\chi) = \int_{-\infty}^{\infty} t^N \left| L\left(\frac{1}{2} + it, \chi\right) \right|^2 \frac{dt}{\cosh(\pi t)}. $$

For any character, we have from the change of variable $t \to -t$: $m_{2N+1}(\chi) = -m_{2N+1}(\bar{\chi})$. Hence, if $\chi$ is real, the odd moments are 0. If $\chi$ is not real, the odd moments may be positive or negative; an example with negative odd moments is given below.

For any odd primitive quadratic character $\chi$, Theorem 1.1 gives:

$$ m_0(\chi) = \frac{\varphi(q)}{q} - \frac{4\pi i \tau(\chi)}{q} \sum_{1 \le a, b \le q} \left( \frac{a}{q} - \frac{1}{2} \right) \left( \frac{b}{q} - \frac{1}{2} \right) \chi(ab) \xi^{ab}. $$

Notice that $\overline{\tau(\chi)} = \chi(-1)\tau(\bar{\chi}) = -\tau(\chi)$, so $4\pi i \tau(\chi) \in \mathbb{R}$, and so is the sum (which can also be checked in an elementary way).
Remarkably, for $\chi_4$, the sum above is 0, and $m_0(\chi_4) = \frac{1}{2}$. The $L$-function associated to this character has many interesting properties, see also [BPY01, p.458]. Also note that

$$m_0(\chi_3) = \frac{2}{3} - \frac{2\pi}{9\sqrt{3}} = 0.2636001412...$$

for the primitive odd character $\chi_3$ modulo 3, which shows that the sign of the first term right after the Stirling number can be negative.

**6.2. The first moments of the first odd characters.** The characters $\chi_3$ and $\chi_4$ are real and there are two complex conjugate characters modulo 5. Define $\chi_5(2) = -\chi_5(3) = -i$, $\chi_5(-1) = -1$.

<table><thead><tr><th>k</th><th>m<sub>k</sub>(χ<sub>3</sub>)</th><th>m<sub>k</sub>(χ<sub>4</sub>)</th><th>m<sub>k</sub>(χ<sub>5</sub>)</th></tr></thead><tbody><tr><td>0</td><td>0.263600...</td><td>0.5</td><td>0.699061...</td></tr><tr><td>1</td><td>0</td><td>0</td><td>-0.045214...</td></tr><tr><td>2</td><td>0.101605...</td><td>0.178744...</td><td>0.238198...</td></tr><tr><td>3</td><td>0</td><td>0</td><td>-0.082899...</td></tr><tr><td>4</td><td>0.217067...</td><td>0.334811...</td><td>0.414305...</td></tr><tr><td>5</td><td>0</td><td>0</td><td>-0.338419...</td></tr><tr><td>6</td><td>1.091158...</td><td>1.413929...</td><td>1.616508...</td></tr><tr><td>7</td><td>0</td><td>0</td><td>-2.209431...</td></tr><tr><td>8</td><td>9.310390...</td><td>9.787352...</td><td>10.565897...</td></tr><tr><td>9</td><td>0</td><td>0</td><td>-19.075490...</td></tr><tr><td>10</td><td>114.676457</td><td>95.077818...</td><td>103.068850...</td></tr></tbody></table>

**6.3. The moment 0 and the central point.** It is tempting to study the ratio between $m_0(\chi)$ and $|L(1/2, \chi)|^2$, which is displayed in Figure 1 up to the 100th primes.

Large values of this ratio do not appear to be particularly rare, and a more detailed investigation using PARI/GP reveals that increasingly exceptional behavior, relative to an average trend, can occur as the modulus grows.

<figure><img src="image_7.png" /><figcaption>FIGURE 1. Graph of $n \mapsto \frac{m_0(\chi_{p_n})}{|L(1/2, \chi_{p_n})|^2}$, where $\chi_{p_n}$ is a random character modulo the $n$-th prime $p_n$, $n \le 100$.</figcaption></figure>
6.4. About the coefficients in the expansion $\psi_{\chi}(1+z)$. We write the Taylor series of $\psi_{\chi}$ around 1:

$$ \psi_{\chi}(1+z) = \sum_{n=0}^{\infty} \psi_{n,\chi} z^n, \quad \psi_{n,\chi} = \frac{\psi_{\chi}^{(n)}(1)}{n!}, $$

where the formula for $\psi_{n,\chi}$ is given by Theorem 1.2. We now fix $q = 5$ and $\chi = \bar{\chi}_5$ the non-real character defined by $\bar{\chi}_5(2) = -\bar{\chi}_5(3) = i$, $\bar{\chi}_5(-1) = -1$.

First, the values $\psi_n$ are surprisingly small (see Figure 2). Actually they seem to decay sub-exponentially in $n$. The reason this is a surprise is that the values $\mathcal{B}_{\chi}(n)$ in Theorem 1.2 seem to grow at least exponentially in $n$. A similar phenomena is also recorded in [BC13b, Th. 2 p.5712].

<figure><img src="image_8.png" /><figcaption>FIGURE 2. Graph of $n \mapsto e^{\sqrt{\pi n}}|\psi_{n,\chi}|$ for $n \le 250$.</figcaption></figure>

Second, we observe that the values $\psi_{n,\chi}$ roughly lie on a line in the $(\mathfrak{R}, \mathfrak{Im})$-plane. This is reflected in Figure 3. It seems to be natural to plot the ratio $R_n := \mathfrak{Im}(\psi_{n,\chi})/\mathfrak{Im}(\psi_{n,\chi})$. The result is Figure 4. It is quite apparent from the picture that $R_n$ interpolates a smooth function $R_x$ with some poles. Also, the behavior around these poles seems to be random.

As observed also from Figure 3 it seems that Figure 4 hovers around a horizontal line (in this particular case it seems to be around $-\phi$, the golden ratio, but this is specific to $q = 5$). We do not yet have an explanation for these curiosities.
<figure><img src="image_9.png" /><figcaption>FIGURE 3. Points $\psi_{n,\chi}$ plotted in the complex plane for $12 \le n \le 250$.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>FIGURE 4. Graph of $n \mapsto R_n := \mathfrak{Im}(\psi_{n,\chi})/\mathfrak{Re}(\psi_{n,\chi})$ for $20 \le n \le 200$.</figcaption></figure>
ACKNOWLEDGEMENT

The authors are very grateful to Christophe Delaunay for initiating this project and many
insightful discussions, and to Olivier Ramaré for his very interesting suggestions. They both
anticipated possible generalizations of the formula in [DH24], independently.

S.D. is in debt to Youness Lamzouri for discussing various generalizations, pointing out relations
with Fekete polynomials, and many other aspects including higher moments of L-functions, and
finally for communicating the reference [Ram80]. He also thanks Lucas Benigni, Erik Carlsson,
Francesco Cellarosi, Thierry Daudé, Hélène Guérin, Erwan Hillion, Joseph Najnudel, Dan Romik,
Zachary Selk and Thomas Simon for stimulating discussions and insightful connections.

E.R. is partially funded by the ANR-23-CE40-0006-01 Gaec project

REFERENCES

[ADH22] F. Alouges; S. Darses; E. Hillion. Polynomial approximations in a generalized Nyman-Beurling criterion. *Journal de Théorie des Nombres de Bordeaux*. Tome 34, no 3 (2022), p. 767-785.

[AIK14] T. Arakawa; T. Ibukiyama; M. Kaneko. Bernoulli numbers and zeta functions. With an appendix by Don Zagier. Springer Monographs in Mathematics. Springer, Tokyo, 2014.

[Ap08] T. Apostol. A primer on Bernoulli numbers and polynomials. Mathematics Magazine, 81(3) (2008), 178-190.

[Bak22] S. Baksi. Shifted Euler-Maclaurin Formula and its Applications. Unpublished note. Retrieved from: https://www.researchgate.net/publication/369571049_Shifted_Euler-Maclaurin_Formula_and_its_Applications

[BDBLS05] L. Báez-Duarte; M. Balazard, B. Landreau; É. Saias. Étude de l'autocorrélation multiplicative de la fonction "partie fractionnaire". (French) *The Ramanujan Journal*, 9(1) (2005), pp. 215–240.

[BC13a] S. Bettin; J.B. Conrey. Period functions and cotangent sums. *Algebra and Number Theory* 2013, 7(1), 215-242.

[BC13b] S. Bettin; J.B. Conrey. A reciprocity formula for a cotangent sum. *Int. Math. Res. Not.* IMRN 2013, no. 24, 5709-5726.

[BPY01] P. Biane; J. Pitman; M. Yor. Probability laws related to the Jacobi theta and Riemann zeta functions, and Brownian excursions. *Bull. Amer. Math. Soc.* (N.S.) 38 (2001), no. 4, 435–465.

[BoC13] J.M. Borwein; R. E. Crandall. Closed Forms: What They Are and Why We Care. *Notices Amer. Math. Soc.* 2013, Volume 60, Number 1.

[BLZ15] R. Bruggeman; J. Lewis; D. Zagier. Period functions for Maass wave forms and cohomology. *Mem. Amer. Math. Soc.* 237 (2015), no. 1118.

[Coh07] H. Cohen. Number theory. Vol. II. Analytic and modern tools. *Grad. Texts in Math.*, 240 Springer, New York, 2007.

[Com12] L. Comtet. Advanced Combinatorics: The art of finite and infinite expansions. Springer Science & Business Media (2012).

[DH21a] S. Darses; E. Hillion. An exponentially-averaged Vasyunin formula. *Proc. Amer. Math. Soc.* 149 (2021), no. 7, 2969-2982.

[DH21b] S. Darses; E. Hillion. On probabilistic generalizations of the Nyman-Beurling criterion for the zeta function. *Confluentes Math.* 13 (2021), no. 1, 43–59.

[DH24] S. Darses; E. Hillion. Polynomial moments with a weighted zeta square measure on the critical line. *Acta Arith.* 212, No. 3, 225-254 (2024).

[DN24] S. Darses; J. Najnudel. Multiple integral formulas for weighted zeta moments: the case of the sixth moment, *Ramanujan J.* 65 (2024), 1421-1447.

[Dav80] H. Davenport. Multiplicative number theory. Second edition. Revised by Hugh L. Montgomery. Graduate Texts in Mathematics, 74. Springer-Verlag, New York-Berlin, 1980.

[DFMR13] C. Delaunay; E. Fricain, E. Mosaki; O. Robert. Zero-free regions for Dirichlet series. *Trans. Amer. Math. Soc.*, 365 (2013), no. 6, 3227–3253.

[Fol20] A. Folsom. Twisted Eisenstein series, cotangent-zeta sums, and quantum modular forms. *Trans. London Math. Soc.* 7 (2020), no. 1, 33-48.

[GR07] I.S. Gradshteyn; I.M. Ryzhik. Table of Integrals, Series, and Products. Academic Press, 2014. 8th ed.

[GKP94] R.L. Graham; D.E. Knuth; O. Patashnik. Concrete mathematics: a foundation for computer science. Computers in Physics, 3(5), 1994.

[IR90] K. Ireland; M. Rosen. A classical introduction to modern number theory. Second edition. Graduate Texts in Mathematics, 84. Springer-Verlag, New York, 1990.

[Kou82] M. Koutras. Noncentral Stirling numbers and some applications. *Discrete Math.* 42 (1982), no. 1, 73–89.

[Leh40] D. H. Lehmer. On the Maxima and Minima of Bernoulli Polynomials. *Amer. Math. Monthly*. 47 (1940), no. 8, 533–538.

[LZ01] J. Lewis; D. Zagier. Period functions for Maass wave forms. I. *Ann. of Math.* (2) 153 (2001), no. 1, 191-258.
[LZ19] J. Lewis; D. Zagier. Cotangent sums, quantum modular forms, and the generalized Riemann hypothesis. *Res. Math. Sci.* 6:4 (2019).

[Ram80] K. Ramachandra. Some remarks on the mean value of the Riemann zeta function and other Dirichlet series. II. *Hardy-Ramanujan J.* 3 (1980), 1–24.

[Ram15] S. Ramanujan. New expressions for Riemann's functions ξ(s) and Ξ(t). *Quart. J. Math*, 46, (1915) 253-260.

[Ram22] O. Ramaré. Personal communication to S. Darses. *E-mail Sept. 2022*.

[Sim98] B. Simon. The classical moment problem as a self-adjoint finite difference operator. *Adv. Math.* 137 (1998), no. 1, 82–203.

[Ten22] G. Tenenbaum. Introduction à la théorie analytique et probabiliste des nombres, *Dunod*, 2022.

[Tit86] E. C. Titchmarsh, The theory of the Riemann zeta-function, second ed., *The Clarendon Press Oxford University Press*, New York, 1986.

[Zag06] D. Zagier. The Mellin transform and related analytic techniques. Appendix to E. Zeidler. *Quantum field theory I: basics in mathematics and physics. A bridge between mathematicians and physicists*. Springer-Verlag, Berlin-Heidelberg-New York (2006), 305-323.

CNRS – UNIVERSITÉ DE MONTRÉAL CRM–CNRS

AIX-MARSEILLE UNIVERSITÉ, CNRS, I2M, MARSEILLE, FRANCE

Email address: seb.darses@gmail.com

CRM, UNIVERSITÉ DE MONTRÉAL, P.O. Box 6128, CENTRE-VILLE STATION MONTRÉAL (QUÉBEC) H3C 3J7, CANADA

Email address: b.j.ringeling@gmail.com

CNRS – UNIVERSITÉ DE MONTRÉAL CRM–CNRS

UNIVERSITÉ CLERMONT AUVERGNE, CNRS, LABORATOIRE DE MATHÉMATIQUES BLAISE PASCAL, F-63000 CLERMONT-FERRAND, FRANCE.

Email address: emmanuel.royer@math.cnrs.fr