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

HAL
open science

# The convergence of certain Diophantine series

Fernando Chamizo, Bruno Martin

► To cite this version:

Fernando Chamizo, Bruno Martin. The convergence of certain Diophantine series. Journal of Number Theory, 2021, 229, pp.179-198. 10.1016/j.jnt.2021.04.022. hal-04154176

HAL Id: hal-04154176

https://hal.science/hal-04154176

Submitted on 6 Jul 2023

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.

Public Domain
# The convergence of certain Diophantine series

Fernando Chamizo$^{a,1,*}$, Bruno Martin$^b$

$^a$Universidad Autónoma de Madrid and ICMAT, Ciudad universitaria de Cantoblanco, Madrid, 28049, Spain

$^b$Laboratoire de Mathématiques Pures et Appliquées, CNRS, Université du Littoral Côte d'Opale, 50 rue F. Buisson, BP 599, Calais, 62228, France

## Abstract

For $x$ irrational, we study the convergence of series of the form $\sum n^{-s}f(nx)$ where $f$ is a real-valued, 1-periodic function which is continuous, except for singularities at the integers with a potential growth. We show that it is possible to fully characterize the convergence set and to approximate the series in terms of the continued fraction of $x$. This improves and generalizes recent results by Rivoal who studied the examples $f(t) = \cot(\pi t)$ and $f(t) = \sin^{-2}(\pi t)$.

**Keywords:** Diophantine series, Lipschitz regularity, Approximate functional equation

**2020 MSC:** 11J70, 26A15, 26A30

## 1. Introduction

The study of the convergence of series $\sum_{n=1}^{\infty} n^{-s}f(nx)$ with 1-periodic $f$ has a long tradition that can be traced back to early works by Riemann [1, Mém.XII] and Dirichlet, when the theory of functions and harmonic analysis began to emerge. The topic was taken up by Hardy and Littlewood (e.g. [2]) and the research has continued until present times (see [3], [4] and their references). As an aside, we mention that Hardy and Littlewood were particularly interested in the quadratic case $\sum n^{-s}f(n^2x)$ and even higher degree

<footnote>*Corresponding author</footnote>

<footnote n="1">¹The first author is partially supported by the MTM2017-83496-P grant of the MICINN (Spain) and by “Severo Ochoa Programme for Centres of Excellence in R&D” (SEV-2015-0554).</footnote>
polynomial frequencies [5], [6]. In these cases we know that even when the series converges everywhere, it may show intricate fractal and multifractal properties [7], [8]. Here we focus on the linear case with a singular f inducing a dense divergence set.

In some examples, a remarkable fact is that the convergence is linked to Diophantine approximation properties that are better expressed in terms of the continued fraction of x. In this paper we clarify this connection in a quite general setting. Recall that each $x \in \mathbb{R} \setminus \mathbb{Q}$ can be expanded as a continued fraction $[a_0; a_1, a_2, \dots]$, where the $a_j$ are the partial quotients (we use the standard notation as in the classic [9]). For $j \ge 0$ we define

$$ \frac{p_j}{q_j} = [a_0; a_1, \dots, a_j] \quad \text{and} \quad \beta_j = |q_j x - p_j|. \qquad (1) $$

The fractions $p_j/q_j$ are called the convergents of $x$. They give the best rational approximations of $x$, and $\beta_j$ quantifies the error which in fact is comparable to $q_{j+1}^{-1}$. We put $\beta_{-1} = 1$ to be consistent with the special definition $p_{-1}/q_{-1} = 1/0$, considered by some authors in order to force the validity of the recurrence relations $p_{j+1} = a_{j+1}p_j + p_{j-1}$ and $q_{j+1} = a_{j+1}q_j + q_{j-1}$ even for $j = 0$. We refer the reader to the beginning of §2 and to the references [9], [10], [11] for the basic theory of continued fractions.

In [4] Rivoal studied the problem of convergence for

$$ \Phi_s(x) = \sum_{n=1}^{\infty} \frac{\cot(\pi nx)}{n^s} \quad \text{and} \quad \hat{\Phi}_s(x) = \sum_{n=1}^{\infty} \frac{1}{n^s \sin^2(\pi nx)} $$

(we keep the original notation). The main results in [4] state that for $s > 2$ and $x \in \mathbb{R} \setminus \mathbb{Q}$, the series $\Phi_s(x)$ and $\hat{\Phi}_s(x)$ converge if and only if $\sum_{j=0}^{\infty} (-1)^j q_j^{-s} q_{j+1}$ and $\sum_{j=0}^{\infty} q_j^{-s} q_{j+1}^2$ converge, respectively. It is conjectured that the convergence criterion for $\Phi_s(x)$ extends to $s > 1$ (see the remarks after [4, Th.1.1]).

These results were obtained employing approximate functional equations relating partial sums of these functions at $x$ and $1/x$. By iteration, Rivoal obtains the convergence criterions for $\Phi_s(x)$ and $\hat{\Phi}_s(x)$ and also identities for these functions involving the convergents $p_j/q_j$. This elegant method was initiated by Hardy and Littlewood in their work [6] on the quadratic case. Unfortunately, there is a gap in the proof of the convergence criterion for $\Phi_s(x)$. This is due to a slight mistake in the related approximate functional equation, which has significant consequences on the argument (see §4).
Here we follow a different approach that does not depend on functional equations. It is somewhat simpler and applies to a general class of functions. On the other hand it covers all ranges and provides a kind of basic numerical approximation in the case of convergence in terms of the continued fraction.

Namely, we show in §3

**Theorem 1.1.** Let $f: \mathbb{R} \setminus \mathbb{Z} \to \mathbb{R}$ be a 1-periodic continuous function such that $t^k f(t) = c_k + O(t)$ for some $k \in \mathbb{Z}^+$ and $c_k \neq 0$ when $t \to 0$. Then the series

$$S = \sum_{n=1}^{\infty} n^{-s} f(nx) \quad \text{with} \quad x \in \mathbb{R} \setminus \mathbb{Q}$$

converges if and only if $s > k$ and $T = \sum_{j=0}^{\infty} (-1)^{kj} q_j^{-s} \beta_j^{-k}$ converges.

Choosing $f(t) = \cot(\pi t)$ with $k=1$ and $f(t) = \csc^2(\pi t)$ with $k=2$, it follows that $\Phi_s(x)$ converges if and only if $s > 1$ and $\sum_{j=0}^{\infty} (-1)^j q_j^{-s} q_{j+1}$ converges, as well as $\hat{\Phi}_s(x)$ converges if and only if $s > 2$ and $\sum_{j=0}^{\infty} q_j^{-s} q_{j+1}^2$ converges, thus extending Rivoal's results (see Corollary 3.3).

Assuming a greater regularity around zero, we obtain a good approximation of $S$ by a variant of $T$.

**Theorem 1.2.** With the notation of Theorem 1.1, if

$$t^k f(t) = \sum_{m=1}^{k} c_m t^{k-m} + O(t^k) \quad \text{for some } k \in \mathbb{Z}^+,$$

then there exists $C = C(f, s)$, not depending on $x$, such that for any $x$ in the convergence set of $S$

$$\left|S - \sum_{j=0}^{\infty} q_j^{-s} P((-1)^j \beta_j^{-1})\right| < C,$$

where $P$ is the polynomial $\sum_{m=1}^{k} \zeta(s+m)c_m t^m$ with $\zeta$ the Riemann zeta function.

Although this approximation allows to evaluate $S(x)$ with a certain precision when combined with truncation, it does not give the identities included in Theorems 1 and 2 of [4]. A natural question is whether the repaired approximate functional equation (see Proposition 4.1) can give similar identities by iteration. We address this problem in §4. We only consider $\Phi_s(x)$ to get [4, (1.11)]
**Theorem 1.3.** If $\Phi_s(x)$ converges, then

$$ \Phi_s(x) = \sum_{j=0}^{\infty} (-1)^j \beta_{j-1}^{s-1} c_s(\beta_j/\beta_{j-1}), $$

where $c_s(t) = \pi^{-1}t^{-1}\zeta(s+1) + P_s(t)$ with

$$ P_s(t) = \frac{i}{2} \int_{1/2-i\infty}^{1/2+i\infty} z^{-s} \cot(\pi z) (\cot(\pi t z) - (\pi t z)^{-1}) dz. $$

Note that the function under the integral sign satisfies the relation $F(\bar{z}) = \overline{F(z)}$. Hence, $F(1/2+it) - F(1/2-it)$ is pure imaginary and thus $P_s$ defines a continuous function $[0, 1] \to \mathbb{R}$. For quadratic irrationals only a finite number of evaluations of $c_s$ is required since $\beta_j/\beta_{j-1}$ is periodic in $j$. Rivoal proved [4, (1.8)] that for $s$ an odd integer, $\pi^{-s}tc_s(t)$ is a polynomial of degree $s+1$, for instance $c_3(t) = \pi^3(t^3 - 5t + t^{-1})/90$. A calculation shows $\beta_j = (\sqrt{2}-1)^{j+1}$ for $x = \sqrt{2}-1$. This leads to the neat identities

$$ \sum_{n=1}^{\infty} \frac{\cot(\pi n \sqrt{2})}{n^s} = \frac{c_s(\sqrt{2}-1)}{1+(\sqrt{2}-1)^{s-1}} \quad \text{and} \quad \sum_{n=1}^{\infty} \frac{\cot(\pi n \sqrt{2})}{n^3} = \frac{\pi^3 \sqrt{2}}{360}. $$

Actually, such identities can also be derived from the functional equation

$$ \begin{aligned} & \Phi_{2m-1}(z) + z^{2m-2}\Phi_{2m-1}(1/z) \tag{2} \\ & = (-1)^m (2\pi)^{2m-1} \sum_{n=0}^{m} \frac{B_{2n}}{(2n)!} \frac{B_{2m-2n}}{(2m-2n)!} z^{2n-1} \quad (\Im(z) > 0, m \in \mathbb{Z}_{\ge 2}), \end{aligned} $$

where $B_k$ denotes the $k$th Bernoulli number. The origin of (2) can be traced back to a famous identity by Ramanujan involving $\zeta(2m+1)$. Similar identities for special values of Dirichlet series have been extensively studied in the literature: see for instance [12] and the references therein. We mention that in his first letter to Hardy [13, p. 25], Ramanujan claimed that

$$ \sum_{n \ge 1} \frac{\coth(n\pi)}{n^7} = \frac{19\pi^7}{56700} $$

which follows from (2) with $m = 4$ and $z = i$. Besides that, the letter contains similar formulas.
Theorem 1.3 is convenient for numerical evaluations, especially when $s$ is an odd integer and $\beta_j$ decreases rapidly. For instance, $x = 1 - 2/(e+1)$ has linearly growing partial quotients and truncating the series in Theorem 1.3 to $j \le 14$ we have

$$ \sum_{n=1}^{\infty} \frac{1}{n^3} \cot \left( \frac{2\pi n}{e+1} \right) = 0.386594538965623607320723960504631135387577\dots, $$

where all the displayed digits are correct. This is of course far beyond any direct computation with the original series.

Continuing the study of $\Phi_s(x)$, once we know that the series can be approximated by a simple series involving continued fractions as in Theorem 1.2, we can investigate the regularity of the difference. This problem is considered in §5, and we prove the continuity and a certain Lipschitz property for

$$ \Phi_s(x) - \pi^{-1}\zeta(s+1)\sum (-1)^j q_j^{-s}\beta_j, $$

see Theorem 5.1.

## 2. Auxiliary results on continued fractions

First of all, let us recall some basic facts about continued fractions.

When we approximate an irrational number by its convergents (1), the error is given by the formula [10, (7.43)]

$$ q_j x - p_j = \frac{(-1)^j}{q_{j+1} + \alpha_{j+1} q_j} \quad \text{with} \quad \alpha_j = [0; a_{j+1}, a_{j+2}, \dots]. \quad (3) $$

It is known that $q_j \ge F_{j+1}$ where $F_m$ denotes the $m$-th Fibonacci number, thus $\beta_j$ in (1) shows an exponential decay. To quantify Diophantine approximations, we find it convenient to introduce $\|t\|$ for the distance from $t$ to the closest integer and $\|t\|_*$ for its signed counterpart. In terms of the integral part $\lfloor t \rfloor$ they are given by

$$ \|t\| = \lfloor t - \lfloor t + 1/2 \rfloor \rfloor \quad \text{and} \quad \|t\|_* = t - \lfloor t + 1/2 \rfloor. $$

With this notation, we have $\beta_j = \|q_j x\|$ if $q_j > 1$, and $\beta_j = (-1)^j (q_j x - p_j)$. From (3) and the fact that $q_j$ increases with $j$, we deduce that

$$ (-1)^j q_{j+1} \|q_j x\|_* \in (1/2, 1). \quad (4) $$
In particular, $\beta_j$ is comparable to $q_{j+1}^{-1}$. It is also known that the $p_j/q_j$ are the best approximations of the second kind. This means that

$$ \|q_j x\| < \|nx\| \quad \text{for any } q_j < n < q_{j+1}. \qquad (5) $$

Using the relation $x = [a_0; a_1, \dots, a_j + \alpha_j]$, with $\alpha_j$ as in (3), it is possible to show $\alpha_j = (xq_j - p_j)/(p_{j-1} - xq_{j-1})$, which is valid even for $j = 0$ if we accept the convention $p_{-1}/q_{-1} = 1/0$. Note that $\alpha_0$ is the fractional part of $x$. This formula for $\alpha_j$ implies readily

$$ \beta_j = \prod_{k=0}^{j} \alpha_k \quad \text{for any } j \ge 0. $$

In the rest of this section we show some specific properties of the continued fractions for our research. When we say that $p/q$ and $P/Q$ are *consecutive convergents* we mean that $p/q = p_j/q_j$ and $P/Q = p_{j+1}/q_{j+1}$ for some $j$. On the other hand, we say that two real numbers are *J-coincident* if they share the convergents $p_j/q_j$ for $j \le J$. Equivalently, they share the partial quotients $a_0, \dots, a_J$.

The basic facts we need about J-coincident numbers are summarized in the next simple result.

**Lemma 2.1.** Given $x_0 \in \mathbb{R} \setminus \mathbb{Q}$, all the irrational numbers J-coincident with $x_0$ are exactly those lying in the interval with endpoints $p_J/q_J$ and $(p_J + p_{J-1})/(q_J + q_{J-1})$ of length $q_J^{-1}(q_J + q_{J-1})^{-1}$. If J is the largest integer such that real numbers $x$ and $x_0$ are J-coincident, then $x \to x_0$ if and only if $J \to +\infty$.

*Proof.* If $x_0 = [a_0; a_1, a_2, \dots]$, the irrational numbers J-coincident with $x_0$ share the partial quotients $\{a_j\}_{j=0}^J$. So they form the set

$$ I = \{[a_0; a_1, \dots, a_J, t] : t \in \mathbb{R}_{>1} \setminus \mathbb{Q}\} $$

which is an interval in $\mathbb{R} \setminus \mathbb{Q}$ with extremes corresponding to $t = \infty$ giving $p_J/q_J$, and to $t = 1$ giving $(p_J + p_{J-1})/(q_J + q_{J-1})$ [10, (7.42)]. Its length is obtained from $p_J q_{J-1} - q_J p_{J-1} = (-1)^{J-1}$ [10, (7.27)]. From $|x - x_0| \le q_J^{-2}$, we infer that $x \to x_0$ when $J \to \infty$, and the converse follows from the fact that the distance from $x_0$ to the endpoints of $I$ is larger than $(q_{J+1}q_{J+2})^{-1}$ (see for instance [14, Proposition 4]). $\square$
**Lemma 2.2.** Let $p/q$ and $P/Q$ be consecutive convergents of $x$. Then

$$Q\|nx\| \ge \frac{1}{2}|nP - m_nQ| \quad \text{for } q \le n < Q,$$

where $m_n$ is the nearest integer to $nx$.

*Proof.* We assume $x \ne P/Q$, otherwise the result is obvious. Using (3) with $q_j = Q$ and $q_{j+1} \ge q_j + q_{j-1}$, we get

$$\|nx\| = |nx - m_n| = \frac{1}{Q} |nP - m_nQ \pm \frac{n}{cQ + q}|$$

for some $c > 1$. Then the last fraction is less than 1. If $|nP - m_nQ| \ne 1$, the result is obvious. If $|nP - m_nQ| = 1$, it follows from (5) and (4). □

**Lemma 2.3.** Let $p/q$ and $P/Q$ be consecutive convergents of $x \ne P/Q$. Then for $1 < q \le n < Q$ with $q | n$, we have

$$n\|nx\|_{*}^{-1} = \pm q(Q + \alpha q),$$

where the sign is that of $x - p/q$, and $\alpha = [0; a_{j+2}, a_{j+3}, \dots]$ with $a_{j+2}, \dots$ the corresponding partial quotients of $x$ if it is exactly $j+1$-coincident with $P/Q$. The result also holds for $q = 1$ if $n \le Q/2$.

*Proof.* With this notation (3) reads $\pm(qx - p)^{-1} = Q + \alpha q$. The result follows from multiplying by $q/n$ because $qQ/n \ge 2$ implies $(nx - np/q)^{-1} = \|nx\|_{*}^{-1}$. □

**Lemma 2.4.** If $x_0$ and $x_1$ are J-coincident, then

$$|\alpha'_{j+1} - \alpha_{j+1}| < 4q_{j+1}^2 q_J^{-2} \quad \text{for } j < J,$$

where $\alpha_{j+1}$ and $\alpha'_{j+1}$ are as in (3) using the partial quotients of $x_0$ and $x_1$, respectively.

*Proof.* Defining $f(t) = (p_{j+1} - q_{j+1}x)/(xq_j - p_j)$, we have

$$f(x_1) = \alpha'_{j+1} \quad \text{and} \quad f(x_0) = \alpha_{j+1}.$$

Let $I$ be the interval of numbers $J$-coincident with $x_0$. Then the mean value theorem implies

$$|\alpha'_{j+1} - \alpha_{j+1}| \le |x_0 - x_1| \max_{t \in I} |tq_j - p_j|^{-2} < 4q_{j+1}^2 q_J^{-2},$$

where we have used (4) and $|I| \le q_J^{-2}$, see Lemma 2.1. □
**Lemma 2.5.** Let $x_0, x_1 \in \mathbb{R} \setminus \mathbb{Q}$. If $p/q$ and $P/Q$ are two common consecutive convergents of $x_0$ and $x_1$, then for any $q \le n < Q$ the nearest integer to $nx_0$ and the nearest integer to $nx_1$ coincide. In fact, this integer $m$ can be expressed by $m = \lfloor nP/Q + 1/2 \rfloor$, except in the case in which $n = Q/2$ (with $Q$ even) and $P/Q > p/q$ where we have $m = (P-1)/2$.

*Proof.* The general theory [10, (7.42)] (see also Lemma 2.1 above) assures that $x_0$ and $x_1$ belong to the open interval determined by $P/Q$ and $(P+p)/(Q+q)$. We are going to check that all the values in this interval multiplied by $n$ have the same nearest integer. If we take this as granted,

$$m = \lfloor (nP/Q + 1/2)^+ \rfloor \quad \text{or} \quad m = \lfloor (nP/Q + 1/2)^- \rfloor$$

depending on $P/Q$ is the lower or the upper extreme of the interval, or equivalently, whether $P/Q < p/q$ or $P/Q > p/q$. Using that $\lfloor x^+ \rfloor = \lfloor x \rfloor$ if $x \notin \mathbb{Z}$, and $\lfloor x^+ \rfloor = x$, $\lfloor x^- \rfloor = x-1$ if $x \notin \mathbb{Z}$, we deduce the last part.

For the first part, write $\eta = qP - pQ \in \{-1, 1\}$. We have

$$\eta x_0, \eta x_1 \in I = \left( \eta \frac{P+p}{Q+q}, \eta \frac{P}{Q} \right) \quad \text{with} \quad |I| = \frac{1}{Q(Q+q)}.$$

We may assume $x_0 > x_1$. If $nx_0$ and $nx_1$ have different closest integers, they must be $m$ and $m-1$ because $n(x_0-x_1) < 1/2$. Thus we have $m-nx_0 < 1/2$ and $nx_1 - (m-1) < 1/2$, which implies

$$\eta \frac{nP}{Q} - \frac{n}{Q(Q+q)} < \eta(m - \frac{1}{2}) < \eta \frac{nP}{Q}.$$

Multiplying by $2Q$, subtracting $2\eta nP$ and changing the sign, we obtain

$$0 < 2\eta nP - \eta(2m - 1)Q < \frac{2n}{Q + q}.$$

If $2 \nmid Q$ we get a contradiction because the last term is less than 2. If $2 \nmid Q$ the only possibility is

$$2\eta nP - \eta(2m - 1)Q = 1 \quad \text{with} \quad n > \frac{Q+q}{2}.$$

This implies $2\eta nP \equiv 1 \pmod{Q}$, and from $\eta qP - \eta pQ = 1$ we deduce $q \equiv 2n \pmod{Q}$. That gives $q = 2n$ for $n < Q/2$, and $q = 2n - Q$ for $n > Q/2$. This contradicts the condition $n > (Q+q)/2$. $\square$
### 3. Convergence and approximation

The core of the proof of Theorem 1.1 is an approximation result for certain model sums.

**Proposition 3.1.** Let $p/q$ and $P/Q$ be consecutive convergents of a real number $x$ and let $v(t) = \|t\|_*^{-1}$ or $v(t) = \|t\|^{-1}$. For $k \in \mathbb{Z}^+$, $s \in \mathbb{R}$ such that $s > k$, we have

$$ \sum_{q \le n < Q} n^{-s} v^k(nx) = \zeta(s+k) q^{-s} v^k(qx) + O(q^{k-s} \log(2q)) \quad (6) $$

where the $O$-constant only depends on $s$ and $k$. Moreover, if the sum is restricted to $n < N$ (with $N \le Q$), then the equality holds adding the error term $O(q^{k-1}Q^k N^{1-s-k})$.

We remark that the logarithmic factor in (6) is only needed for $k = 1$.

As a matter of fact, Kruse [15] studied sums of this kind for $v(t) = \|t\|^{-1}$ but we do not see how to deduce Proposition 3.1 from his results. Our argument seems simpler anyway. The sums for $v(t) = \|t\|^{-1}$ also appear in the classic work [16] (see also [17]).

*Proof.* Let $S_1, S_2$ and $S_3$ be the contribution to the sum in (6) of the values $n$, satisfying respectively $q \mid n, q \nmid n \le Q/2$ and $q \nmid n > Q/2$. Of course, for $q = 1$ we put $S_2 = S_3 = 0$ because the sums are empty.

By (3) with $q_j = q$,

$$ S_2 \ll \sum_{\substack{q \le n < Q/2 \\ q \nmid n}} n^{-s} \left\| \frac{np}{q} \right\|^{-k} \ll \log(2q) \sum_{l < Q/2q} (lq)^{-s} q^k \ll q^{k-s} \log(2q), $$

where we used $\sum \|np/q\|^{-k} \ll q^k \log(2q)$ on each block of length $q$, since $np$ defines a reduced residue system modulo $q$. By Lemma 2.2,

$$ S_3 \ll Q^{-s} \sum_{Q/2 < n < Q} Q^k |nP - m_n Q|^{-k} \ll Q^{k-s} \log Q \ll q^{k-s} \log(2q), $$

since $nP - m_nQ$ are distinct integers modulo $Q$ when $n \in (Q/2, Q)$. If $q \ne 1$, by Lemma 2.3 we have $nv(nx) = qv(qx)$ in $S_1$, and then

$$ q^s v^{-k}(qx) S_1 = q^{k+s} \sum_{l < Q/q} (lq)^{-s-k} = \zeta(s+k) + O((Q/q)^{1-s-k}). $$
Considering $\sum_{q \le n < N} n^{-s} v^k(nx)$ with $N \le Q$ only leads us to replace $Q/q$ by $N/q$ in the O-term. The result follows from $\|qx\|^{-k} \ll Q^k$.

To deal with the remaining case $q = 1$, we decompose the sum of the statement as $S'_1 + S'_3$, where $S'_1$ and $S'_3$ are the contributions of the terms with $n \le Q/2$ and $n > Q/2$, respectively. As Lemma 2.3 still applies to $q = 1$ when $n \le Q/2$, the sum $S'_1$ can be treated as $S_1$ while $S'_3$ is bounded the same way as $S_3$. $\square$

The case $s \le k$ of Theorem 1.1 follows from a simple argument.

**Lemma 3.2.** The series $S$ in Theorem 1.1 is nowhere convergent for $s \le k$.

*Proof.* Dirichlet's approximation theorem assures that $\|nx\|^{-1} > n$ infinitely often. Since for $\|nx\|$ small enough we have $|f(nx)| \gg \|nx\|^{-k}$ by periodicity, $n^{-s}|f(nx)|$ does not tend to 0 for $s \le k$. $\square$

of Theorem 1.1. By Lemma 3.2 we may assume $s > k$. If $S$ converges, then $q_j^{-s}f(q_jx) \to 0$. As $f(q_jx) \gg \|q_jx\|^{-k} = \beta_j^{-k}$ for $j$ large enough, we have $q_j^{-s}\beta_j^{-k} \to 0$ or equivalently $q_j^{-s}q_{j+1}^k \to 0$. The latter is obvious if $T$ converges. Thus, in both cases, the exponential decay of $\beta_j$ shows that $M_J = \sum_{j \ge J}(q_j^{-s}\beta_j^{-k+1} + q_j^{k-s}\log q_j) \to 0$ when $J \to \infty$. Using $f(t) = f(\|t\|_*) = c_k\|t\|_*^{-k} + O(\|t\|^{1-k})$, Proposition 3.1 gives

$$ \sum_{q_j \le n < q_{J+K}} n^{-s} f(nx) = \zeta(s+k) \sum_{J \le j < J+K} (-1)^{jk} q_j^{-s} \beta_j^{-k} + O(M_J). $$

Let $S_N = \sum_{1 \le n \le N} n^{-s} f(nx)$. If $S$ converges, this shows that $\{S_N\}_{N=1}^\infty$ defines a Cauchy sequence and thus $T$ converges. In the same way, if $T$ converges, then $S_{q_j}$ converge. By the last part of Proposition 3.1, if $q_j \le N < q_{j+1}$,

$$ S_N - S_{q_j} \ll q_j^{k-s} \log q_j + q_j^{k-1} q_{j+1}^k N^{1-s-k} \ll q_j^{k-s} \log q_j + q_j^{-s} q_{j+1}^k. $$

This is $o(1)$ because $T$ converges and $s > k$. Hence, the convergence of $S_{q_j}$ implies that of $S$. $\square$

Theorem 1.1 implies the convergence results in [4] in an extended range.

**Corollary 3.3.** The series $\sum_{n=1}^\infty n^{-s} \cot(\pi nx)$ converges if and only if $s > 1$ and $\sum_{j=0}^\infty (-1)^j q_j^{-s} q_{j+1}$ converges. The series $\sum_{n=1}^\infty n^{-s} \csc^2(\pi nx)$ converges if and only if $s > 2$ and $\sum_{j=0}^\infty q_j^{-s} q_{j+1}^2$ converges.
*Proof.* For the first series, use Theorem 1.1 with $f(t) = \cot(\pi t)$, $k = 1$ and note that $\beta_j^{-1} = q_{j+1} + O(q_j)$ by (3). For the second series, take $f(t) = csc^2(\pi t)$, $k = 2$ and note that $1/4 < q_{j+1}^2 \beta_j^2 < 1$ by (4). $\square$

of Theorem 1.2. Suppose that $S$ converges. Then Lemma 3.2 implies $s > 1$ and hence $\sum n^{-s} < \infty$. Thus, the difference

$$S - \sum_{m=1}^{k} c_m \sum_{n=1}^{\infty} n^{-s} \|nx\|_{*}^{-m}$$

is uniformly bounded in $x$. According to Proposition 3.1 the contribution to the innermost sum of $q_j \le n < q_{j+1}$ is $\zeta(s+m)(-1)^{jm}\beta_j^{-m} + O(q_j^{k-s})$. As $s > k$, the exponential growth of $q_j$ shows that $\sum q_j^{k-s}$ is uniformly bounded. $\square$

## 4. The functional equation approach

Let us consider the partial sums

$$\Phi_s(x, t) = \sum_{n \le t} \frac{\cot(\pi nx)}{n^s}$$

of $\Phi_s$. In the approximate functional equation for $\Phi_s(x, N)$ stated in [4, (4.5)], one should replace $\lfloor N\alpha \rfloor$ by $\lfloor (N+1/2)\alpha \rfloor$. Although this seems to be a minor difference, it is essential in the iteration process. Following the same steps as in [4], and including a forgotten pole in the application of the residue theorem we arrive at the correct functional equation. We repeat the argument and take the opportunity to improve some estimates. In this way we get a better error term. Let us state our version of the approximate functional equation for $\Phi_s(x, N)$. Besides, we refer the reader to [18] for approximate functional equations in the context of fractional integrals of modular forms.

**Proposition 4.1.** For $x \in ]0, 1[ \setminus \mathbb{Q}$, $N \in \mathbb{Z}^+$ and $s > 1$, we have

$$\Phi_s(x, N) + x^{s-1}\Phi_s(1/x, (N+1/2)x) = c_s(x) + R_s(x, N),$$

where $c_s$ is defined in Theorem 1.3 and

$$R_s(x, N) \ll (x^{-1} + N)N^{-s} \log(2N).$$
(cf. [4]). Consider

$$F_s(x, z) = \pi z^{-s} \cot(\pi z) \cot(\pi x z),$$

which is a meromorphic function of $z$ in $\mathbb{C} \setminus (-\infty, 0]$. Set $K = N + 1/2$. We evaluate the complex integral of $z \mapsto F_s(x, z)$ on the rectangular path $\mathcal{R}_N$ determined by the sides $C_1 = [1/2 - iN, K - iN]$, $C_2 = [K + iN, 1/2 + iN]$, $C_3 = [K - iN, K + iN]$ and $C_4 = [1/2 + iN, 1/2 - iN]$. The set of poles of $F_s(x, z)$ inside $\mathcal{R}_N$ is

$$\{k \in \mathbb{Z} : 1 \le k \le N\} \cup \{kx^{-1} : 1 \le k \le (N + 1/2)x\}.$$

By the residue theorem

$$\Phi_s(x, N) + x^{s-1}\Phi_s(1/x, (N + 1/2)x) = \frac{1}{2\pi i} \int_{\mathcal{R}_N} F_s(x, z) dz.$$

First, on the lines $C_1$ and $C_2$, we can use $|\cot(\pi z)| \le \coth(\pi |\Im(z)|) \ll 1 + |\Im(z)|^{-1}$. Hence $\cot(\pi z) \asymp 1$ and $\cot(\pi x z) \ll 1 + x^{-1}|z|^{-1}$. This gives for $j = 1, 2$,

$$\int_{C_j} F_s(x, z) dz \ll x^{-1}N^{-s}.$$

Now let us treat the contribution on $C_3$. We know that

$$|\cot(\pi(K + iy))| = |\tanh(\pi y)| \quad \text{and} \quad \frac{|v|}{1 + |v|} \asymp |\tanh v| \le |\tan(u + iv)|.$$

Then for $z = K + iy$ with $y \in [-N, N]$,

$$|F_s(x, z)| \le \frac{\pi \tanh(\pi|y|)}{N^s \tanh(\pi x|y|)} \asymp N^{-s} \frac{1 + x|y|}{x(1 + |y|)}.$$

Thus if $Nx \le 1$, we have

$$\int_{C_3} F_s(x, z) dz \ll x^{-1}N^{-s} \int_0^N \frac{dy}{1+y} \ll x^{-1}N^{-s} \log(2N),$$

and if $Nx \ge 1$,

$$\int_{C_3} F_s(x, z) dz \ll x^{-1}N^{-s} \left( \int_0^{1/x} \frac{dy}{1+y} + \int_{1/x}^N x dy \right) \ll N^{1-s} \log(2N).$$
Setting

$$ \mathcal{J}_s(x) = \frac{1}{2i\pi} \int_{1/2+i\infty}^{1/2-i\infty} F_s(x, z) dz, $$

we have

$$ \int_{C_4} F_s(x, z) dz - \mathcal{J}_s(x) \ll \int_{N}^{\infty} y^{-s} |\cot(\pi x(1/2 + iy))| dy \ll N^{1-s} + x^{-1}N^{-s}, $$

where the last bound follows from $\cot(\pi x(1/2 + iy)) \ll 1 + x^{-1}y^{-1}$. So far, we have proved that

$$ \Phi_s(x, N) + x^{s-1}\Phi_s(1/x, (N+1/2)x) = \mathcal{J}_s(x) + R_s(x, N) $$

for some $R_s(x, N)$ satisfying the bound in the statement. It remains to show $\mathcal{J}_s(x) = c_s(x)$. We can write $\mathcal{J}_s(x)$ as

$$ \frac{1}{2ix\pi} \int_{1/2+i\infty}^{1/2-i\infty} \frac{\cot(\pi z)}{z^{s+1}} dz + \frac{1}{2i} \int_{1/2+i\infty}^{1/2-i\infty} \frac{\cot(\pi z)}{z^s} \left( \cot(\pi x z) - \frac{1}{\pi x z} \right) dz. $$

The first term is $\pi^{-1}x^{-1}\zeta(s+1)$ by an application of the residue theorem in the right half plane $\Re(z) > 1/2$. On the other hand, the second term coincides with $P_s(x)$ in Theorem 1.3. $\square$

Now we consider the iteration of this functional equation.

**Lemma 4.2.** For $x \in \mathbb{R} \setminus \mathbb{Q}$, $J \in \mathbb{Z}_{\ge 0}$ and $N \in \mathbb{Z}^{+}$ we have

$$ \Phi_s(x, N) + (-1)^J \beta_J^{s-1} \Phi_s(\alpha_{J+1}, \varphi_{J+1}) = \sum_{j=0}^{J} (-1)^j \beta_{j-1}^{s-1} (c_s(\alpha_j) + R_s(\alpha_j, \varphi_j)), $$

where $\varphi_0 = N$ and $\varphi_j = \lfloor \alpha_{j-1}(\varphi_{j-1} + 1/2) \rfloor$ for $j \ge 1$.

*Proof.* By periodicity, we have $\Phi_s(x, N) = \Phi_s(\{x\}, N)$ for $x \in \mathbb{R} \setminus \mathbb{Q}$ with $\{x\}$ the fractional part of $x$. Note that $\{x\}$ coincides with $\alpha_0$ and also that $\{1/\alpha_0\} = \alpha_1$. Then Proposition 4.1 implies

$$ \Phi_s(x, N) + \alpha_0^{s-1} \Phi_s(\alpha_1, (N+1/2)\alpha_0) = c_s(\alpha_0) + R_s(\alpha_0, (N+1/2)\alpha_0). $$

This is the case $J = 0$. On the other hand, if we subtract the cases $J + 1$ and $J$, and divide by $(-1)^J \beta_J^{s-1}$, we get

$$ \alpha_{J+1}^{s-1} \Phi_s(\alpha_{J+2}, \varphi_{J+2}) + \Phi_s(\alpha_{J+1}, \varphi_{J+1}) = c_s(\alpha_{J+1}) + R_s(\alpha_{J+1}, \varphi_{J+1}), $$

which is Proposition 4.1 for $x = \alpha_{J+1}$ and $N = \varphi_{J+1}$. Therefore the result is established by induction. $\square$
The idea is to apply the formula with N and J large, and to show that the terms in Lemma 4.2 involving $R_s$ and $\Phi_s(\alpha_{J+1}, \varphi_{J+1})$ become negligible. This requires some control of the behavior of $\varphi_j$ for which we prove the following result.

**Proposition 4.3.** With the notation of Lemma 4.2, for $j \ge 0$

$$-5 < \varphi_j - \beta_{j-1}(N + 1/2) < 2.$$

*Proof.* Define $\gamma_0 = \gamma_1 = 0$ and $\gamma_{j+1} = \alpha_j(\gamma_j + 1)$ for $j \ge 1$. We are going to show that

$$\beta_{j-1}(N + 1/2) - \gamma_j - 1 < \varphi_j < \beta_{j-1}(N + 1/2) + \gamma_j/2. \quad (7)$$

We proceed by induction. For $j = 0$, this is trivial. For $j \ge 1$, using the upper bound as induction hypothesis, we get

$$\varphi_{j+1} < \alpha_j\left(\varphi_j + \frac{1}{2}\right) < \alpha_j\left(\beta_{j-1}\left(N + \frac{1}{2}\right) + \frac{1}{2}\left(1 + \gamma_j\right)\right) = \beta_j\left(N + \frac{1}{2}\right) + \frac{1}{2}\gamma_{j+1}.$$

In the same way, using the lower bound gives

$$\varphi_{j+1} > \alpha_j\left(\varphi_j + \frac{1}{2}\right) - 1 > \alpha_j\left(\beta_{j-1}\left(N + \frac{1}{2}\right) - \left(1 + \gamma_j\right)\right) - 1 = \beta_j\left(N + \frac{1}{2}\right) - \gamma_{j+1} - 1.$$

Setting $\alpha_j = \beta_j/\beta_{j-1}$ in the recurrence formula for $\gamma_j$, it is easy to see that

$$\gamma_j = \beta_{j-1} \sum_{k=0}^{j-2} \beta_k^{-1}.$$

Therefore, by (3) and $q_{k+2} \ge q_{k+1} + q_k$, we obtain

$$\gamma_j \le q_j^{-1} \sum_{k=0}^{j-2} (q_{k+1} + q_k) < q_j^{-1} \sum_{k=0}^{j} q_k.$$

We have $q_k 2^{\lfloor(j-k)/2\rfloor} \le q_j$ since $2q_{k-2} < q_k$. Then $\gamma_j < 4$, and (7) implies the result. $\square$

After these preparations, we are ready to prove the identity for $\Phi_s$.
of Theorem 1.3. Given $N \in \mathbb{Z}^+$, let $J$ be the smallest integer such that

$$ \beta_J(N + 1/2) < 6. \qquad (8) $$

This is well defined since $J \mapsto \beta_J$ decreases. In fact the decay is exponential and $J$ satisfies as a function of $N$

$$ J = O(\log(2N)) \quad \text{and} \quad \lim_{N \to \infty} J = \infty. $$

By (8) and Proposition 4.3, $\varphi_{J+1} < 8$. Then the term $\beta_J^{s-1}\Phi_s(\alpha_{J+1}, \varphi_{J+1})$ is composed of at most seven terms, corresponding to $n \le \varphi_{J+1}$. If $a_{J+2} \ge 8$, then $\alpha_{J+1} < 1/8$, and each term is bounded by

$$ \beta_J^{s-1} \alpha_{J+1}^{-1} = \beta_J^s \beta_{J+1}^{-1} \ll q_{J+1}^{-s} q_{J+2} $$

which tends to zero by the convergence conditions (Corollary 3.3). Now suppose $a_{J+2} < 8$ and denote by $d_j$ the denominator of $[0; a_{J+2}, \dots, a_j]$. By (4) and (5) applied to $x = \alpha_{J+1}$, there exists $j \ge J+2$ such that $d_j \le 7$ and for all $n \le 7$, $\|n\alpha_{J+1}\|^{-1} \ll d_{j+1} \ll a_{j+1}$. Then

$$ \beta_J^{s-1} \|n\alpha_{J+1}\|^{-1} \ll q_{J+1}^{1-s} q_{j+1} q_j^{-1} = o((q_j/q_{J+1})^{s-1}) = o(d_j^{s-1}) = o(1), $$

where we have used the convergence conditions again. It remains to prove

$$ \sum_{j=0}^{J} (-1)^j \beta_{j-1}^{s-1} R_s(\alpha_j, \varphi_j) \to 0 \quad \text{as } N \to \infty. $$

By (8), $6 \le \beta_{j-1}(N + 1/2)$ for $0 \le j \le J$, and the lower bound in Proposition 4.3 assures that $\varphi_j > \beta_{j-1}(N + 1/2)/6$ in this range. This and the bound for $R_s$ in Proposition 4.1 give

$$ \sum_{j=0}^{J} (-1)^j \beta_{j-1}^{s-1} R_s(\alpha_j, \varphi_j) \ll \sum_{j=0}^{J} \beta_{j-1}^{s-1} (\alpha_j^{-1} + \beta_{j-1} N) (\beta_{j-1} N)^{-s} \log (\beta_{j-1} N). $$

By the convergence condition, $\beta_{j-1}^s \beta_j^{-1} \asymp q_j^{-s} q_{j+1} \to 0$. Hence

$$ \alpha_j^{-1} = \beta_{j-1} \beta_j^{-1} = \eta_j \beta_{j-1}^{1-s} \text{ with } \eta_j \to 0. $$
Furthermore, $J = O(\log(2N))$ and $s > 1$. Consequently, the last sum above is

$$N^{-s} \sum_{j=0}^{J} (\eta_j \beta_{j-1}^{-s} + N) \log (\beta_{j-1} N) \ll N^{1-s} \log^2(2N) + \sum_{j=0}^{J} \eta_j (\beta_{j-1} N)^{-1}.$$

Separating the contributions of $j < J/2$ and $j \ge J/2$, and taking into account the exponential decay of $\beta_{j-1}N \gg 1$, one sees that the latter sum is

$$\ll (\beta_{\lfloor J/2 \rfloor} N)^{-1} + \max_{j \ge J/2} |\eta_j| = o(1).$$

This finishes the proof. $\square$

If we assume that $q_j^{-s} q_{j+1} \to 0$, then the previous proof gives us the identity $\Phi_s(x) = \sum_{j=0}^{\infty} (-1)^j \beta_{j-1}^{s-1} c_s(\beta_j/\beta_{j-1})$ when either one of both sides converges. The convergence of the right hand side is equivalent to that of $\sum_{j=0}^{\infty} (-1)^j q_j^{-s} q_{j+1}$, which implies $q_j^{-s} q_{j+1} \to 0$. On the other hand, if $\Phi_s(x)$ converges, then $\cot(\pi q_j x) = o(q_j^s)$, which implies $q_j^{-s} q_{j+1} \to 0$ because $\pi \cot(\pi nx) - \|nx\|_*^{-1}$ is uniformly bounded. In conclusion, we can assume $q_j^{-s} q_{j+1} \to 0$. Elaborating on this argument, we arrive at an independent proof of the first part of Corollary 3.3.

## 5. Continuity and Lipschitz regularity

Due to Corollary 3.3, we know that the convergence set of $\Phi_s$ is

$$C = \{x \in \mathbb{R} \setminus \mathbb{Q} : \sum (-1)^j q_j^{-s} q_{j+1} \text{ converges}\}.$$

On the other hand, Theorem 1.2 shows that $\pi^{-1}\zeta(s+1) \sum_{j=0}^{\infty} (-1)^j q_j^{-s} \beta_j^{-1}$ gives an approximation of $\Phi_s(x)$ when $x \in C$. A simple but somehow surprising fact is that the difference between the function and its approximation makes sense beyond the convergence set, and is even continuous, in contrast with the wild Diophantine behavior of $\Phi_s$.

Somewhat deeper is that if we restrict ourselves to the convergence set $C$, it is possible to show regularity in a local Lipschitz space. Recall that the Lipschitz space $\Lambda^\mu$ is composed of functions satisfying

$$|f(x) - f(y)| \le K|x - y|^\mu$$
for every $x$ and $y$, with $K$ an absolute constant. On the other hand, given $x_0$, the local Lipschitz space $\Lambda^\mu(x_0)$ consists of the functions satisfying the same inequality with $y = x_0$ but $K$ may depend on $x_0$.

Keeping in mind Theorem 1.3, another possibility, which we do not explore here, is to consider the regularity of the difference between $\Phi_s$ and $\sum(-1)^j \beta_{j-1}^s \beta_j^{-1}$.

**Theorem 5.1.** For $s > 1$, let

$$ \Delta(x) = \lim_{J \to \infty} \left( \sum_{n < q_J} \frac{\cot(\pi n x)}{n^s} - \frac{\zeta(s+1)}{\pi} \sum_{j=0}^{J-1} (-1)^j q_j^{-s} \beta_j \right). $$

Then $\Delta: \mathbb{R} \setminus \mathbb{Q} \to \mathbb{R}$ is continuous. Given $x_0 \in \mathcal{C}$ and $0 < \mu < \min(s - 1, 2)/(s^2 + s)$, we have $\Delta \in \Lambda^\mu(x_0)$.

The key aspect of the convergence set that allows to get a Lipschitz exponent is that when $\{q_j\}_{j=0}^\infty$ has a controlled growth, the separation between two numbers cannot be less than a certain function of the last common $q_j$.

**Lemma 5.2.** For $x_0 \in \mathcal{C}$ and $s > 1$, there exists $C = C(x_0, s) > 0$ such that

$$ q_J^{s(s+1)} |x_1 - x_0| > C $$

for any $J \in \mathbb{Z}^+$ and any $x_1 \in \mathbb{R}$ such that $x_0$ and $x_1$ are not $(J+1)$-coincident.

*Proof.* We may assume that $x_0$ and $x_1$ are $J$-coincident because $\{q_j\}_{j=0}^\infty$ is increasing. The result is trivial for $|x_1 - x_0| > C$, and choosing $C$ small enough, $|x_1 - x_0| \le C$ implies that $J$ is as large as we want by Lemma 2.1. In particular we can suppose $q_{j+1} < q_j^s$ for $j \ge J$ by the convergence of $\sum_{j=0}^\infty (-1)^j q_{j+1} q_j^{1-s}$.

Let us write $\gamma_j = [a_j; a_{j+1}, \dots]$ and $\tilde{\gamma}_j = [\tilde{a}_j; \tilde{a}_{j+1}, \dots]$, where $a_j$ and $\tilde{a}_j$ are the partial quotients of $x_0$ and $x_1$, respectively. By the recurrence formula for $q_j$, we can write (3) for $j = J$ as $q_J x - p_J = (-1)^J (\gamma_{J+1} q_J + q_{J-1})^{-1}$. Then

$$ q_J^2 |x_1 - x_0| = \frac{|\gamma_{J+1} - \tilde{\gamma}_{J+1}|}{(\gamma_{J+1} + q_{J-1}/q_J)(\tilde{\gamma}_{J+1} + q_{J-1}/q_J)} \ge \frac{|\gamma_{J+1} - \tilde{\gamma}_{J+1}|}{4a_{J+1}\tilde{a}_{J+1}}. \quad (9) $$

We have $a_{J+1} \ne \tilde{a}_{J+1}$ because $x_0$ and $x_1$ are not $(J+1)$-coincident, and $a_{J+1} < q_J^{s-1}$ because $q_{J+1} < q_J^s$. If $|a_{J+1} - \tilde{a}_{J+1}| \ne 1$, this and (9) ensures that

$$ q_J^2 |x_1 - x_0| \gg \frac{|a_{J+1} - \tilde{a}_{J+1}|}{a_{J+1} \tilde{a}_{J+1}} \gg \frac{1}{a_{J+1}^2} \ge q_J^{2-2s}, $$
which is stronger than the stated result.

The remaining cases $a_{J+1} - \tilde{a}_{J+1} = \pm 1$ are symmetric. We focus on the case $a_{J+1} - \tilde{a}_{J+1} = -1$, the positive sign case follows by replacing $a_{J+1}$ by $\tilde{a}_{J+1}$ and $\gamma_{J+1}$ by $\tilde{\gamma}_{J+1}$. We have

$$ \gamma_{J+1} = [a_{J+1}; a_{J+2}, \dots] \quad \text{and} \quad \tilde{\gamma}_{J+1} = [a_{J+1} + 1; \dots]. $$

If $a_{J+2} \neq 1$, then $|\gamma_{J+1} - \tilde{\gamma}_{J+1}| \gg 1$ and $q_J^2|x_1 - x_0| \gg a_{J+1}^{-2} \ge q_J^{2-2s}$ as before. On the other hand, if $a_{J+2} = 1$,

$$ \tilde{\gamma}_{J+1} - \gamma_{J+1} > a_{J+1} + 1 - \left(a_{J+1} + \frac{1}{1 + a_{J+3}^{-1}}\right) > \frac{1}{2a_{J+3}} > \frac{q_{J+2}}{2q_{J+3}}. $$

Substituting in (9), we obtain

$$ q_J^2|x_1 - x_0| \gg \frac{q_{J+2}/q_{J+3}}{(q_{J+1}/q_J)^2} \gg \frac{q_{J+2}^{1-s}}{q_J^{2s-2}}, $$

where we have used $q_{J+1} < q_J^s$ for $j = J$ and $j = J + 2$. Finally, the result follows by using $q_{J+2} = q_{J+1} + q_J < 2q_{J+1} < 2q_J^s$. $\square$

The next auxiliary result essentially allows us to pass from $\pi \cot(\pi t)$ to $\|t\|_*^{-1}$.

**Lemma 5.3.** Let $s > 1$ and suppose that $u : [-1/2, 1/2] \to \mathbb{R}$ has a bounded derivative. Then $\delta(x) = \sum_{n=1}^{\infty} n^{-s} u(\|nx\|_*)$ is continuous at every $x_0 \in \mathbb{R} \setminus \mathbb{Q}$. For every $x_0 \in \mathbb{C}$, we have $\delta \in \Lambda^{\mu_0}(x_0)$ with $\mu_0 = (s-1)/(s^2+s)$.

*Proof.* The series is normally convergent because $s > 1$ and $u(\|nx\|_*)$ is bounded. Thus the convergence is uniform, and the first part of the result follows because the partial sums are continuous functions $\mathbb{R} \setminus \mathbb{Q} \to \mathbb{R}$.

For the second part, given $x$ close to $x_0$, let $J$ be such that they are $J$-coincident but not $(J+1)$-coincident. By Lemma 2.5, $\|nx\|_* - \|nx_0\|_* = n(x - x_0)$ for $n < q_J$. Then by the mean value theorem,

$$ \delta(x) - \delta(x_0) \ll \sum_{n<q_J} \frac{n(x - x_0)}{n^s} + \sum_{n \ge q_J} \frac{1}{n^s} \ll (\log q_J + q_J^{2-s})|x - x_0| + q_J^{1-s}. $$

Lemma 5.2 proves $q_J^{1-s} = O(|x - x_0|^{\mu_0})$ and the other term is negligible because by Lemma 2.1, $q_J < |x - x_0|^{-1/2}$. Then for $1 < s < 2$ we have that $q_J^{2-s}|x - x_0|$ contributes $O(|x - x_0|^{\mu_0})$ and $s/2 > \mu_0$. $\square$
Our last auxiliary result controls the variation of $\|nx\|_*^{-1}$ when evaluated at J-coincident numbers.

**Lemma 5.4.** Let $x_0 \in \mathbb{R} \setminus \mathbb{Q}$. Define $D_n(x) = \|nx\|_*^{-1} - \|nx_0\|_*^{-1}$ for any $x \in \mathbb{R} \setminus \mathbb{Q}$ which is J-coincident with $x_0$, and $r_j(n) = np_{j+1} - q_{j+1}m$ with $m$ as in Lemma 2.5 for $P/Q = p_{j+1}/q_{j+1}$. Then, for every integer $n$ satisfying $q_j \le n < q_{j+1}$ for some $1 < j < J$, we have

$$|D_n(x)| < \frac{(4q_j q_{j+1})^2}{nq_j^2} \quad \text{if } q_j \nmid n \quad \text{and} \quad |D_n(x)| < \frac{4nq_{j+1}^2}{r_j^2(n)} |x - x_0| \quad \text{if } q_j \nmid n.$$

*Proof.* If $q_j$ divides $n$, then by Lemma 2.3 (note that $j > 1$ assures that $q_j > 1$) and Lemma 2.4,

$$n|D_n(x)| = q_j^2|\alpha_{j+1}' - \alpha_{j+1}| < 4q_j^2 q_{j+1}^2 q_J^{-2}$$

which is the first bound.

Let us consider now the case $q_j \nmid n$. By Lemma 2.2, $q_{j+1}\|nx\| > |r_j(n)|/2$. Hence, substituting $\|nx\|_* = nx - m$ in the definition of $D_n(x)$,

$$|D_n(x)| = \frac{n|x_0 - x|}{\|nx_0\|\|nx\|} < \frac{4nq_{j+1}^2}{r_j^2(n)} |x - x_0|,$$

and this finishes the proof. □

*of Theorem 5.1.* By Lemma 5.3 applied to $u(t) = \pi \cot(\pi t) - t^{-1}$, it is sufficient to prove the result for $V = \pi\Delta - \delta$ because $\mu_0 \ge \mu$. We have

$$V = \lim_{J \to \infty} V_J \quad \text{with} \quad V_J(x) = \sum_{n<q_J} \frac{\|nx\|_*^{-1}}{n^s} - \zeta(s+1) \sum_{j<J} (-1)^j q_j^{-s} \beta_j.$$

Given $J$ and $x_0 \in \mathbb{R} \setminus \mathbb{Q}$, for $x \in \mathbb{R} \setminus \mathbb{Q}$ close enough to $x_0$ so that they are J-coincident, Proposition 3.1 implies that $|V(x) - V_J(x)|$ and $|V(x) - V_J(x)|$ are less than $Cq_J^{1-s}$ with $C$ only depending on $s$. Then

$$|V(x) - V(x_0)| \le |V_J(x) - V_J(x_0)| + Cq_J^{1-s}. \quad (10)$$

The finite sum $V_J$ is obviously continuous as a function $\mathbb{R} \setminus \mathbb{Q} \to \mathbb{R}$. Thus we have $V_J(x) - V_J(x_0) \to 0$ as $x \to x_0$. Choosing $J$ sufficiently large, we get $V(x) - V(x_0) \to 0$ and this concludes the proof of the first part of the result.
To prove $V \in \Lambda^\mu(x_0)$, consider for each $x \neq x_0$ close enough to $x_0 \in \mathcal{C}$ the integer $J = J(x)$ such that $x_0$ and $x$ are coincident but not $(J+1)$-coincident. As $x_0 \in \mathcal{C}$ we mat assume $J > J_0 > 1$, where $J_0$ is such that $q_j^s > q_{j+1}$ for every $j \ge J_0$. By Lemma 5.2, $q_j^{1-s} \ll |x-x_0|^{(s-1)/(s^2+s)}$ and this exponent supersedes $\mu$. Then by (10) we have to prove that $V_J(x)-V_J(x_0) = O(|x-x_0|^\mu)$ uniformly in $x$ and consequently in $J$. We write

$$V_J(x) - V_J(x_0) = L(x) + W_1(x) + W_2(x)$$

with $L \in \Lambda^1(x_0)$ taking care of the terms $0 \le j < J_0$, and where

$$W_1(x) = \sum_{j=J_0}^{J-1} \left( \sum_{\substack{q_j \le n < q_{j+1} \\ q_j | n}} \frac{D_n(x)}{n^s} - \frac{\zeta(s+1)}{q_j^s} D_{q_j}(x) \right)$$

and

$$W_2(x) = \sum_{j=J_0}^{J-1} \sum_{\substack{q_j \le n < q_{j+1} \\ q_j \nmid n}} \frac{D_n(x)}{n^s}.$$

Here $D_n$ is as in Proposition 5.4. Our goal is to show

$$W_1(x) = O(|x - x_0|^\mu) \quad \text{and} \quad W_2(x) = O(|x - x_0|^\mu) \quad (11)$$

with $O$-constants not depending on $x$.

By Lemma 2.3, $D_n(x) = n^{-1}q_j D_{q_j}(x)$ in the innermost sum of $W_1(x)$. Then, by Lemma 5.4,

$$W_1(x) = \sum_{j=J_0}^{J-1} \frac{D_{q_j}(x)}{q_j^s} \sum_{k \ge q_{j+1}/q_j} k^{-s-1} \ll \sum_{j=J_0}^{J-1} \frac{q_{j+1}^2 q_j^{1-s}}{q_j^2} \left(\frac{q_{j+1}}{q_j}\right)^{-s} = \sum_{j=J_0}^{J-1} \frac{q_{j+1}^{2-s} q_j}{q_j^2}$$

with an absolute constant. This is $O(q_J^{1-s})$, $O(q_J^{1-s} \log q_J)$ or $O(q_J^{-2})$ according to $s < 3$, $s = 3$ or $s > 3$ which we summarize as $O((\log q_J)q_J^{-\min(s-1,2)})$. Lemma 5.2 shows $q_J^{-1} = O(|x-x_0|^{1/(s^2+s)})$. By our hypothesis on $\mu$, we obtain the first bound in (11).

Proving the second bound of (11) follows similar lines. By Lemma 5.4,

$$\frac{W_2(x)}{|x - x_0|} \ll \sum_{j=J_0}^{J-1} \sum_{\substack{q_j \le n < q_{j+1}}} \frac{q_{j+1}^2}{n^{s-1} r_j^2(n)} \ll \sum_{j=J_0}^{J-1} \frac{q_{j+1}^2}{q_j^{s-1}} \sum_{\substack{q_j \le n < q_{j+1}}} \frac{1}{r_j^2(n)}.$$
As $r_j(n) \equiv np_{j+1} (q_{j+1})$, the $r_j(n)$ take distinct integer values. Therefore the last sum is uniformly bounded. Thus, recalling $q_j^s > q_{j+1}$,

$$W_2(x) \ll |x - x_0| \sum_{j=J_0}^{J-1} \frac{q_{j+1}^2}{q_{j+1}^{1-1/s}} \ll |x - x_0| q_J^{1+1/s}.$$

By Lemma 2.1, $q_J^2|x - x_0| < 1$. Hence $|x - x_0|q_J^{1+1/s} \ll |x - x_0|^{(s-1)/(2s)}$. Now (11) follows from $(s-1)/(2s) > \mu_0 \ge \mu$. □

## References

[1] G. F. B. Riemann, Œuvres mathématiques de Riemann, Traduites de l'allemand par L. Laugel, avec une préface de C. Hermite et un discours de F. Klein. Nouveau tirage, Librairie Scientifique et Technique Albert Blanchard, Paris, 1968.

[2] G. H. Hardy, J. E. Littlewood, Some problems of diophantine approximation: The analytic character of the sum of a Dirichlet's series considered by Hecke, Abh. Math. Sem. Univ. Hamburg 3 (1) (1924) 57-68. doi:10.1007/BF02954616.
URL https://doi.org/10.1007/BF02954616

[3] M. Balazard, B. Martin, Sur certaines équations fonctionnelles approchées, liées à la transformation de Gauss, Aequationes Math. 93 (3) (2019) 563-585. doi:10.1007/s00010-018-0594-z.
URL https://doi.org/10.1007/s00010-018-0594-z

[4] T. Rivoal, On the convergence of Diophantine Dirichlet series, Proc. Edinb. Math. Soc. (2) 55 (2) (2012) 513-541. doi:10.1017/S0013091510001069.
URL https://doi.org/10.1017/S0013091510001069

[5] G. H. Hardy, J. E. Littlewood, Some problems of diophantine approximation I. the fractional part of $n^k\theta$, Acta Math. 37 (1) (1914) 155-191. doi:10.1007/BF02401833.
URL https://doi.org/10.1007/BF02401833

[6] G. H. Hardy, J. E. Littlewood, Some problems of diophantine approximation II. the trigonometrical series associated with the elliptic $\vartheta$-functions, Acta Math. 37 (1) (1914) 193-239. doi:10.1007/BF02401834.
URL https://doi.org/10.1007/BF02401834
[7] S. Jaffard, The spectrum of singularities of Riemann's function, Rev. Mat. Iberoamericana 12 (2) (1996) 441–460. doi:10.4171/RMI/203. URL https://doi.org/10.4171/RMI/203

[8] F. Chamizo, A. Ubis, Multifractal behavior of polynomial Fourier series, Adv. Math. 250 (2014) 1–34. doi:10.1016/j.aim.2013.09.015. URL https://doi.org/10.1016/j.aim.2013.09.015

[9] A. Y. Khinchin, Continued fractions, russian Edition, Dover Publications, Inc., Mineola, NY, 1997, with a preface by B. V. Gnedenko, Reprint of the 1964 translation.

[10] S. J. Miller, R. Takloo-Bighash, An invitation to modern number theory, Princeton University Press, Princeton, NJ, 2006, with a foreword by P. Sarnak.

[11] G. Tenenbaum, Introduction to analytic and probabilistic number theory, 3rd Edition, Vol. 163 of Graduate Studies in Mathematics, American Mathematical Society, Providence, RI, 2015, translated from the 2008 French edition by Patrick D. F. Ion.

[12] A. Straub, Special values of trigonometric Dirichlet series and Eichler integrals, Ramanujan J. 41 (1-3) (2016) 269–285. doi:10.1007/s11139-015-9698-4
URL https://doi.org/10.1007/s11139-015-9698-4

[13] B. C. Berndt, R. A. Rankin, Ramanujan, Vol. 9 of History of Mathematics, American Mathematical Society, Providence, RI; London Mathematical Society, London, 1995, letters and commentary.

[14] M. Balazard, B. Martin, Comportement local moyen de la fonction de Brjuno, Fund. Math. 218 (3) (2012) 193–224. doi:10.4064/fm218-3-1.
URL https://doi.org/10.4064/fm218-3-1

[15] A. H. Kruse, Estimates of $\sum_{k=1}^{N} k^{-s} \langle kx \rangle^{-t}$, Acta Arith 12 (1966/1967) 229–261. doi:10.4064/aa-12-3-229-261
URL https://doi.org/10.4064/aa-12-3-229-261

[16] G. H. Hardy, J. E. Littlewood, Some problems of Diophantine approximation: The lattice-points of a right-angled triangle. (Second memoir.), Abh. Math. Sem. Univ. Hamburg 1 (1) (1922) 211–248.
doi:10.1007/BF02940594.

URL https://doi.org/10.1007/BF02940594

[17] A. Walfisz, Über einige trigonometrische Summen, Math. Z. 33 (1) (1931) 564–601. doi:10.1007/BF01174370.

URL https://doi.org/10.1007/BF01174370

[18] C. Pastor, On the regularity of fractional integrals of modular forms, Trans. Amer. Math. Soc. 372 (2) (2019) 829–857. doi:10.1090/tran/7418.

URL https://doi.org/10.1090/tran/7418