###### Proof.

On the distribution of Sudler products and Birkhoff sums for the irrational
rotation

Bence Borda

Graz University of Technology

Steyrergasse 30, 8010 Graz, Austria

and

Alfréd Rényi Institute of Mathematics

Reáltanoda utca 13–15, 1053 Budapest, Hungary

Email<EMAIL_ADDRESS>
Keywords: toral translation, Diophantine approximation, quadratic irrational,

Fourier series, central limit theorem, temporal limit theorem

Mathematics Subject Classification (2020): 11K60, 37A50, 37E10

###### Abstract

We study the value distribution of the Sudler product
$\prod_{n=1}^{N}|2\sin(\pi n\alpha)|$ and the Diophantine product
$\prod_{n=1}^{N}(2e\|n\alpha\|)$ for various irrational $\alpha$, as $N$
ranges in a long interval of integers. At badly approximable irrationals these
products exhibit strong concentration around $N^{1/2}$, and at quadratic
irrationals they even satisfy a central limit theorem. In contrast, at almost
every $\alpha$ we observe an interesting anticoncentration phenomenon when the
typical and the extreme values are of the same order of magnitude. Our methods
are equally suited for the value distribution of Birkhoff sums
$\sum_{n=1}^{N}f(n\alpha)$ for circle rotations. Using Diophantine
approximation and Fourier analysis, we find the first and second moment for an
arbitrary periodic $f$ of bounded variation, and (almost) prove a conjecture
of Bromberg and Ulcigrai on the appropriate scaling factor in a so-called
temporal limit theorem.

##  1 Introduction

The so-called Sudler product

$P_{N}(\alpha):=\prod_{n=1}^{N}|2\sin(\pi n\alpha)|,\qquad\alpha\in\mathbb{R}$

was first studied by Erdős, Szekeres [21] and Sudler [34] in the context of
restricted partition functions. Sudler products later appeared in several
areas of mathematics including $q$-series [30], dynamical systems and KAM
theory [27], Zagier’s quantum modular forms [35] and hyperbolic knots in
algebraic topology [11]. They also play an important role in a counterexample
to the Baker–Gammel–Wills conjecture on Padé approximants [29] and the
solution of the Ten Martini Problem [5]. The ubiquity of the Sudler product is
explained by the large number of its different representations. While defined
as a trigonometric product, $P_{N}(\alpha)$ is also the modulus of the
$q$-product $(1-q)(1-q^{2})\cdots(1-q^{N})$ with $q=e^{2\pi i\alpha}$ on the
unit circle; in addition, its logarithm $\log
P_{N}(\alpha)=\sum_{n=1}^{N}f(n\alpha)$ is a Birkhoff sum for the irrational
rotation with $f(x)=\log|2\sin(\pi x)|$. For a general overview of Birkhoff
sums for toral translations we refer to the survey [16]; in particular, our
results fit into the category of Birkhoff sums with a logarithmic singularity.
The main goal of this paper is to study the value distribution of
$P_{N}(\alpha)$ as $N$ ranges over a long interval of integers.

It is not surprising that the asymptotics of $P_{N}(\alpha)$ as $N\to\infty$
depends sensitively on the Diophantine properties of the irrational $\alpha$.
Refining results of Lubinsky [30], in a series of recent papers Aistleitner,
Grepstad et al. [1, 2, 3, 22, 23, 24] gave precise estimates for the extreme
values of $P_{N}(\alpha)$ in terms of the continued fraction of $\alpha$.
Solving a long-standing open problem of Erdős and Szekeres, in [22] the golden
ratio was shown to satisfy

$1\ll P_{N}\bigg{(}\frac{1+\sqrt{5}}{2}\bigg{)}\ll N.$ (1)

The same holds for some (but not all) quadratic irrationals. Both the upper
and the lower bound in (1) are sharp; in fact, for an arbitrary irrational,
$P_{N}(\alpha)\ll 1$ and $P_{N}(\alpha)\gg N$ hold for infinitely many $N$.
The range of oscillations of $P_{N}(\alpha)$ thus span at least a factor of
$N$, with the golden ratio (and certain other irrationals with small partial
quotients) minimizing this range. In contrast, our first result shows that
$P_{N}(\alpha)$ concentrates around $N^{1/2}$ for the overwhelming majority of
integers $N$.

######  Theorem 1.

Let $\alpha$ be a badly approximable irrational. For any $M\geq 1$ and $t>0$,

$\frac{1}{M}\left|\left\\{1\leq N\leq M\,:\,N^{1/2}e^{-t\sqrt{\log 2N}}\leq
P_{N}(\alpha)\leq N^{1/2}e^{t\sqrt{\log
2N}}\right\\}\right|=1-O\left(t^{-2}\right)$

with an implied constant depending only on $\alpha$. In particular, for any
sequence $t_{N}\to\infty$ the set

$\left\\{N\in\mathbb{N}\,:\,N^{1/2}e^{-t_{N}\sqrt{\log N}}\leq
P_{N}(\alpha)\leq N^{1/2}e^{t_{N}\sqrt{\log N}}\right\\}$

has density $1$.

Recall that an irrational $\alpha$ is called badly approximable if
$\inf_{q\geq 1}q\|q\alpha\|>0$, where $\|\cdot\|$ denotes distance from the
nearest integer. What we actually show is that for any badly approximable
$\alpha$,

$\frac{1}{M}\sum_{N=1}^{M}\log P_{N}(\alpha)=\frac{1}{2}\log M+O(\log\log M)$
(2)

and

$\log M\ll\frac{1}{M}\sum_{N=1}^{M}\left(\log P_{N}(\alpha)-\frac{1}{2}\log
M\right)^{2}\ll\log M$ (3)

with implied constants depending only on $\alpha$. From a probabilistic point
of view the previous two formulas represent the expected value and the
variance of $\log P_{N}(\alpha)$ when $N$ is chosen randomly from $[1,M]$, and
Theorem 1 follows from the Chebyshev inequality. Lubinsky [30] proved that for
a badly approximable $\alpha$ the extreme values are

$\log M\ll\max_{1\leq N\leq M}|\log P_{N}(\alpha)|\ll\log M.$

Thus the square root of the variance is negligible compared to the extreme
values, explaining the higher concentration in Theorem 1 compared to (1).

The estimates for the variance and the extreme values in the previous two
formulas are optimal in the sense that both quantities can oscillate between
two different positive constants times $\log M$ for a suitable badly
approximable $\alpha$. For quadratic irrational $\alpha$, however, we can say
more:

$\frac{1}{M}\sum_{N=1}^{M}\left(\log P_{N}(\alpha)-\frac{1}{2}\log
M\right)^{2}=\sigma(\alpha)^{2}\log M+O((\log\log M)^{4})$ (4)

with an explicitly computable constant $\sigma(\alpha)>0$, and Theorem 1 can
be improved to the central limit theorem.

######  Theorem 2.

Let $\alpha$ be a quadratic irrational. For any $t\in\mathbb{R}$,

$\frac{1}{M}\bigg{|}\bigg{\\{}1\leq N\leq M\,:\,\frac{\log
P_{N}(\alpha)-\frac{1}{2}\log N}{\sigma(\alpha)\sqrt{\log N}}\leq
t\bigg{\\}}\bigg{|}\to\int_{-\infty}^{t}\frac{1}{\sqrt{2\pi}}e^{-x^{2}/2}\,\mathrm{d}x\quad\textrm{as
}M\to\infty.$

For a quadratic irrational $\alpha$ the extreme values also behave more
regularly:

$\max_{1\leq N\leq M}\log P_{N}(\alpha)\sim c(\alpha)\log
M\qquad\textrm{and}\qquad\min_{1\leq N\leq M}\log
P_{N}(\alpha)\sim(1-c(\alpha))\log M$

with some constant $c(\alpha)\geq 1$, see [1]. Here $c((1+\sqrt{5})/2)=1$ (in
which case the previous formula takes the stronger form (1)), but the precise
value of $c(\alpha)$ is not known in general.

Our approach is to consider $\log P_{N}(\alpha)=\sum_{n=1}^{N}f(n\alpha)$ as a
Birkhoff sum for the irrational rotation with $f(x)=\log|2\sin(\pi x)|$, and
to exploit the fact that $f(x)$ has the particularly simple Fourier series
expansion

$\log|2\sin(\pi x)|=-\sum_{m=1}^{\infty}\frac{\cos(2\pi mx)}{m}.$ (5)

The similar Birkhoff sum

$S_{N}(\alpha):=\sum_{n=1}^{N}\left(\\{n\alpha\\}-1/2\right),$

where $\\{\cdot\\}$ denotes fractional part, was studied in detail by Beck [7,
8, 9]. Note that $\log|2\sin(\pi x)|$ and $\pi(\\{x\\}-1/2)$ are harmonic
conjugates: they are the real and imaginary parts of $\log(1-z)$ (holomorphic
on $\mathbb{C}\backslash[1,\infty)$ and defined with the principal branch of
the logarithm) on the unit circle $z=e^{2\pi ix}$. Beck proved that for a
quadratic irrational $\alpha$ the expected value and the variance111In fact,
Beck proved the formula for the variance with error term $O(\sqrt{\log
M}\log\log M)$. Following the methods of this paper, this can be improved to
$O((\log\log M)^{4})$. of $S_{N}(\alpha)$ are

$\begin{split}\frac{1}{M}\sum_{N=1}^{M}S_{N}(\alpha)&=E(\alpha)\log M+O(1),\\\
\frac{1}{M}\sum_{N=1}^{M}\left(S_{N}(\alpha)-E(\alpha)\log
M\right)^{2}&=\frac{\sigma(\alpha)^{2}}{\pi^{2}}\log M+O\left((\log\log
M)^{4}\right),\end{split}$

and $S_{N}(\alpha)$ satisfies the central limit theorem.

######  Theorem 3 (Beck [7, 8, 9]).

Let $\alpha$ be a quadratic irrational. For any $t\in\mathbb{R}$,

$\frac{1}{M}\bigg{|}\bigg{\\{}1\leq N\leq
M\,:\,\frac{S_{N}(\alpha)-E(\alpha)\log N}{(\sigma(\alpha)/\pi)\sqrt{\log
N}}\leq
t\bigg{\\}}\bigg{|}\to\int_{-\infty}^{t}\frac{1}{\sqrt{2\pi}}e^{-x^{2}/2}\,\mathrm{d}x\quad\textrm{as
}M\to\infty.$

Here $E(\alpha)$ is defined the following way: given the continued fraction
expansion $\alpha=[a_{0};a_{1},a_{2},\dots]$ with convergents
$p_{k}/q_{k}=[a_{0};a_{1},\dots,a_{k}]$, we let

$E(\alpha)=\lim_{k\to\infty}\frac{1}{12\log
q_{k}}\sum_{\ell=1}^{k}(-1)^{\ell}a_{\ell}.$

Note that the limit exists by the periodicity of the partial quotients. For
instance, we have $E((1+\sqrt{5})/2)=0$ (since $(1+\sqrt{5})/2=[1;1,1,\dots]$
so there is perfect cancellation in the alternating sum), but
$E(\sqrt{3})=1/(12\log(2+\sqrt{3}))$ (since $\sqrt{3}=[1;1,2,1,2,\dots]$ and
$q_{k}\approx(2+\sqrt{3})^{k/2}$). In contrast, the corresponding constant
factor in the expected value of $\log P_{N}(\alpha)$ is always $1/2$, see (2).

The variance of $S_{N}(\alpha)$ and $\log P_{N}(\alpha)$, on the other hand,
involve the same constant $\sigma(\alpha)$; the extra factor of $\pi^{2}$ is
explained by the harmonic conjugate property mentioned above. The constant
$\sigma(\alpha)$ also appears in the variance of certain lattice point
counting problems [7] and in the $L^{2}$-discrepancy of irrational lattices
[12]. We refer to Beck [7, Chapter 3] for a way to compute $\sigma(\alpha)$
for general quadratic irrationals, based on deep arithmetic properties of the
real quadratic field $\mathbb{Q}(\alpha)$. For instance, we have

$\sigma\bigg{(}\frac{1+\sqrt{5}}{2}\bigg{)}^{2}=\frac{\pi^{2}}{60\sqrt{5}\log\frac{1+\sqrt{5}}{2}}\quad\textrm{and}\quad\sigma(\sqrt{3})^{2}=\frac{\pi^{2}}{24\sqrt{3}\log(2+\sqrt{3})}.$

The harmonic conjugate property also explains why $\log P_{N}(\alpha)$ and
$S_{N}(\alpha)$ are orthogonal in the sense that

$\frac{1}{M}\sum_{N=1}^{M}(\log P_{N}(\alpha))S_{N}(\alpha)=O\left((\log\log
M)^{4}\right).$

It seems likely that Theorems 2, 3 are in fact special cases of a two-
dimensional central limit theorem: we believe that for any quadratic
irrational $\alpha$ the vector

$\frac{1}{\sigma(\alpha)\sqrt{\log N}}\left(\log P_{N}(\alpha)-\frac{1}{2}\log
N,\pi(S_{N}(\alpha)-E(\alpha)\log N)\right),$

with $N$ chosen randomly from $[1,M]$, converges to the mean zero Gaussian
distribution with the $2\times 2$ identity matrix as covariance matrix.

Beck [7, p. 247] also announced a more general form of Theorem 3, stating that
the central limit theorem remains true (with suitable centering and scaling)
provided that the continued fraction $\alpha=[a_{0};a_{1},a_{2},\dots]$
satisfies $a_{k}/\sqrt{a_{1}^{2}+\cdots+a_{k}^{2}}\to 0$ as $k\to\infty$; he
calls this an analogue of the classical Lindeberg condition for the central
limit theorem in probability theory. A detailed proof has not been published
yet. For this reason we conjecture that our Theorem 2 in fact holds for all
badly approximable $\alpha$ with the same centering term $\frac{1}{2}\log N$,
but the scaling factor $\sigma(\alpha)\sqrt{\log N}$ replaced by the square
root of (3).

The distribution of the Birkhoff sum

$S_{N}(\alpha,f):=\sum_{n=1}^{N}f(n\alpha)$

has also been studied with more general $1$-periodic functions $f$. Beck [7,
8, 9] considered a quadratic irrational $\alpha$ and
$f(x)=I_{[a,b]}(\\{x\\})-(b-a)$, where $I_{[a,b]}$ is the indicator of an
interval $[a,b]\subset[0,1]$ with rational endpoints, and proved the same
central limit theorem as in Theorem 3 with $E(\alpha)$ and $\sigma(\alpha)$
replaced by explicitly computable constants depending on $\alpha$ and the
interval $[a,b]$. More recently Dolgopyat et al. [4, 13, 16, 17, 18, 19]
proved similar temporal limit theorems for the irrational rotation as well as
Anosov flows and horocycle flows; here “temporal” refers to the fact that the
time parameter $N$ is chosen randomly. The centering and scaling terms,
however, were not explicitly computed in some of these results. In particular,
generalizing Beck’s result Bromberg and Ulcigrai [13] considered a badly
approximable $\alpha$ and $f(x)=I_{[a,b]}(\\{x\\})-(b-a)$ with an interval
$[a,b]\subset[0,1]$ whose length $0<b-a<1$ is badly approximable with respect
to $\alpha$ in the sense that
$\inf_{q\in\mathbb{Z}\backslash\\{0\\}}|q|\cdot\|q\alpha-(b-a)\|>0$. They
proved that $(S_{N}(\alpha,f)-A_{M})/B_{M}$ converges to the standard Gaussian
distribution with the natural centering and scaling terms

$A_{M}=\frac{1}{M}\sum_{N=1}^{M}S_{N}(\alpha,f)\quad\textrm{and}\quad
B_{M}^{2}=\frac{1}{M}\sum_{N=1}^{M}(S_{N}(\alpha,f)-A_{M})^{2},$ (6)

and conjectured that $\log M\ll B_{M}^{2}\ll\log M$. In this paper we
basically settle their conjecture.

######  Theorem 4.

Let $\alpha$ be a badly approximable irrational, and let
$f(x)=I_{[a,b]}(\\{x\\})-(b-a)$ with an interval $[a,b]\subset[0,1]$ of length
$0<b-a<1$ such that $\inf_{q\in\mathbb{Z}\backslash\\{0\\}}|q|\cdot\|q\alpha-$
$k(b-a)\|>0$ for all $k\in\\{1,3,5,7,9\\}$. Then

$\log M\ll B_{M}^{2}\ll\log M$

with implied constants depending only on $\alpha$ and $(b-a)$.

Note that some condition on the length $(b-a)$ is necessary. Indeed, by a
classical result on bounded remainder intervals [25], we have
$|S_{N}(\alpha,f)|\ll 1$ if and only if $b-a\in\mathbb{Z}\alpha+\mathbb{Z}$;
in this case $B_{M}\ll 1$.

In fact, we prove much more: we find the expected value and the variance of
$S_{N}(\alpha,f)$ for all $1$-periodic functions of bounded variation, see
Proposition 13. As we will see, the upper bound $B_{M}^{2}\ll\log M$ remains
true for all $f$ and badly approximable $\alpha$; in contrast, the lower bound
for $B_{M}^{2}$ depends on a delicate interplay between the Fourier
coefficients of $f$ and the Diophantine properties of $\alpha$.

It would also be interesting to estimate higher moments of $\log
P_{N}(\alpha)$ and $S_{N}(\alpha,f)$; such results could improve the error
term $O(t^{-2})$ in Theorem 1, and could possibly be useful to find the rate
of convergence in the central limit theorem. Beck [7, 8, 9] proved that the
rate in the Kolmogorov metric in Theorem 3 is $\ll(\log M)^{-1/10}(\log\log
M)$, but this is likely not optimal. We conjecture that in all central limit
theorems mentioned above, the sharp rate is $\ll(\log M)^{-1/2}$.

In [1, 2] we studied the asymptotics of $\sum_{N=1}^{M}P_{N}(\alpha)^{t}$ with
$t>0$. The original motivation came from the fact that at $t=2$ this sum is
related to quantum modular forms in number theory [35] and to quantum
invariants of hyperbolic knots in algebraic topology [11]. From a
probabilistic point of view the same sum corresponds to the moment-generating
function of $\log P_{N}(\alpha)$ at the point $t$, which is closely related to
temporal large deviations. It would be interesting to see if the methods
recently developed for the Sudler product can be adapted to more general
Birkhoff sums $S_{N}(\alpha,f)$.

The rest of the paper is organized as follows. In Sections 2.1 and 2.2 we
discuss non-badly approximable irrationals such as Euler’s number $e$ and
almost every $\alpha$. In Section 2.3 we consider the Diophantine product
$\prod_{n=1}^{N}\|n\alpha\|$, and show that its behavior can be reduced to
that of $P_{N}(\alpha)$. In Section 3 we prove our results on Sudler products,
and in Section 4 we prove results on Birkhoff sums with functions of bounded
variation.

##  2 Further results

###  2.1 Euler’s number

Our methods generalize to other types of irrationals. As an illustration,
consider Euler’s number $e$. It has been known since Euler himself that the
continued fraction of $e$ is

$e=[2;1,2,1,1,4,1,\dots,1,2n,1,\dots].$

In particular, $e$ is only logarithmic factors away from being badly
approximable in the sense that $\inf_{q\geq 3}\frac{q\log q}{\log\log
q}\|qe\|>0$. We have a concentration result similar to the case of badly
approximable irrationals.

######  Theorem 5.

For any $M\geq 1$ and $t>0$,

$\begin{split}\frac{1}{M}\bigg{|}\bigg{\\{}1\leq N\leq
M\,:\,\exp\bigg{(}-t\left(\frac{\log 3N}{\log\log
3N}\right)^{\frac{3}{2}}\bigg{)}\leq
P_{N}(e)\leq\exp\bigg{(}t&\left(\frac{\log 3N}{\log\log
3N}\right)^{\frac{3}{2}}\bigg{)}\bigg{\\}}\bigg{|}\\\
&=1-O\left(t^{-2}\right)\end{split}$

with a universal implied constant. In particular, for any sequence
$t_{N}\to\infty$ the set

$\bigg{\\{}N\in\mathbb{N}\,:\,\exp\bigg{(}-t_{N}\left(\frac{\log N}{\log\log
N}\right)^{\frac{3}{2}}\bigg{)}\leq
P_{N}(e)\leq\exp\bigg{(}t_{N}\left(\frac{\log N}{\log\log
N}\right)^{\frac{3}{2}}\bigg{)}\bigg{\\}}$

has density $1$.

What we actually prove is that

$\left|\frac{1}{M}\sum_{N=1}^{M}\log P_{N}(e)\right|\ll\log M$ (7)

and

$\frac{1}{M}\sum_{N=1}^{M}\log^{2}P_{N}(e)=\frac{\pi^{2}}{540}\left(\frac{\log
M}{\log\log M}\right)^{3}\bigg{(}1+O\left(\frac{\log\log\log M}{\log\log
M}\right)\bigg{)}.$ (8)

Observe that now the expected value is negligible compared to the square root
of the variance, which explains why $P_{N}(e)$ oscillates around $1$ instead
of $N^{1/2}$. Since the continued fraction satisfies the Lindeberg-type
condition $a_{k}/\sqrt{a_{1}^{2}+\cdots+a_{k}^{2}}\to 0$ of Beck, we
conjecture that $\log P_{N}(e)$ satisfies the central limit theorem.

######  Conjecture.

For any $t\in\mathbb{R}$,

$\frac{1}{M}\Big{|}\Big{\\{}1\leq N\leq M\,:\,\frac{\log
P_{N}(e)}{\frac{\pi}{\sqrt{540}}\left(\frac{\log N}{\log\log
N}\right)^{3/2}}\leq
t\Big{\\}}\Big{|}\to\int_{-\infty}^{t}\frac{1}{\sqrt{2\pi}}e^{-x^{2}/2}\,\mathrm{d}x\quad\textrm{as
}M\to\infty.$

From general results in [1] it follows that once again the extreme values are
of larger order of magnitude than the square root of the variance:

$\begin{split}\max_{1\leq N\leq M}\log P_{N}(e)&=V\left(\frac{\log M}{\log\log
M}\right)^{2}\bigg{(}1+O\left(\frac{\log\log\log M}{\log\log
M}\right)\bigg{)},\\\ \min_{1\leq N\leq M}\log P_{N}(e)&=-V\left(\frac{\log
M}{\log\log M}\right)^{2}\bigg{(}1+O\left(\frac{\log\log\log M}{\log\log
M}\right)\bigg{)}\end{split}$ (9)

with

$V=\int_{0}^{5/6}\log|2\sin(\pi x)|\,\mathrm{d}x\approx 0.1615.$ (10)

The constant $V$ originally appeared in asymptotic results on Sudler products
in [1, 11] via a connection to algebraic topology: $4\pi V$ is the hyperbolic
volume of the complement of the figure-eight knot. A more elementary,
arithmetic interpretation of $V$ was given in [2].

Euler’s number is of course just an illustration, and the results of this
section apply (with suitable constant factors) to any irrational whose partial
quotients are given by a linear pseudopolynomial; that is, there exist
finitely many polynomials $p_{1}(x),\dots,p_{m}(x)$ of degree at most $1$,
with at least one of them of degree equal to $1$, and a positive integer
$k_{0}$ such that $a_{k}=p_{k\pmod{m}}(k)$ for all $k\geq k_{0}$. Such
irrationals include an infinite family of numbers related to $e$.

###  2.2 Almost every irrational

It is an unfortunate fact that the only “concrete” irrationals whose continued
fraction expansion is explicitly known are the quadratic irrationals and the
infinite family of irrationals related to $e$ mentioned in the previous
section. Very little is known about the continued fraction of other classical
irrationals such as $\pi$, $\sqrt[3]{2}$ or $\log 2$, although numerical
experiments suggest they exhibit random behavior. We do know, however, the
precise statistics of the partial quotients $a_{k}$ of almost every real
$\alpha$ in the sense of the Lebesgue measure.

The extreme values of $\log P_{N}(\alpha)$ for a.e. $\alpha$ are as follows.
Let $\varphi(x)$ be a nondecreasing, positive real-valued function on
$(0,\infty)$. If $\sum_{k=1}^{\infty}1/\varphi(k)<\infty$, then for a.e.
$\alpha$,

$|\log P_{N}(\alpha)|\leq\varphi(\log N)+O(\log N\log\log N)$ (11)

with an implied constant depending only on $\alpha$ and $\varphi$. If
$\sum_{k=1}^{\infty}1/\varphi(k)=\infty$, then for a.e. $\alpha$,

$\log P_{N}(\alpha)\geq\varphi(\log N)\quad\textrm{and}\quad\log
P_{N}(\alpha)\leq-\varphi(\log N)\quad\textrm{for infinitely many }N.$ (12)

Thus e.g. $|\log P_{N}(\alpha)|\ll\log N(\log\log N)^{1+\varepsilon}$ for a.e.
$\alpha$ with any $\varepsilon>0$, but this fails with $\varepsilon=0$. Such a
convergence/divergence criterion was first proved by Lubinsky [30], who in
fact explicitly constructed an exponentially increasing sequence of $N$’s
(each having a single nonzero digit in its Ostrowski expansion) satisfying the
second inequality in (12). For the sake of completeness, we explain in Section
3.3 how to derive (11) and (12) from general results in [1, 11]. In this paper
we improve the lower bound (12): we show that both inequalities hold on a set
of positive upper density.

######  Theorem 6.

Let $\varphi(x)$ be a nondecreasing, positive real-valued function on
$(0,\infty)$. If $\sum_{k=1}^{\infty}1/\varphi(k)=\infty$, then for a.e.
$\alpha$ the sets

$\left\\{N\in\mathbb{N}\,:\,\log P_{N}(\alpha)\geq\varphi(\log N)\right\\}$

and

$\left\\{N\in\mathbb{N}\,:\,\log P_{N}(\alpha)\leq-\varphi(\log N)\right\\}$

have upper density at least $\pi^{2}/(1440V^{2})\approx 0.2627$, where $V$ is
as in (10).

What we actually prove is that for a.e. $\alpha$,

$\sqrt{\frac{1}{M}\sum_{N=1}^{M}\log^{2}P_{N}(\alpha)}=\left(\frac{\pi}{\sqrt{720}V}+o(1)\right)\max_{1\leq
N\leq M}|\log P_{N}(\alpha)|\quad\textrm{for infinitely many }M.$ (13)

This means that the typical and the extreme oscillations of $\log
P_{N}(\alpha)$ are of the same order of magnitude; we call it an
anticoncentration result. We believe that the value $\pi/(\sqrt{720}V)$ is
sharp, i.e. for a.e. $\alpha$,

$\limsup_{M\to\infty}\sqrt{\frac{1}{M}\sum_{N=1}^{M}\log^{2}P_{N}(\alpha)}\left(\max_{1\leq
N\leq M}|\log P_{N}(\alpha)|\right)^{-1}=\frac{\pi}{\sqrt{720}V},$

but this remains open. On the other hand, $\pi^{2}/(1440V^{2})$ in Theorem 6
is likely not optimal; perhaps $\\{N\in\mathbb{N}\,:\,|\log
P_{N}(\alpha)|\geq\varphi(\log N)\\}$ even has upper density $1$. Note that
(13) immediately implies that $\log P_{N}(\alpha)$ does not satisfy the
central limit theorem (with any centering and scaling) for a.e. $\alpha$. See
Dolgopyat and Sarig [17, 18] for why the central limit theorem fails also for
$S_{N}(\alpha,f)$ with certain functions of bounded variation for a.e.
$\alpha$.

The convergence/divergence criterion (11), (12) can be restated as follows.
Under a suitable regularity condition on $\varphi(x)$ in the case of
convergence (e.g. $\varphi(x)\gg x\log x$), for a.e. $\alpha$,

$\limsup_{M\to\infty}\frac{\displaystyle\max_{1\leq N\leq M}\log
P_{N}(\alpha)}{\varphi(\log M)}=\left\\{\begin{array}[]{ll}0&\textrm{if
}\sum_{k=1}^{\infty}1/\varphi(k)<\infty,\\\ \infty&\textrm{if
}\sum_{k=1}^{\infty}1/\varphi(k)=\infty,\end{array}\right.$

and the same holds with $\max$ replaced by $-\min$. Our next result
establishes the liminf behavior of the same sequences.

######  Theorem 7.

For a.e. $\alpha$,

$\liminf_{M\to\infty}\frac{\displaystyle\max_{1\leq N\leq M}\log
P_{N}(\alpha)}{\log M\log\log M}=\frac{12V}{\pi^{2}}.$

The same holds with $\max$ replaced by $-\min$.

It easily follows that for a.e. $\alpha$ the set

$\left\\{N\in\mathbb{N}\,:\,|\log
P_{N}(\alpha)|\geq\left(\frac{12V}{\pi^{2}}+\varepsilon\right)\log N\log\log
N\right\\},\qquad\varepsilon>0$

has zero lower density. In particular, in Theorem 6 upper density cannot be
replaced by lower density.

In addition to the a.e. asymptotics, we also find the extreme values and the
variance of $\log P_{N}(\alpha)$ in a distributional sense. Since
$P_{N}(\alpha)$ is $1$-periodic in the variable $\alpha$, we will choose
$\alpha$ randomly from $[0,1]$. The main message of the next two results is
that typically $\max_{1\leq N\leq M}|\log P_{N}(\alpha)|$ is greater than
$(M^{-1}\sum_{N=1}^{M}\log^{2}P_{N}(\alpha))^{1/2}$ by a factor of $\log\log
M$. In particular, in (13) “for infinitely many $M$” cannot be replaced by
“for all $M$”.

######  Theorem 8.

We have

$\frac{\displaystyle\max_{1\leq N\leq M}\log P_{N}(\alpha)}{\log M\log\log
M}\to\frac{12V}{\pi^{2}}\qquad\textrm{in measure, as }M\to\infty.$

The same holds with $\max$ replaced by $-\min$.

Convergence in measure follows with respect to any probability measure $\mu$
on $[0,1]$ which is absolutely continuous with respect to the Lebesgue
measure. In contrast to the extreme values, the suitably normalized variance
converges to the standard Lévy distribution.

######  Theorem 9.

We have

$\frac{1}{M}\sum_{N=1}^{M}\log P_{N}(\alpha)=\frac{1}{2}\log
M+o\left(\sqrt{\log M}(\log\log M)^{2}\right)\qquad\textrm{in measure, as
}M\to\infty.$

Further, let $\mu$ be a probability measure on $[0,1]$ which is absolutely
continuous with respect to the Lebesgue measure. For any $t\geq 0$,

$\mu\bigg{(}\bigg{\\{}\alpha\in[0,1]\,:\,\frac{10\pi}{M\log^{2}M}\sum_{N=1}^{M}\left(\log
P_{N}(\alpha)-\frac{1}{2}\log M\right)^{2}\leq
t\bigg{\\}}\bigg{)}\to\int_{0}^{t}\frac{e^{-1/(2x)}}{\sqrt{2\pi}x^{3/2}}\,\mathrm{d}x$

as $M\to\infty$.

The different behavior of a.e. $\alpha$ compared to badly approximable
irrationals and Euler’s number — anticoncentration instead of concentration,
the failure of the central limit theorem and the difference between limsup and
liminf — might come as a surprise, considering that a.e. $\alpha$ is only
logarithmic factors away from being badly approximable; we have $\inf_{q\geq
1}\varphi(q)\|q\alpha\|>0$ if and only if
$\sum_{k=1}^{\infty}1/\varphi(k)<\infty$. The explanation lies in the
continued fraction $\alpha=[a_{0};a_{1},a_{2},\dots]$. As we will see,
$\max_{1\leq N<q_{k}}\log P_{N}(\alpha)$ is comparable to
$a_{1}+\cdots+a_{k}$, while the variance is comparable to
$a_{1}^{2}+\cdots+a_{k}^{2}$. For badly approximable irrationals and Euler’s
number each term in these sums is negligible compared to the whole sum; in
contrast, for a.e. $\alpha$ the maximal term can dominate. Our proofs rely on
asymptotic results on (trimmed) sums of partial quotients, see [6, 15, 31, 33]
and references therein.

###  2.3 A Diophantine product

The reader might wonder what happens if in the definition of the Sudler
product we replace $|\sin(\pi x)|$ by a similar function such as the distance
from the nearest integer function $\|x\|$. The behavior of the Diophantine
product $\prod_{n=1}^{N}\|n\alpha\|$ can actually be reduced to that of the
Sudler product.

######  Proposition 10.

Assume that $\inf_{q\geq 1}q^{c}\|q\alpha\|>0$ with some constant $1\leq c<2$.
Then

$P_{N}(\alpha)\ll\prod_{n=1}^{N}\left(2e\|n\alpha\|\right)\ll P_{N}(\alpha)$

with implied constants depending only on $\alpha$.

The Diophantine condition is satisfied by all irrationals mentioned above:
with $c=1$ by a badly approximable $\alpha$, and with $c=1+\varepsilon$ by
Euler’s number $e$ and by a.e. $\alpha$. All results for $P_{N}(\alpha)$
stated above including the concentration inequalities and the central limit
theorems thus have an analogue for the Diophantine product; for instance, (1)
reads

$1\ll\prod_{n=1}^{N}\bigg{(}2e\bigg{\|}n\frac{1+\sqrt{5}}{2}\bigg{\|}\bigg{)}\ll
N,$

where both the upper and the lower bound are sharp.

###### Proof of Proposition 10.

Consider the even $1$-periodic functions $f(x)=\log|2\sin(\pi x)|$ and
$g(x)=\log\|x\|+1+\log 2$. Note that $g$ has zero mean, and its Fourier
coefficients are easily computable using integration by parts:

$\begin{split}\int_{0}^{1}g(x)\cos(2\pi mx)\,\mathrm{d}x&=2\int_{0}^{1/2}(\log
x)\cos(2\pi mx)\,\mathrm{d}x\\\ &=-2\int_{0}^{1/2}\frac{\sin(2\pi mx)}{2\pi
mx}\,\mathrm{d}x\\\ &=-\frac{1}{\pi m}\int_{0}^{\pi m}\frac{\sin
x}{x}\,\mathrm{d}x\\\ &=-\frac{1}{2m}+c_{m}\end{split}$

with $c_{m}=1/(\pi m)\int_{\pi m}^{\infty}(\sin x)/x\,\mathrm{d}x\ll 1/m^{2}$.
In the last step we used $\int_{0}^{\infty}(\sin x)/x\,\mathrm{d}x=\pi/2$. By
sufficient smoothness, the Fourier series of $f(x)$ and $g(x)$ converge
pointwise at nonintegral reals, hence

$g(x)=\sum_{m=1}^{\infty}\left(-\frac{1}{m}+2c_{m}\right)\cos(2\pi
mx)=f(x)+\sum_{m=1}^{\infty}2c_{m}\cos(2\pi mx).$

Therefore

$\left|\sum_{n=1}^{N}g(n\alpha)-\sum_{n=1}^{N}f(n\alpha)\right|=\left|\sum_{m=1}^{\infty}c_{m}\left(1-\frac{\sin(\pi(2N+1)m\alpha)}{\sin(\pi
m\alpha)}\right)\right|\ll\sum_{m=1}^{\infty}\frac{1}{m^{2}\|m\alpha\|}.$

The last series is easily seen to converge under the assumption $\inf_{q\geq
1}|q|^{c}\|q\alpha\|>0$, $c<2$ (cf. [28, Chapter 2.3] and Lemma 12 below),
which proves the claim. ∎

##  3 Distribution of Sudler products

###  3.1 Expected value and variance

Our results on the expected value and the variance of Sudler products will be
based on the explicit formulas

$\log
P_{N}(\alpha)=\sum_{m=1}^{\infty}\frac{1}{2m}\left(1-\frac{\sin(\pi(2N+1)m\alpha)}{\sin(\pi
m\alpha)}\right)$ (14)

and

$\frac{1}{M}\sum_{N=0}^{M-1}\log
P_{N}(\alpha)=\sum_{m=1}^{\infty}\frac{1}{2m}\left(1-\frac{\sin^{2}(\pi
Mm\alpha)}{M\sin^{2}(\pi m\alpha)}\right),$ (15)

which follow directly from the Fourier series expansion (5) for all irrational
$\alpha$. We sum over $0\leq N\leq M-1$ instead of $1\leq N\leq M$ purely for
aesthetic reasons, and to emphasize the connection to the Dirichlet kernel
$\frac{\sin(\pi(2N+1)x)}{\sin(\pi x)}$ and the Fejér kernel
$\frac{\sin^{2}(\pi Mx)}{M\sin^{2}(\pi x)}$.

Let $\alpha=[a_{0};a_{1},a_{2},\dots]$ be irrational with convergents
$p_{k}/q_{k}=[a_{0};a_{1},\dots,a_{k}]$. For the sake of simplicity, we will
assume that the partial quotients increase at most polynomially fast; this
will cover all types of irrationals mentioned before. Obvious modifications of
the proof yield similar results for more general irrationals.

######  Proposition 11.

Assume that $a_{k}\leq ck^{d}$ for all $k\geq 1$ with some constants $c,d\geq
0$. For any $q_{k}\leq M<q_{k+1}$ we have

$\frac{1}{M}\sum_{N=0}^{M-1}\log P_{N}(\alpha)=\frac{1}{2}\log
M+O\left(\max_{|\ell-k|\ll\log k}a_{\ell}\cdot\log\log M\right)$ (16)

and

$\frac{1}{M}\sum_{N=0}^{M-1}\left(\log P_{N}(\alpha)-\frac{1}{2}\log
M\right)^{2}=\sum_{m=1}^{M}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}+O\left(\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot(\log\log M)^{4}\right)$ (17)

with implied constants depending only on $c$ and $d$.

It remains to analyze the Diophantine sum on the right hand side of (17),
which we do for various types of irrationals in the next two sections.
Following the methods of Beck [7, Proposition 3.1, p. 171], we first prove
several simple Diophantine sum estimates, and then give the proof of
Proposition 11.

######  Lemma 12.

Assume that $a_{k}\leq ck^{d}$ for all $k\geq 1$ with some constants $c,d\geq
0$. For any $q_{k}\leq M<q_{k+1}$,

$\begin{split}\sum_{1\leq m\leq M}\frac{1}{\|m\alpha\|}&\ll M\log^{d+1}M,\\\
\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{1}{m}\min\left\\{\frac{1}{M\|m\alpha\|^{2}},M\right\\}&\ll\max_{|\ell-k|\ll\log
k}a_{\ell}\cdot\log\log M,\\\ \sum_{1\leq m\leq
M\log^{2d+2}M}\frac{1}{m^{2}\|m\alpha\|^{2}}\min\left\\{\frac{1}{M\|2m\alpha\|},1\right\\}&\ll\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot\log\log M,\\\ \sum_{M<m\leq
M\log^{2d+2}M}\frac{1}{m^{2}\|m\alpha\|^{2}}&\ll\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot\log\log M.\end{split}$

Further,

$\begin{split}\sum_{\begin{subarray}{c}1\leq m_{1},m_{2}\leq M\log^{2d+2}M\\\
m_{1}\neq
m_{2}\end{subarray}}\frac{1}{m_{1}\|m_{1}\alpha\|m_{2}\|m_{2}\alpha\|}&\min\left\\{\frac{1}{M\|(m_{1}-m_{2})\alpha\|},1\right\\}\\\
&\ll\max_{|\ell-k|\ll\log k}a_{\ell}^{2}\cdot(\log\log M)^{4},\end{split}$

and the same holds with $m_{1}-m_{2}$ replaced by $m_{1}+m_{2}$.

###### Proof.

All five claims follow from a classical method based on the pigeonhole
principle, see [28, Chapter 2.3]. More specifically, let $\ell\geq 0$, and
consider the points $m\alpha\pmod{1}$, $q_{\ell}\leq m<q_{\ell+1}$. By the
best rational approximation property $\|m\alpha\|\geq\|q_{\ell}\alpha\|\geq
1/(2q_{\ell+1})$; in particular, none of these points lie in the open interval
$(-1/(2q_{\ell+1}),1/(2q_{\ell+1}))$, and each interval
$(j/(2q_{\ell+1}),(j+1)/(2q_{\ell+1}))$, $j\neq-1,0$ contains at most one
point.

The proofs of the first four claims are entirely analogous, therefore we only
give a detailed proof of the second claim. Note that $k\ll\log q_{k}\ll\log
M$. For any $\ell\geq 0$ with $q_{\ell}\leq M/\log^{2d}M$,

$\sum_{q_{\ell}\leq
m<q_{\ell+1}}\frac{1}{m}\min\left\\{\frac{1}{M\|m\alpha\|^{2}},M\right\\}\leq\frac{1}{q_{\ell}M}\sum_{q_{\ell}\leq
m<q_{\ell+1}}\frac{1}{\|m\alpha\|^{2}}\ll\frac{1}{q_{\ell}M}\sum_{j=1}^{\infty}\frac{1}{j^{2}/q_{\ell+1}^{2}}\ll\frac{a_{\ell+1}^{2}q_{\ell}}{M}.$

By the growth assumption on the partial quotients, this is
$\ll(q_{\ell}\log^{2d}M)/M$. Next, note that there are $\ll\log\log M$ indices
$\ell$ with $M/\log^{2d}M<q_{\ell}\leq M\log^{2d+2}M$, and all these indices
satisfy $|\ell-k|\ll\log\log M\ll\log k$. For any such $\ell$ we have

$\sum_{q_{\ell}\leq
m<q_{\ell+1}}\frac{1}{m}\min\left\\{\frac{1}{M\|m\alpha\|^{2}},M\right\\}\ll\frac{1}{q_{\ell}}\sum_{j=1}^{\infty}\min\left\\{\frac{1}{Mj^{2}/q_{\ell+1}^{2}},M\right\\}\ll\frac{q_{\ell+1}}{q_{\ell}}\ll
a_{\ell+1}.$

Therefore

$\begin{split}&\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{1}{m}\min\left\\{\frac{1}{M\|m\alpha\|^{2}},M\right\\}\\\
&\leq\Big{(}\sum_{\begin{subarray}{c}\ell\geq 0\\\ q_{\ell}\leq
M/\log^{2d}M\end{subarray}}+\sum_{\begin{subarray}{c}\ell\geq 0\\\
M/\log^{2d}M<q_{\ell}\leq
M\log^{2d+2}M\end{subarray}}\Big{)}\sum_{q_{\ell}\leq
m<q_{\ell+1}}\frac{1}{m}\min\left\\{\frac{1}{M\|m\alpha\|^{2}},M\right\\}\\\
&\ll\sum_{\begin{subarray}{c}\ell\geq 0\\\ q_{\ell}\leq
M/\log^{2d}M\end{subarray}}\frac{q_{\ell}\log^{2d}M}{M}+\sum_{\begin{subarray}{c}\ell\geq
0\\\ M/\log^{2d}M<q_{\ell}\leq M\log^{2d+2}M\end{subarray}}a_{\ell+1}\\\ &\ll
1+\max_{|\ell-k|\ll\log k}a_{\ell}\cdot\log\log M,\end{split}$

as claimed. In the last step we used the general fact
$q_{1}+q_{2}+\cdots+q_{\ell}\leq 3q_{\ell}$.

We now prove the final claim. Here the cases $m_{1}-m_{2}$ and $m_{1}+m_{2}$
are analogous, and we will only consider the $m_{1}-m_{2}$ case. Let

$R_{M}:=\sum_{\begin{subarray}{c}1\leq m_{1},m_{2}\leq M\log^{2d+2}M\\\
m_{1}\neq
m_{2}\end{subarray}}\frac{1}{m_{1}\|m_{1}\alpha\|m_{2}\|m_{2}\alpha\|}\min\left\\{\frac{1}{M\|(m_{1}-m_{2})\alpha\|},1\right\\}$

denote the sum to be estimated. Using similar methods as before, we deduce

$\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{1}{m\|m\alpha\|}\ll\sum_{\begin{subarray}{c}\ell\geq 0\\\
q_{\ell}\leq M\log^{2d+2}M\end{subarray}}\frac{1}{q_{\ell}}\sum_{1\leq j\leq
M\log^{2d+2}M}\frac{1}{j/q_{\ell+1}}\ll\log^{d+2}M.$

We will also need the fact that $\|m\alpha\|\gg 1/(m\log^{d}m)$ for all $m>1$,
which follows from the assumption on the growth rate of the partial quotients.

Let $S=\\{m\geq 1\,:\,m\|m\alpha\|\geq\log^{4d+5}M\\}$. We first observe that
the terms with $m_{1}\in S$ are negligible:

$\begin{split}\sum_{\begin{subarray}{c}1\leq m_{1},m_{2}\leq M\log^{2d+2}M\\\
m_{1}\neq m_{2}\\\ m_{1}\in
S\end{subarray}}&\frac{1}{m_{1}\|m_{1}\alpha\|m_{2}\|m_{2}\alpha\|}\min\left\\{\frac{1}{M\|(m_{1}-m_{2})\alpha\|},1\right\\}\\\
&\ll\frac{1}{\log^{4d+5}M}\sum_{1\leq m_{2}\leq
M\log^{2d+2}M}\frac{1}{m_{2}\|m_{2}\alpha\|}\sum_{1\leq m^{\prime}\leq
M\log^{2d+2}M}\frac{1}{M\|m^{\prime}\alpha\|}\\\ &\ll 1.\end{split}$

Note that instead of $m_{1}$ and $m_{2}$, we summed over
$m^{\prime}:=|m_{1}-m_{2}|$ and $m_{2}$. By symmetry, the same holds for the
terms with $m_{2}\in S$. We similarly see that the terms with
$\|(m_{1}-m_{2})\alpha\|\geq(\log^{2d+4}M)/M$ are also negligible:

$\begin{split}\sum_{\begin{subarray}{c}1\leq m_{1},m_{2}\leq M\log^{2d+2}M\\\
\|(m_{1}-m_{2})\alpha\|\geq(\log^{2d+4}M)/M\end{subarray}}&\frac{1}{m_{1}\|m_{1}\alpha\|m_{2}\|m_{2}\alpha\|}\min\left\\{\frac{1}{M\|(m_{1}-m_{2})\alpha\|},1\right\\}\\\
&\ll\frac{1}{\log^{2d+4}M}\sum_{1\leq m_{1}\leq
M\log^{2d+2}M}\frac{1}{m_{1}\|m_{1}\alpha\|}\sum_{1\leq m_{2}\leq
M\log^{2d+2}M}\frac{1}{m_{2}\|m_{2}\alpha\|}\\\ &\ll 1.\end{split}$

By the previous two formulas,

$R_{M}\ll 1+\sum_{\begin{subarray}{c}1\leq m_{1},m_{2}\leq M\log^{2d+2}M\\\
0<\|(m_{1}-m_{2})\alpha\|\leq(\log^{2d+4}M)/M\\\ m_{1},m_{2}\not\in
S\end{subarray}}\frac{1}{m_{1}\|m_{1}\alpha\|m_{2}\|m_{2}\alpha\|}.$

We now claim that in the remaining sum there is no term with $1\leq m_{1}\leq
M/\log^{8d+10}M$. Indeed, such an $m_{1}$ would satisfy
$\|m_{1}\alpha\|\gg(\log^{7d+10}M)/M$. On the other hand, the condition
$0<\|(m_{1}-m_{2})\alpha\|\leq(\log^{2d+4}M)/M$ forces $|m_{1}-m_{2}|\gg
M/\log^{3d+4}M$. This in turn implies $m_{2}\gg M/\log^{3d+4}M$ and, since
$m_{2}\not\in S$,

$\|m_{2}\alpha\|\leq\frac{\log^{4d+5}M}{m_{2}}\ll\frac{\log^{7d+9}M}{M}.$

In particular, for large enough $M$ we have, say, $\|m_{1}\alpha\|\geq
2\|m_{2}\alpha\|$ and hence

$\|(m_{1}-m_{2})\alpha\|\geq\|m_{1}\alpha\|-\|m_{2}\alpha\|\geq\frac{1}{2}\|m_{1}\alpha\|\gg\frac{\log^{7d+10}M}{M},$

giving a contradiction. By symmetry, there are no terms with $1\leq m_{2}\leq
M/\log^{8d+10}M$ either, therefore

$R_{M}\ll 1+\bigg{(}\sum_{\begin{subarray}{c}M/\log^{8d+10}M\leq m\leq
M\log^{2d+2}M\\\ m\not\in S\end{subarray}}\frac{1}{m\|m\alpha\|}\bigg{)}^{2}.$

To estimate the remaining sum, let $\ell\geq 0$ be such that the intervals
$[q_{\ell},q_{\ell+1})$ and $[M/\log^{8d+10}M,M\log^{2d+2}M]$ intersect. Note
that there are $\ll\log\log M$ such indices $\ell$, each of which satisfies
$|\ell-k|\ll\log k$. For any such $\ell$,

$\sum_{\begin{subarray}{c}q_{\ell}\leq m<q_{\ell+1}\\\ m\not\in
S\end{subarray}}\frac{1}{m\|m\alpha\|}\leq\frac{1}{q_{\ell}}\sum_{1\leq
j\ll\log^{5d+5}M}\frac{1}{j/q_{\ell+1}}\ll a_{\ell+1}\log\log M.$

Note that $m\not\in S$ implies that

$\|m\alpha\|\leq\frac{\log^{4d+5}M}{m}\leq\frac{\log^{4d+5}M}{q_{\ell}},$

explaining why we only sum over $j$ for which
$j/q_{\ell+1}\leq(\log^{4d+5}M)/q_{\ell}$, that is,
$j\ll(q_{\ell+1}/q_{\ell})\log^{4d+5}M\ll\log^{5d+5}M$. Hence

$\begin{split}\sum_{\begin{subarray}{c}M/\log^{8d+10}M\leq m\leq
M\log^{2d+2}M\\\ m\not\in
S\end{subarray}}\frac{1}{m\|m\alpha\|}&\ll\sum_{\begin{subarray}{c}\ell\geq
0\\\
[q_{\ell},q_{\ell+1})\cap[M/\log^{8d+10}M,M\log^{2d+2}M]\neq\emptyset\end{subarray}}a_{\ell+1}\log\log
M\\\ &\ll\max_{|\ell-k|\ll\log k}a_{\ell}\cdot(\log\log M)^{2},\end{split}$

and the claim follows. ∎

###### Proof of Proposition 11.

Fix $q_{k}\leq M<q_{k+1}$, and let $0\leq N\leq M-1$. We start by estimating
the tails in the explicit formulas (14) and (15). Summation by parts gives
that the tails of the Fourier series expansion (5) decay at the rate

$\left|\sum_{m>M\log^{2d+2}M}\frac{\cos(2\pi
mx)}{m}\right|\ll\frac{1}{(M\log^{2d+2}M)\|x\|}.$

Therefore

$\begin{split}\log P_{N}(\alpha)&=\sum_{n=1}^{N}\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{-\cos(2\pi
mn\alpha)}{m}+O\left(\frac{1}{M\log^{2d+2}M}\sum_{n=1}^{N}\frac{1}{\|n\alpha\|}\right)\\\
&=\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{1}{2m}\left(1-\frac{\sin(\pi(2N+1)m\alpha)}{\sin(\pi
m\alpha)}\right)+O\left(\frac{1}{\log^{d+1}M}\right),\end{split}$ (18)

and by averaging over $0\leq N\leq M-1$,

$\frac{1}{M}\sum_{N=0}^{M-1}\log P_{N}(\alpha)=\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{1}{2m}\left(1-\frac{\sin^{2}(\pi Mm\alpha)}{M\sin^{2}(\pi
m\alpha)}\right)+O\left(\frac{1}{\log^{d+1}M}\right).$ (19)

Note that in (18) we used a Diophantine sum estimate from Lemma 12.

Using the estimate

$\frac{\sin^{2}(\pi Mm\alpha)}{M\sin^{2}(\pi
m\alpha)}\leq\min\left\\{\frac{1}{M\|m\alpha\|^{2}},M\right\\}$

in (19), we deduce

$\frac{1}{M}\sum_{N=0}^{M-1}\log P_{N}(\alpha)=\frac{1}{2}\log
M+O\bigg{(}\log\log M+\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{1}{m}\min\left\\{\frac{1}{M\|m\alpha\|^{2}},M\right\\}\bigg{)}.$

Claim (16) thus follows from a Diophantine sum estimate in Lemma 12.

Next, we prove (17). Formula (18) yields

$\frac{1}{M}\sum_{N=0}^{M-1}\left(\log
P_{N}(\alpha)-H_{M}\right)^{2}=V_{M}+O\left(\frac{\sqrt{V_{M}}}{\log^{d+1}M}+\frac{1}{\log^{2d+2}M}\right)$
(20)

with

$H_{M}:=\sum_{1\leq m\leq M\log^{2d+2}M}\frac{1}{2m}=\frac{1}{2}\log
M+O(\log\log M)$

and

$V_{M}:=\frac{1}{M}\sum_{N=0}^{M-1}\left(\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{\sin(\pi(2N+1)m\alpha)}{2m\sin(\pi m\alpha)}\right)^{2}.$

Let us now expand the square in the previous formula. The diagonal terms
satisfy

$\begin{split}\frac{1}{M}\sum_{N=0}^{M}&\sum_{1\leq m\leq
M\log^{2d+2}M}\frac{\sin^{2}(\pi(2N+1)m\alpha)}{4m^{2}\sin^{2}(\pi
m\alpha)}\\\ &=\sum_{1\leq m\leq M\log^{2d+2}M}\frac{1}{4m^{2}\sin^{2}(\pi
m\alpha)}\left(\frac{1}{2}+O\left(\min\left\\{\frac{1}{M\|2m\alpha\|},1\right\\}\right)\right)\\\
&=\sum_{m=1}^{M}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}+O\left(\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot\log\log M\right),\end{split}$

where we used Lemma 12 and the fact that $1/\sin^{2}(\pi
x)=1/(\pi^{2}\|x\|^{2})+O(1)$. Lemma 12 also shows that the contribution of
the off-diagonal terms is negligible:

$\begin{split}\bigg{|}\frac{1}{M}\sum_{N=0}^{M-1}&\sum_{\begin{subarray}{c}1\leq
m_{1},m_{2}\leq M\log^{2d+2}M\\\ m_{1}\neq
m_{2}\end{subarray}}\frac{\sin(\pi(2N+1)m_{1}\alpha)\sin(\pi(2N+1)m_{2}\alpha)}{2m_{1}\sin(\pi
m_{1}\alpha)2m_{2}\sin(\pi m_{2}\alpha)}\bigg{|}\\\
\ll&\sum_{\begin{subarray}{c}1\leq m_{1},m_{2}\leq M\log^{2d+2}M\\\ m_{1}\neq
m_{2}\end{subarray}}\frac{1}{m_{1}\|m_{1}\alpha\|m_{2}\|m_{2}\alpha\|}\min\left\\{\frac{1}{M\|(m_{1}-m_{2})\alpha\|},1\right\\}\\\
&+\sum_{\begin{subarray}{c}1\leq m_{1},m_{2}\leq M\log^{2d+2}M\\\ m_{1}\neq
m_{2}\end{subarray}}\frac{1}{m_{1}\|m_{1}\alpha\|m_{2}\|m_{2}\alpha\|}\min\left\\{\frac{1}{M\|(m_{1}+m_{2})\alpha\|},1\right\\}\\\
&\ll\max_{|\ell-k|\ll\log k}a_{\ell}^{2}\cdot(\log\log M)^{4}.\end{split}$

By the previous two formulas,

$V_{M}=\sum_{m=1}^{M}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}+O\left(\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot(\log\log M)^{4}\right).$

In particular, $V_{M}\ll\log^{2d+1}M$ (cf. formula (25) below), hence the
error term on the right hand side of (20) is $O(1)$. The first claim (16)
shows that the error of replacing $H_{M}$ by $(1/2)\log M$ in (20) is also
negligible, and the claim (17) follows. ∎

###  3.2 Badly approximable irrationals

Fix a badly approximable $\alpha$. We first note that (2) and (3) follow
easily from Proposition 11. Indeed, the only missing piece is the observation

$\log M\ll\sum_{m=1}^{M}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}\ll\log M.$ (21)

Here the upper bound follows from the pigeonhole principle as in Lemma 12. To
see the lower bound, simply keep the convergent denominators $m=q_{k}\leq M$;
each such term contributes $\gg 1$, and there are $\gg\log M$ denominators
$q_{k}\leq M$.

###### Proof of Theorem 1.

From (2), (3) and the Chebyshev inequality we obtain

$\frac{1}{M}\left|\left\\{1\leq N\leq M\,:\,\left|\log
P_{N}(\alpha)-\frac{1}{2}\log M\right|\geq t\sqrt{\log
M}\right\\}\right|\ll\frac{1}{t^{2}}$

with an implied constant depending only on $\alpha$. It remains to replace
$\log M$ by $\log N$ in the previous formula. For any $M/\log^{2}M\leq N\leq
M$ we have $\log N=\log M+O(\log\log M)$, and so one readily checks that

$\frac{1}{M}\left|\left\\{1\leq N\leq M\,:\,\left|\log
P_{N}(\alpha)-\frac{1}{2}\log N\right|\geq t\sqrt{\log
N}\right\\}\right|\ll\frac{1}{\log^{2}M}+\frac{1}{t^{2}}.$

Note that $1/\log^{2}M$ is the “probability” of $1\leq N\leq M/\log^{2}M$. The
claim thus follows once $t\ll\log M$. However, the claim also trivially holds
for $t\gg\log M$, since by the result of Lubinsky, $|\log
P_{N}(\alpha)|\ll\log N$ for all $N$. ∎

Next, assume in addition that $\alpha$ is a quadratic irrational. Using deep
arithmetic properties of the real quadratic field $\mathbb{Q}(\alpha)$, Beck
[7, Proposition 3.2, p. 176] proved that in this case

$\sum_{m=1}^{M}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}=\sigma(\alpha)^{2}\log
M+O(1)$

with some constant $\sigma(\alpha)>0$ and an implied constant depending only
on $\alpha$. Formula (4) thus follows from Proposition 11.

###### Proof of Theorem 2.

We follow the “Fourier series approach” of Beck [7, Chapter 4.4]. There it is
shown that the Birkhoff sum $S_{N}(\alpha)=\sum_{n=1}^{N}(\\{n\alpha\\}-1/2)$
can be written in the form

$S_{N}(\alpha)-E(\alpha)\log M=\sum_{1\leq m\leq M\log
M}\frac{\cos(\pi(2N+1)m\alpha)}{2\pi m\sin(\pi m\alpha)}+O(\log\log M),\quad
1\leq N\leq M,$

and that the trigonometric sum on the right hand side satisfies the central
limit theorem of Theorem 3.

Using the explicit formula (14) and a tail estimate, we now have (cf. (18) in
the proof of Proposition 11)

$\log P_{N}(\alpha)-\frac{1}{2}\log M=-\sum_{1\leq m\leq M\log
M}\frac{\sin(\pi(2N+1)m\alpha)}{2m\sin(\pi m\alpha)}+O(\log\log M),\quad 1\leq
N\leq M.$

Beck’s proof of the central limit theorem works with cosine replaced by sine
in the numerator of the trigonometric sum, and the claim follows. ∎

###  3.3 Non-badly approximable irrationals

Fix an arbitrary irrational $\alpha=[a_{0};a_{1},a_{2},\dots]$ with
convergents $p_{k}/q_{k}=[a_{0};a_{1},\dots,a_{k}]$. Using a reciprocity
formula of Bettin and Drappeau [11], in our recent paper [1, Equation (14) and
Proposition 3] we observed that

$\max_{0\leq N<q_{k}}\log P_{N}(\alpha)=V(a_{1}+\cdots+a_{k})+O(A_{k}+(\log
A_{k})k)$ (22)

with $V$ as in (10), $A_{k}=\max_{1\leq\ell\leq k}a_{\ell}$ and a universal
implied constant. We also record a variant for future reference, see [1,
Equation (5) and Proposition 3]:

$\max_{0\leq N<q_{k}}\log
P_{N}(\alpha)=(V+o(1))(a_{1}+\cdots+a_{k})+O\left(\frac{\log
A_{k}}{a_{k+1}}\right)\quad\textrm{as }k\to\infty,$ (23)

provided that $(a_{1}+\cdots+a_{k})/k\to\infty$. We also proved [1,
Proposition 2] that for any $0\leq N<q_{k}$,

$\log P_{N}(\alpha)+\log P_{q_{k}-N-1}(\alpha)=\log q_{k}+O\left(\frac{\log
A_{k}}{a_{k+1}}\right)$ (24)

with a universal implied constant; in particular, the distribution of $\log
P_{N}(\alpha)$ when $N$ is chosen randomly from $[0,q_{k})$ is approximately
symmetric about the center $\frac{1}{2}\log q_{k}$. Concerning the variance,
the Diophantine sum in (17) has the evaluation [12]

$\sqrt{\sum_{1\leq
m<q_{k}}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}}=\frac{\pi}{\sqrt{720}}\sqrt{a_{1}^{2}+\cdots+a_{k}^{2}}+O(\sqrt{k})$
(25)

with a universal implied constant. Although formulas (22)–(25) hold for
arbitrary irrationals, all but (24) are useless for badly approximable ones;
indeed, in that case the main terms and the error terms are of the same order
of magnitude. Note also that (25) gives a wrong value of $\sigma(\alpha)$ for
quadratic irrationals. They give precise results, however, for certain non-
badly approximable irrationals.

Consider first Euler’s number $e$. Then (22) and (25) read

$\begin{split}\max_{0\leq N<q_{k}}\log P_{N}(e)&=\frac{V}{9}k^{2}+O(k\log
k),\\\ \sum_{1\leq
m<q_{k}}\frac{1}{8\pi^{2}m^{2}\|me\|^{2}}&=\frac{\pi^{2}}{14580}k^{3}+O(k^{2}).\end{split}$

Since $q_{k}$ increases at the rate $\prod_{\ell=1}^{k}a_{\ell}\leq
q_{k}\leq\prod_{\ell=1}^{k}(a_{\ell}+1)$, we have

$\log q_{k}=\frac{1}{3}k\log k+O(k).$

Relations (7), (8) and (9) now follow easily from the previous three formulas
and Proposition 11; for $\min_{1\leq N\leq M}\log P_{N}(e)$ use also (24).

###### Proof of Theorem 5.

Using (8) and the Chebyshev inequality, the proof is entirely analogous to
that of Theorem 1. ∎

###  3.4 Asymptotics almost everywhere

Let us recall the precise statistics of the partial quotients of almost every
irrational. Fix a nondecreasing positive real-valued function $\varphi(x)$ on
$(0,\infty)$. The two most fundamental properties are that for a.e. $\alpha$,

  1. (i)

the inequality $a_{k}\geq\varphi(k)$ has finitely many solutions
$k\in\mathbb{N}$ if and only if $\sum_{k=1}^{\infty}1/\varphi(k)<\infty$;

  2. (ii)

$\log q_{k}\sim\frac{\pi^{2}}{12\log 2}k$ as $k\to\infty$.

As for the sum of the partial quotients, a classical result of Khinchin [26]
states that

$\frac{a_{1}+\cdots+a_{k}}{k\log k}\to\frac{1}{\log 2}\qquad\textrm{in
measure.}$

The same asymptotics only holds a.e. if the sum is “trimmed”, i.e. the largest
term is removed. More precisely, Diamond and Vaaler [15] proved that for a.e.
$\alpha$,

$\frac{a_{1}+\cdots+a_{k}-\vartheta(\alpha,k)A_{k}}{k\log k}\to\frac{1}{\log
2}\quad\textrm{as }k\to\infty$ (26)

with some222Their proof actually gives that the same holds with
$\vartheta(\alpha,k)=1$, but we will not need this fact.
$0\leq\vartheta(\alpha,k)\leq 1$, where $A_{k}=\max_{1\leq\ell\leq k}a_{\ell}$
as before. In particular, the arithmetic mean of the partial quotients
diverges, and from (23) we immediately obtain that for a.e. $\alpha$,

$\max_{0\leq N<q_{k}}\log P_{N}(\alpha)=(V+o(1))A_{k}+O(k\log
k)\quad\textrm{as }k\to\infty$ (27)

with an implied constant depending on $\alpha$. By (24) we also have

$\min_{0\leq N<q_{k}}\log P_{N}(\alpha)=-(V+o(1))A_{k}+O(k\log
k)\quad\textrm{as }k\to\infty,$ (28)

and formulas (11), (12) follow.

###### Proof of Theorem 6.

We shall need a further result of Diamond and Vaaler [15, Lemma 2]. As a
simple corollary of the mixing property of the partial quotients, they
observed that given any $\varepsilon>0$, for a.e. $\alpha$ for all but
finitely many $k\in\mathbb{N}$ there is at most one integer $1\leq\ell\leq k$
with $a_{\ell}\geq k\log^{1/2+\varepsilon}k$.

Assume first, that $\varphi(k)\geq k\log k\log\log k$ for all $k$. By property
(i) above, for a.e. $\alpha$ there are infinitely many $k_{0}\in\mathbb{N}$
such that

$a_{k_{0}}\geq\varphi(k_{0})\geq k_{0}\log k_{0}\log\log k_{0}.$

For all but finitely many of these $k_{0}$ we now choose an integer
$k\in[k_{0},2k_{0}]$ as follows. First of all note that by the lemma of
Diamond and Vaaler, for all $1\leq\ell\leq 2k_{0}$, $\ell\neq k_{0}$ we have
$a_{\ell}\ll k_{0}\log^{1/2+\varepsilon}k_{0}$; in particular,
$A_{2k_{0}}=\max_{1\leq\ell\leq 2k_{0}}a_{\ell}=a_{k_{0}}$. Let us now
partition $[k_{0}+1,2k_{0}]$ into $\sim k_{0}/\log^{2}k_{0}$ subintervals
$I_{1},I_{2},\dots$, each of size $\sim\log^{2}k_{0}$. If $\max_{\ell\in
I_{j}}a_{\ell}\geq\log^{4}k_{0}$ for all $j$, then clearly

$a_{1}+\cdots+a_{2k_{0}}\geq a_{k_{0}}+\sum_{j}\log^{4}k_{0}\sim
A_{2k_{0}}+k_{0}\log^{2}k_{0},$

which contradicts (26). Therefore there exists a subinterval
$I_{j}\subset[k_{0}+1,2k_{0}]$ of size $\sim\log^{2}k_{0}$ such that
$\max_{\ell\in I_{j}}a_{\ell}\leq\log^{4}k_{0}$. Choose $k$ in the middle of
$I_{j}$. Note that the error term in Proposition 11 then satisfies

$\max_{|\ell-k|\ll\log k}a_{\ell}\leq\max_{\ell\in
I_{j}}a_{\ell}\ll\log^{4}k,$

therefore

$\frac{1}{q_{k}}\sum_{N=0}^{q_{k}-1}\left(\log P_{N}(\alpha)-\frac{1}{2}\log
q_{k}\right)^{2}=\sum_{m=1}^{q_{k}-1}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}+O(\log^{12}k).$

Using (26) once again, we obtain

$A_{k}\leq\sqrt{a_{1}^{2}+\cdots+a_{k}^{2}}\leq a_{1}+\cdots+a_{k}\leq
A_{k}+O(k\log k),$

hence (25) yields

$\begin{split}\frac{1}{q_{k}}\sum_{N=0}^{q_{k}-1}\log^{2}P_{N}(\alpha)&=\frac{1}{q_{k}}\sum_{N=0}^{q_{k}-1}\left(\log
P_{N}(\alpha)-\frac{1}{2}\log q_{k}\right)^{2}+O(\log^{2}q_{k})\\\
&=\frac{\pi^{2}}{720}A_{k}^{2}+O(A_{k}k\log k).\end{split}$

Since $A_{k}=A_{k_{0}}\gg k\log k\log\log k$, the previous formula together
with (27) and (28) show that (cf. (13))

$\sqrt{\frac{1}{q_{k}}\sum_{N=0}^{q_{k}-1}\log^{2}P_{N}(\alpha)}=\left(\frac{\pi}{\sqrt{720}V}+o(1)\right)\max_{0\leq
N<q_{k}}|\log P_{N}(\alpha)|\qquad\textrm{for infinitely many }k.$

Fix $\varepsilon>0$, and let $T_{k}=\max_{0\leq N<q_{k}}|\log P_{N}(\alpha)|$.
Splitting the sum according to whether $|\log P_{N}(\alpha)|\leq\varepsilon
T_{k}$ or not, we get

$\frac{1}{q_{k}}\sum_{N=0}^{q_{k}-1}\log^{2}P_{N}(\alpha)\leq\varepsilon^{2}T_{k}^{2}+\frac{1}{q_{k}}\left|\left\\{0\leq
N<q_{k}\,:\,|\log P_{N}(\alpha)|\geq\varepsilon
T_{k}\right\\}\right|T_{k}^{2}.$

The previous two formulas immediately yield

$\frac{1}{q_{k}}\left|\left\\{0\leq N<q_{k}\,:\,|\log
P_{N}(\alpha)|\geq\varepsilon
T_{k}\right\\}\right|\geq\frac{\pi^{2}}{720V^{2}}-\varepsilon^{2}-o(1)\qquad\textrm{for
infinitely many }k.$

Recall from (24) that the distribution of $\log P_{N}(\alpha)$ is
approximately symmetric about the negligible center $\frac{1}{2}\log q_{k}\ll
k=o(A_{k})$. By construction we also have $k_{0}\leq k\leq 2k_{0}$, and hence
$0\leq N<q_{k}$ implies $\log N\leq(\pi^{2}/(6\log 2)+o(1))k_{0}$. Therefore

$T_{k}=(V+o(1))A_{k}\geq(V+o(1))\varphi(k_{0})\geq\frac{1}{100}\varphi\left(\frac{\log
N}{100}\right),$

and we obtain

$\frac{1}{q_{k}}\left|\left\\{0\leq N<q_{k}\,:\,\log
P_{N}(\alpha)\geq\frac{\varepsilon}{100}\varphi\left(\frac{\log
N}{100}\right)\right\\}\right|\geq\frac{\pi^{2}}{1440V^{2}}-\frac{\varepsilon^{2}}{2}-o(1)$

and

$\frac{1}{q_{k}}\left|\left\\{0\leq N<q_{k}\,:\,\log
P_{N}(\alpha)\leq-\frac{\varepsilon}{100}\varphi\left(\frac{\log
N}{100}\right)\right\\}\right|\geq\frac{\pi^{2}}{1440V^{2}}-\frac{\varepsilon^{2}}{2}-o(1)$

for infinitely many $k$. Note that
$\varphi^{*}(x)=\frac{100}{\varepsilon}\varphi(100x)$ also satisfies
$\sum_{k=1}^{\infty}1/\varphi^{*}(k)=\infty$ and $\varphi^{*}(k)\geq k\log
k\log\log k$. Hence by repeating the argument with $\varphi^{*}$, we get that
for a.e. $\alpha$ the sets

$\left\\{N\in\mathbb{N}\,:\,\log P_{N}(\alpha)\geq\varphi(\log N)\right\\}$

and

$\left\\{N\in\mathbb{N}\,:\,\log P_{N}(\alpha)\leq-\varphi(\log N)\right\\}$

both have upper density at least $\pi^{2}/(1440V^{2})-\varepsilon^{2}/2$. Here
$\varepsilon>0$ is arbitrary, and the claim follows under the initial
assumption $\varphi(k)\geq k\log k\log\log k$. This assumption is easily
removed; simply note that $\varphi^{**}(x)=\varphi(x)+x\log(x+3)\log\log(x+3)$
satisfies $\sum_{k=1}^{\infty}1/\varphi^{**}(k)=\infty$ and
$\varphi^{**}(k)\geq k\log k\log\log k$, and that the claim with
$\varphi^{**}$ implies the claim with $\varphi$. ∎

###### Proof of Theorem 7.

Given $M\geq 1$, let $k_{M}(\alpha)$ be such that $q_{k_{M}(\alpha)}\leq
M<q_{k_{M}(\alpha)+1}$. From (23) and (26) we immediately deduce that for a.e.
$\alpha$,

$\max_{1\leq N\leq M}\log P_{N}(\alpha)\geq\frac{V+o(1)}{\log
2}k_{M}(\alpha)\log k_{M}(\alpha).$

By $\log q_{k}\sim\frac{\pi^{2}}{12\log 2}k$, here
$k_{M}(\alpha)\sim\frac{12\log 2}{\pi^{2}}\log M$, and we get that for a.e.
$\alpha$,

$\liminf_{M\to\infty}\frac{\displaystyle\max_{1\leq N\leq M}\log
P_{N}(\alpha)}{\log M\log\log M}\geq\frac{12V}{\pi^{2}}.$

Using (24), we similarly obtain that the same holds with $\max$ replaced by
$-\min$. On the other hand, convergence in measure in Theorem 8 shows that the
a.e. limit along a suitably sparse subsequence equals $12V/\pi^{2}$. ∎

###  3.5 Asymptotics in measure

Recall that the Gauss measure $\nu(A):=\frac{1}{\log
2}\int_{A}\frac{1}{1+x}\,\mathrm{d}x$ ($A\subseteq[0,1]$ Borel) is an
invariant measure under the shift $x\mapsto\\{1/x\\}$. The partial quotients
are thus identically distributed:

$\nu\left(\left\\{\alpha\in[0,1]\,:\,a_{k}=j\right\\}\right)=\frac{1}{\log
2}\log\left(1+\frac{1}{j(j+2)}\right),\quad k,j\geq 1.$

The terms “a.e.” and “convergence in measure” are of course equivalent for the
Gauss and the Lebesgue measures, and we will use them in this sense.

###### Proof of Theorem 8.

Given $M\geq 1$, let $k_{M}(\alpha)$ be such that $q_{k_{M}(\alpha)}\leq
M<q_{k_{M}(\alpha)+1}$. By (23), for a.e. $\alpha$,

$\max_{1\leq N\leq M}\log
P_{N}(\alpha)=\left(V+o(1)\right)(a_{1}+\cdots+a_{k_{M}(\alpha)}+\xi_{M}(\alpha))$

with some $|\xi_{M}(\alpha)|\leq a_{k_{M}(\alpha)+1}$. Formula (26) and $\log
M\sim\frac{\pi^{2}}{12\log 2}k_{M}(\alpha)$ show that for a.e. $\alpha$,

$\frac{\displaystyle\max_{1\leq N\leq M}\log P_{N}(\alpha)}{\log M\log\log
M}=\left(V+o(1)\right)\left(\frac{12}{\pi^{2}}+o(1)+\frac{\xi^{*}_{M}(\alpha)}{\log
M\log\log M}\right)$

with some $|\xi^{*}_{M}(\alpha)|\leq 2\max_{1\leq\ell\leq
k_{M}(\alpha)+1}a_{\ell}$. In particular, the $o(1)$ error terms converge to
zero also in measure, and it remains to prove that

$\frac{\max_{1\leq\ell\leq k_{M}(\alpha)+1}a_{\ell}}{\log M\log\log M}\to
0\qquad\textrm{in measure.}$ (29)

Since $\log M\sim\frac{\pi^{2}}{12\log 2}k_{M}(\alpha)$ holds also in measure,
we have

$\nu\left(\left\\{\alpha\in[0,1]\,:\,k_{M}(\alpha)+1\geq 100\log
M\right\\}\right)\to 0\qquad\textrm{as }M\to\infty.$

On the other hand, for any $\varepsilon>0$ and any $\ell\in\mathbb{N}$,

$\begin{split}\nu\left(\left\\{\alpha\in[0,1]\,:\,a_{\ell}\geq\varepsilon\log
M\log\log M\right\\}\right)&=\frac{1}{\log 2}\sum_{j\geq\varepsilon\log
M\log\log M}\log\left(1+\frac{1}{j(j+2)}\right)\\\
&\ll\frac{1}{\varepsilon\log M\log\log M}.\end{split}$

The union bound yields

$\nu\left(\left\\{\alpha\in[0,1]\,:\,\max_{1\leq\ell\leq 100\log
M}a_{\ell}\geq\varepsilon\log M\log\log
M\right\\}\right)\ll\frac{1}{\varepsilon\log\log M}\to 0\quad\textrm{as
}M\to\infty,$

and (29) follows. By (24), the claim also holds with $\max$ replaced by
$-\min$. ∎

The proof of Theorem 9 is based on results of Samur [33] on the asymptotics of
sums of the form $\sum_{\ell=1}^{k}f(a_{\ell})$. Let $\mu$ be a probability
measure on $[0,1]$ which is absolutely continuous with respect to the Lebesgue
measure. A special case of [33, Corollary 2.13] states that for any $t\geq 0$,

$\mu\left(\left\\{\alpha\in[0,1]\,:\,\frac{a_{1}^{2}+\cdots+a_{k}^{2}}{k^{2}}\leq
t\right\\}\right)\to F(t)\qquad\textrm{as }k\to\infty,$

where Samur defines the limit distribution via the Lévy–Khinchin
representation of its characteristic function as

$\int_{\mathbb{R}}e^{itx}\,\mathrm{d}F(t)=\exp\left(i\frac{x}{\log
2}+\frac{1}{2\log
2}\int_{0}^{\infty}\left(e^{ixy}-1-ixyI_{(0,1]}(y)\right)y^{-3/2}\,\mathrm{d}y\right).$

Elementary calculations and the values of the Fresnel-type integrals

$\int_{0}^{\infty}\frac{1-\cos
y}{y^{3/2}}\,\mathrm{d}y=\int_{0}^{\infty}\frac{\sin
y}{y^{3/2}}\,\mathrm{d}y=\sqrt{2\pi}$

lead to the simplified form

$\int_{\mathbb{R}}e^{itx}\,\mathrm{d}F(t)=\exp\left(-\frac{\sqrt{2\pi}}{2\log
2}|x|^{1/2}\left(1-i\,\mathrm{sgn}\,x\right)\right),$

which is the characteristic function of a Lévy distribution supported on
$[0,\infty)$. Using the appropriate normalization, in the special case of sums
of squares of the partial quotients the theorem of Samur thus states that for
any $t\geq 0$,

$\mu\left(\left\\{\alpha\in[0,1]\,:\,\frac{2\log^{2}2}{\pi}\cdot\frac{a_{1}^{2}+\cdots+a_{k}^{2}}{k^{2}}\leq
t\right\\}\right)\to\int_{0}^{t}\frac{e^{-1/(2x)}}{\sqrt{2\pi}x^{3/2}}\,\mathrm{d}x\qquad\textrm{as
}k\to\infty.$ (30)

We shall also need a more sophisticated form of $\log
q_{k}\sim\frac{\pi^{2}}{12\log 2}k$, such as the central limit theorem [31,
32]

$\mu\left(\left\\{\alpha\in[0,1]\,:\,\frac{\log q_{k}-\frac{\pi^{2}}{12\log
2}k}{\tau\sqrt{k}}\leq
t\right\\}\right)\to\int_{-\infty}^{t}\frac{1}{\sqrt{2\pi}}e^{-x^{2}/2}\,\mathrm{d}x\quad\textrm{as
}k\to\infty,$ (31)

where $\tau>0$ is a universal constant.

###### Proof of Theorem 9.

Given $M\geq 1$, let $k_{M}(\alpha)$ be such that $q_{k_{M}(\alpha)}\leq
M<q_{k_{M}(\alpha)+1}$. By Proposition 11, for a.e. $\alpha$ there exists a
constant $K(\alpha)>0$ such that

$\begin{split}\frac{1}{M}\sum_{N=1}^{M}\log P_{N}(\alpha)&=\frac{1}{2}\log
M+\zeta_{M}(\alpha),\\\ \frac{1}{M}\sum_{N=1}^{M}\left(\log
P_{N}(\alpha)-\frac{1}{2}\log
M\right)^{2}&=\sum_{m=1}^{M}\frac{1}{8\pi^{2}m^{2}\|m\alpha\|^{2}}+\zeta_{M}^{*}(\alpha)\end{split}$

with some

$\begin{split}|\zeta_{M}(\alpha)|&\leq K(\alpha)\max_{|\ell-k_{M}(\alpha)|\leq
K(\alpha)\log k_{M}(\alpha)}a_{\ell}\cdot\log\log M,\\\
|\zeta_{M}^{*}(\alpha)|&\leq K(\alpha)\max_{|\ell-k_{M}(\alpha)|\leq
K(\alpha)\log k_{M}(\alpha)}a_{\ell}^{2}\cdot(\log\log M)^{4}.\end{split}$

First, we estimate $\zeta_{M}(\alpha)$ in Gauss measure. Fix $\varepsilon>0$.
Then $\nu(\\{\alpha\in[0,1]\,:\,K(\alpha)\leq K\\})>1-\varepsilon$ with a
large enough $K>0$. Letting $k_{0}:=\lceil\frac{12\log 2}{\pi^{2}}\log
M\rceil$, the central limit theorem (31) immediately gives

$\nu\left(\left\\{\alpha\in[0,1]\,:\,|\log q_{k_{0}}-\log M|\leq C\sqrt{\log
M}\right\\}\right)>1-\varepsilon$

with a large enough $C>0$ and all $M\geq M_{0}(\varepsilon)$. Since the
convergent denominators increase at least exponentially fast (recall e.g. the
general fact $q_{\ell+2}/q_{\ell}\geq 2$), for all $\alpha$ in the previous
set we have $|k_{M}(\alpha)-k_{0}|\leq C\sqrt{\log M}$. Therefore for all
$\alpha$ outside a set of $\nu$-measure $<2\varepsilon$ and all large enough
$M$,

$\\{\ell\,:\,|\ell-k_{M}(\alpha)|\leq K(\alpha)\log
k_{M}(\alpha)\\}\subset[k_{0}-C\sqrt{\log M},k_{0}+C\sqrt{\log M}],$

and in particular

$|\zeta_{M}(\alpha)|\leq K\max_{\ell\in[k_{0}-C\sqrt{\log M},k_{0}+C\sqrt{\log
M}]}a_{\ell}\cdot\log\log M.$

For any $\ell$,

$\nu\left(\left\\{\alpha\in[0,1]\,:\,a_{\ell}\geq\frac{C}{\varepsilon}\sqrt{\log
M}\right\\}\right)\ll\frac{\varepsilon}{C\sqrt{\log M}},$

therefore the union bound yields

$\nu\left(\left\\{\alpha\in[0,1]\,:\,\max_{\ell\in[k_{0}-C\sqrt{\log
M},k_{0}+C\sqrt{\log M}]}a_{\ell}\geq\frac{C}{\varepsilon}\sqrt{\log
M}\right\\}\right)\ll\varepsilon.$

Hence outside a set of $\nu$-measure $\ll\varepsilon$, we have
$|\zeta_{M}(\alpha)|\leq(CK/\varepsilon)\sqrt{\log M}\log\log M$. In
particular, $\zeta_{M}(\alpha)=o(\sqrt{\log M}(\log\log M)^{2})$ in measure,
which proves the first claim of the theorem.

We similarly deduce $\zeta_{M}^{*}(\alpha)=o(\log M(\log\log M)^{5})$ in
measure. The same arguments also show that

$\begin{split}a_{1}^{2}+\cdots+a_{k_{M}(\alpha)}^{2}&=a_{1}^{2}+\cdots+a_{k_{0}}^{2}+O\left(\max_{|\ell-
k_{0}|\leq C\sqrt{\log M}}a_{\ell}^{2}\cdot C\sqrt{\log M}\right)\\\
&=a_{1}^{2}+\cdots+a_{k_{0}}^{2}+o\left((\log M)^{3/2}\log\log
M\right)\quad\textrm{in measure}.\end{split}$

Using e.g. (30), we observe that

$\sqrt{(a_{1}^{2}+\cdots+a_{k_{M}(\alpha)}^{2})k_{M}(\alpha)}=o\left((\log
M)^{3/2}\log\log M\right)\quad\textrm{in measure}$

is also negligible, hence (25) yields

$\frac{1}{M}\sum_{N=1}^{M}\left(\log P_{N}(\alpha)-\frac{1}{2}\log
M\right)^{2}=\frac{\pi^{2}}{720}(a_{1}^{2}+\cdots+a_{k_{0}}^{2})+o\left((\log
M)^{3/2}\log\log M\right)$

in measure. In particular,

$\frac{10\pi}{M\log^{2}M}\sum_{N=1}^{M}\left(\log
P_{N}(\alpha)-\frac{1}{2}\log
M\right)^{2}=\frac{2\log^{2}2}{\pi}\cdot\frac{a_{1}^{2}+\cdots+a_{k_{0}}^{2}}{k_{0}^{2}}+o(1)\quad\textrm{in
measure}.$

Since $\mu$ is absolutely continuous with respect to the Gauss measure, the
$o(1)$ error term converges to zero also in $\mu$-measure. The second claim of
the theorem is thus reduced to the result (30) of Samur. ∎

##  4 Distribution of Birkhoff sums

Throughout this section, $f:\mathbb{R}\to\mathbb{R}$ is a $1$-periodic
function which is of bounded variation on $[0,1]$, such that
$\int_{0}^{1}f(x)\,\mathrm{d}x=0$. Let $V(f)$ denote its total variation on
$[0,1]$, and $\widehat{f}(m)=\int_{0}^{1}f(x)e^{-2\pi imx}\,\mathrm{d}x$,
$m\in\mathbb{Z}$ its Fourier coefficients. Let
$\alpha=[a_{0};a_{1},a_{2},\dots]$ be irrational with convergents
$p_{k}/q_{k}=[a_{0};a_{1},\dots,a_{k}]$. Finally, let
$S_{N}(\alpha,f)=\sum_{n=1}^{N}f(n\alpha)$, and let $A_{M}=A_{M}(\alpha,f)$
and $B_{M}=B_{M}(\alpha,f)$ be as in (6).

###  4.1 General functions of bounded variation

######  Proposition 13.

Assume that $a_{k}\leq ck^{d}$ for all $k\geq 1$ with some constants $c,d\geq
0$. For any $q_{k}\leq M<q_{k+1}$ we have

$\begin{split}A_{M}=\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<M\log^{2d+1}M\end{subarray}}&\left(1-\frac{|m|}{\lfloor
M\log^{2d+1}M\rfloor}\right)\widehat{f}(m)\frac{e^{2\pi im\alpha}}{1-e^{2\pi
im\alpha}}\\\ &+O\left(V(f)\max_{|\ell-k|\ll\log k}a_{\ell}\cdot(\log\log
M)^{2}\right)\end{split}$ (32)

and

$B_{M}^{2}=\sum_{m=1}^{M}\frac{|\widehat{f}(m)|^{2}}{2\pi^{2}\|m\alpha\|^{2}}+O\bigg{(}V(f)\sqrt{\sum_{m=1}^{M}\frac{|\widehat{f}(m)|^{2}}{\|m\alpha\|^{2}}}+V(f)^{2}\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot(\log\log M)^{4}\bigg{)}$ (33)

with implied constants depending only on $c$ and $d$.

The result applies also to orbits with an arbitrary starting point $x_{0}$,
since $\sum_{n=1}^{N}f(x_{0}+n\alpha)=\sum_{n}^{N}\tilde{f}(n\alpha)$ with the
shifted function $\tilde{f}(x)=f(x+x_{0})$. The variance $B_{M}^{2}$ does not
depend on the starting point, as $|\widehat{f}(m)|$ is invariant under shifts.

Recall that $|\widehat{f}(m)|\leq V(f)/|m|$ for all $m\neq 0$. In particular,
by (21) for all badly approximable $\alpha$ we have $B_{M}^{2}\ll V(f)^{2}\log
M$ with an implied constant depending only on $\alpha$. If in addition
$|\widehat{f}(m)|\geq C/|m|$ for all $m\neq 0$ with some constant $C>0$, then
we have the matching lower bound $B_{M}^{2}\gg C^{2}\log M$. For more general
$\alpha$,

$B_{M}^{2}\ll V(f)^{2}(a_{1}^{2}+\cdots+a_{k}^{2})$

with a matching lower bound if $|\widehat{f}(m)|\geq C/|m|$, see (25).

Using Koksma’s inequality [28, p. 143] and the fact that the sequence
$\\{n\alpha\\}$, $1\leq n\leq N$ has discrepancy $\ll\log^{d+1}N$ [20, p. 52],
we get $|S_{N}(\alpha,f)|\ll V(f)\log^{d+1}N$. In particular, $|A_{M}|\ll
V(f)\log^{d+1}M$. If $f$ is even, then the expected value $A_{M}$ is zero up
to the error in (32). This follows from combining the $m$ and $-m$ terms in
the main term of (32), and noting that

$\left|\sum_{0<m<M\log^{d+1}M}\left(1-\frac{m}{\lfloor
M\log^{d+1}M\rfloor}\right)\widehat{f}(m)\right|\ll V(f).$

In fact, the series $\sum_{m=1}^{\infty}\widehat{f}(m)$ converges since $f$ is
of bounded variation.

We mention that the first error term
$V(f)\sqrt{\sum_{m=1}^{M}|\widehat{f}(m)|^{2}/\|m\alpha\|^{2}}$ can be removed
in (33) for certain $f$, such as $f(x)=\\{x\\}-1/2$, or
$f(x)=I_{[a,b]}(\\{x\\})-(b-a)$ provided that
$\inf_{q\in\mathbb{Z}\backslash\\{0\\}}|q|\cdot\|q\alpha-\beta\|>0$ for both
endpoints $\beta=a,b$. This can be seen by following the steps in the proof of
Proposition 11, and noting that the Fourier series of these functions satisfy
a suitable tail estimate, such as

$\left|\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
|m|>M\log^{2d+2}M\end{subarray}}\widehat{f}(m)e^{2\pi
imx}\right|\ll\frac{1}{(M\log^{2d+2}M)\|x-a\|}+\frac{1}{(M\log^{2d+2}M)\|x-b\|}$

in the case of $f(x)=I_{[a,b]}(\\{x\\})-(b-a)$. For general $f$ of bounded
variation, we use an approximation formula for sums of the form
$\sum_{n=1}^{N}f(x_{n})$ instead: if the points
$x_{1},x_{2},\dots,x_{N}\in\mathbb{R}$ satisfy $\|x_{n}-x_{\ell}\|\geq r>0$
for all $n\neq\ell$ with some $r>0$, then for any integer $H>1$,

$\sum_{n=1}^{N}f(x_{n})=\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<H\end{subarray}}\left(1-\frac{|m|}{H}\right)\widehat{f}(m)\sum_{n=1}^{N}e^{2\pi
imx_{n}}+O\left(V(f)\left(\frac{\log H}{rH}+1\right)\right)$ (34)

with a universal implied constant. The proof is based on smoothing with the
Fejér kernel of order $H$ and Koksma’s inequality, see [10, Lemma 3].

###### Proof of Proposition 13.

We may assume that $V(f)=1$. Fix $1\leq N\leq M$, and note that the points
$x_{n}=n\alpha$, $1\leq n\leq N$ satisfy
$\|n\alpha-\ell\alpha\|\geq\|q_{k}\alpha\|\geq 1/(2q_{k+1})\gg 1/(M\log^{d}M)$
for all $n\neq\ell$ by the assumption $a_{k}\leq ck^{d}$. Applying (34) with a
suitable $r\gg 1/(M\log^{d}M)$ and $H=\lfloor M\log^{2d+1}M\rfloor$, we thus
get

$S_{N}(\alpha,f)=\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<H\end{subarray}}\left(1-\frac{|m|}{H}\right)\widehat{f}(m)\frac{e^{2\pi
im\alpha}-e^{2\pi iNm\alpha}}{1-e^{2\pi im\alpha}}+O(1).$

Taking the average over $N\in[1,M]$ and introducing

$E_{M}:=\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<H\end{subarray}}\left(1-\frac{|m|}{H}\right)\widehat{f}(m)\frac{e^{2\pi
im\alpha}}{1-e^{2\pi im\alpha}},$

we obtain

$\begin{split}A_{M}&=E_{M}-\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<H\end{subarray}}\left(1-\frac{|m|}{H}\right)\widehat{f}(m)\frac{e^{2\pi
im\alpha}-e^{2\pi im(M+1)\alpha}}{M(1-e^{2\pi im\alpha})^{2}}+O(1)\\\
&=E_{M}+O\left(1+\sum_{m=1}^{H-1}\frac{1}{m}\min\left\\{\frac{1}{M\|m\alpha\|^{2}},\frac{1}{\|m\alpha\|}\right\\}\right)\\\
&=E_{M}+O\left(\max_{|\ell-k|\ll\log k}a_{\ell}\cdot(\log\log
M)^{2}\right),\end{split}$

where the last step follows from an obvious modification of Lemma 12. This
proves (32).

Next, we prove (33). By the previous three formulas,

$S_{N}(\alpha,f)-E_{M}=-\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<H\end{subarray}}\left(1-\frac{|m|}{H}\right)\widehat{f}(m)\frac{e^{2\pi
iNm\alpha}}{1-e^{2\pi im\alpha}}+O(1).$

Squaring both sides, and then taking the average over $N\in[1,M]$ yields

$\frac{1}{M}\sum_{N=1}^{M}\left(S_{N}(\alpha,f)-E_{M}\right)^{2}=V_{M}+O\left(\sqrt{V_{M}}+1\right),$

where

$V_{M}:=\frac{1}{M}\sum_{N=1}^{M}\left|\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<H\end{subarray}}\left(1-\frac{|m|}{H}\right)\widehat{f}(m)\frac{e^{2\pi
iNm\alpha}}{1-e^{2\pi im\alpha}}\right|^{2}.$

Following the steps in the proof of Proposition 11 shows that the contribution
of the off-diagonal terms is negligible, hence

$V_{M}=\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|<H\end{subarray}}\left(1-\frac{|m|}{H}\right)^{2}\frac{|\widehat{f}(m)|^{2}}{|1-e^{2\pi
im\alpha}|^{2}}+O\left(\max_{|\ell-k|\ll\log k}a_{\ell}^{2}\cdot(\log\log
M)^{4}\right).$

We can clean up the main term by noting that the contribution of the terms
$M<|m|<H$ is negligible, and that for all $0<|m|\leq M$ the error of replacing
$(1-|m|/H)^{2}$ by $1$ is also negligible:

$\begin{split}\sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
M<|m|<H\end{subarray}}\frac{1}{m^{2}\|m\alpha\|^{2}}&\ll\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot\log\log M,\\\ \sum_{\begin{subarray}{c}m\in\mathbb{Z}\\\
0<|m|\leq
M\end{subarray}}\frac{|m|}{H}\cdot\frac{1}{m^{2}\|m\alpha\|^{2}}&\ll\frac{M}{H}\log^{2d+1}M\ll
1,\end{split}$

see Lemma 12. Therefore

$V_{M}=\sum_{m=1}^{M}\frac{|\widehat{f}(m)|^{2}}{2\sin^{2}(\pi
m\alpha)}+O\left(\max_{|\ell-k|\ll\log k}a_{\ell}^{2}\cdot(\log\log
M)^{4}\right),$

and using $1/\sin^{2}(\pi m\alpha)=1/\|m\alpha\|^{2}+O(1)$ we deduce

$\begin{split}\frac{1}{M}\sum_{N=1}^{M}\left(S_{N}(\alpha,f)-E_{M}\right)^{2}=&\sum_{m=1}^{M}\frac{|\widehat{f}(m)|^{2}}{2\pi^{2}\|m\alpha\|^{2}}\\\
&+O\left(\sqrt{\sum_{m=1}^{M}\frac{|\widehat{f}(m)|^{2}}{\|m\alpha\|^{2}}}+\max_{|\ell-k|\ll\log
k}a_{\ell}^{2}\cdot(\log\log M)^{4}\right).\end{split}$

Finally, the first claim (32) shows that the error of replacing $E_{M}$ by
$A_{M}$ on the left-hand side is negligible, and (33) follows. ∎

###  4.2 Indicators of intervals

In the special case $f(x)=I_{[a,b]}(\\{x\\})-(b-a)$ with some
$[a,b]\subset[0,1]$ and a badly approximable $\alpha$, Proposition 13 gives

$B_{M}^{2}=\sum_{m=1}^{M}\frac{\sin^{2}(\pi
m(b-a))}{2\pi^{4}m^{2}\|m\alpha\|^{2}}+O\left(\sqrt{\log M}\right)$

with an implied constant depending only on $\alpha$. The order of magnitude of
$B_{M}^{2}$ thus depends on the Diophantine approximation properties of the
vector $(\alpha,b-a)$. As we observed in the previous section,
$B_{M}^{2}\ll\log M$ holds for any $[a,b]\subset[0,1]$. To establish a lower
bound, we need to find positive integers $m$ for which $\|m\alpha\|$ is small,
but $\|m(b-a)\|$ is bounded away from zero; in other words, we want the
sequence $(m\alpha,m(b-a))\pmod{1}$ to visit a narrow but long rectangle in
$\mathbb{R}^{2}/\mathbb{Z}^{2}$ many times. Our proof of Theorem 4 is based on
a quantitative form of Kronecker’s theorem due to Cassels [14, p. 97–99].

######  Lemma 14 (Cassels).

Let $\alpha_{1},\dots,\alpha_{n},\beta_{1},\dots,\beta_{n}\in\mathbb{R}$, and
let $C_{1},\dots,C_{n},Q>0$ be reals. Assume that for any integral vector
$(m_{1},\dots,m_{n})\in\mathbb{Z}^{n}$,

$\|m_{1}\beta_{1}+\cdots+m_{n}\beta_{n}\|\leq\frac{2^{n}}{((n+1)!)^{2}}\max\left\\{C_{1}|m_{1}|,\dots,C_{n}|m_{n}|,Q\|m_{1}\alpha_{1}+\cdots+m_{n}\alpha_{n}\|\right\\}.$

Then the system of $n+1$ inequalities

$\begin{split}\|q\alpha_{k}-\beta_{k}\|&\leq C_{k}\quad(1\leq k\leq n),\\\
|q|&\leq Q\end{split}$

has an integral solution $q\in\mathbb{Z}$.

###### Proof of Theorem 4.

We give separate proofs for rational and irrational values of $b-a$. First,
assume that $b-a$ is irrational. Fix a constant $K>0$ such that

$\|q\alpha\|\geq\frac{K}{|q|},\qquad\|k(b-a)\|\geq
K,\qquad\|q\alpha-k(b-a)\|\geq K/|q|$

for all integers $q\neq 0$ and all $k\in\\{1,3,5,7,9\\}$. Let us apply Lemma
14 with $n=2$ and

$\alpha_{1}=\alpha,\qquad\alpha_{2}=b-a,\qquad\beta_{1}=0,\qquad\beta_{2}=\frac{1}{2},\qquad
C_{1}=\frac{100}{KQ},\qquad C_{2}=0.49,$

and a large real number $Q>5/K$. We need to check that for all
$(m_{1},m_{2})\in\mathbb{Z}^{2}$,

$\|m_{2}/2\|\leq\frac{1}{9}\max\left\\{\frac{100|m_{1}|}{KQ},0.49|m_{2}|,Q\|m_{1}\alpha+m_{2}(b-a)\|\right\\}.$
(35)

This trivially holds if $m_{2}$ is even, and also if $|m_{2}|\geq 11$. We may
thus assume that $|m_{2}|\in\\{1,3,5,7,9\\}$, in which case the left hand side
is $1/2$. If $m_{1}=0$, then the last term in the maximum is
$Q\|m_{2}(b-a)\|\geq QK>5$, and (35) follows. If $m_{1}\neq 0$, then

$\max\left\\{\frac{100|m_{1}|}{KQ},Q\|m_{1}\alpha+m_{2}(b-a)\|\right\\}\geq\max\left\\{\frac{100|m_{1}|}{KQ},\frac{KQ}{|m_{1}|}\right\\}\geq
10,$

and (35) follows once again.

Hence for any $Q>5/K$ there exists an integer $|q|\leq Q$ with
$\|q\alpha\|\leq 100/(KQ)$ and $\|q(b-a)-1/2\|\leq 0.49$; the latter
inequality is equivalent to $\|q(b-a)\|\geq 1/100$. Since $\|q\alpha\|\geq
K/|q|$, the integer solution $q$ also satisfies $|q|\geq(K^{2}/100)Q$. Note
that $-q$ is a solution if and only if $q$ is. In particular, there exist
$\gg\log M$ integers $m\in[1,M]$ such that $\|m\alpha\|\ll 1/m$ and
$\|m(b-a)\|\geq 1/100$. Therefore

$\sum_{m=1}^{M}\frac{\sin^{2}(\pi
m(b-a))}{2\pi^{4}m^{2}\|m\alpha\|^{2}}\gg\log M,$

and the claim follows.

Next, assume that $0<b-a<1$ is rational, say $b-a=s/r$ with relatively prime
positive integers $s,r$. Then $\sin^{2}(\pi m(b-a))\gg 1$ for any integer $m$
not divisible by $r$. Applying Lemma 14 with $n=1$; $\alpha_{1}=r\alpha$;
$\beta_{1}=-\alpha$ and a large real $Q>0$, we similarly deduce that there
exists an integer $Q\ll|q|\leq Q$ such that $\|(qr+1)\alpha\|\ll 1/Q$. In
particular, there exist $\gg\log M$ integers $m\in[1,M]$ such that
$\|m\alpha\|\ll 1/m$ and $m\equiv\pm 1\pmod{r}$, and the claim follows. ∎

Finally, we give an alternative proof of Theorem 4 for rational $b-a=s/r$. As
observed, it is enough to show that there exist $\gg\log M$ integers
$m\in[1,M]$ such that $\|m\alpha\|\ll 1/m$, and $m$ is not divisible by $r$.
The convergent denominators of $\alpha$ satisfy the recurrence
$q_{\ell+1}=a_{\ell+1}q_{\ell}+q_{\ell-1}$ with initial conditions $q_{0}=1$,
$q_{1}=a_{1}$. If $q_{\ell}$ and $q_{\ell+1}$ are both divisible by $r$, then
so is $q_{\ell-1}$; but by induction this is impossible, as $q_{0}=1$.
Therefore among any two consecutive $q_{\ell}$, at least one is not divisible
by $r$.

## Acknowledgement

The author is supported by the Austrian Science Fund (FWF), project Y-901.

## References

  * [1] C. Aistleitner and B. Borda: Quantum invariants of hyperbolic knots and extreme values of trigonometric products. arXiv:2006.08578.
  * [2] C. Aistleitner and B. Borda: Maximizing Sudler products via Ostrowski expansions and cotangent sums. arXiv:2104.01379.
  * [3] C. Aistleitner, N. Technau and A. Zafeiropoulos: On the order of magnitude of Sudler products. arXiv:2002.06602.
  * [4] A. Avila, D. Dolgopyat, E. Duryev and O. Sarig: The visits to zero of a random walk driven by an irrational rotation. Israel J. Math. 207 (2015), 653–717.
  * [5] A. Avila and S. Jitomirskaya: The Ten Martini Problem. Ann. of Math. 170 (2009), 303–342.
  * [6] A. Bazarova, I. Berkes and L. Horváth: On the extremal theory of continued fractions. J. Theoret. Probab. 29 (2016), 248–266.
  * [7] J. Beck: Probabilistic Diophantine Approximation. Randomness in Lattice Point Counting. Springer Monographs in Mathematics, Springer, Cham, 2014.
  * [8] J. Beck: Randomness of the square root of 2 and the giant leap, part 1. Period. Math. Hungar. 60 (2010), 137–242.
  * [9] J. Beck: Randomness of the square root of 2 and the giant leap, part 2. Period. Math. Hungar. 62 (2011), 127–246.
  * [10] I. Berkes and B. Borda: Random walks on the circle and Diophantine approximation. Submitted.
  * [11] S. Bettin and S. Drappeau: Modularity and value distribution of quantum invariants of hyperbolic knots. arXiv:1905.02045.
  * [12] B. Borda: On the theorem of Davenport and generalized Dedekind sums. J. Number Theory 172 (2017), 1–20.
  * [13] M. Bromberg and C. Ulcigrai: A temporal central limit theorem for real-valued cocycles over rotations. Ann. Inst. Henri Poincaré Probab. Stat. 54 (2018), 2304–2334.
  * [14] J. Cassels: An Introduction to Diophantine Approximation. Cambridge Tracts in Mathematics and Mathematical Physics, 45. Cambridge University Press, New York, 1957.
  * [15] H. Diamond and J. Vaaler: Estimates for partial sums of continued fraction partial quotients. Pacific J. Math. 122 (1986), 73–82.
  * [16] D. Dolgopyat and B. Fayad: Limit theorems for toral translations. Hyperbolic Dynamics, Fluctuations and Large Deviations 227–277. Proc. Sympos. Pure Math. 89. Amer. Math. Soc., Providence, RI, 2015.
  * [17] D. Dolgopyat and O. Sarig: No temporal distributional limit theorem for a.e. irrational translation. Ann. H. Lebesgue 1 (2018), 127–148.
  * [18] D. Dolgopyat and O. Sarig: Quenched and annealed temporal limit theorems for circle rotations. Astérisque 415 (2020), 57–83.
  * [19] D. Dolgopyat and O. Sarig: Temporal distributional limit theorems for dynamical systems. J. Stat. Phys. 166 (2017), 680–713.
  * [20] M. Drmota and R. Tichy: Sequences, Discrepancies and Applications. Lecture Notes in Mathematics, 1651. Springer-Verlag, Berlin, 1997.
  * [21] P. Erdős and G. Szekeres: On the product $\prod_{k=1}^{n}(1-z^{a_{k}})$. Acad. Serbe Sci. Publ. Inst. Math. 13 (1959), 29–34.
  * [22] S. Grepstad, L. Kaltenböck and M. Neumüller: A positive lower bound for $\liminf_{N\to\infty}\prod_{r=1}^{N}2|\sin\pi r\phi|$. Proc. Amer. Math. Soc. 147 (2019), 4863–4876.
  * [23] S. Grepstad, L. Kaltenböck and M. Neumüller: On the asymptotic behaviour of the sine product $\prod_{r=1}^{n}2|\sin\pi r\alpha|$. arXiv:1909.00980.
  * [24] S. Grepstad, M. Neumüller and A. Zafeiropoulos: On the order of magnitude of Sudler products II. Preprint.
  * [25] H. Kesten: On a conjecture of Erdős and Szüsz related to uniform distribution mod 1. Acta Arith. 12 (1966), 193–212.
  * [26] A. Khintchine: Metrische Kettenbruchprobleme. Compositio Math. 1 (1935), 361–382.
  * [27] O. Knill and F. Tangerman: Self-similarity and growth in Birkhoff sums for the golden rotation. Nonlinearity 24 (2011), 3115–3127.
  * [28] L. Kuipers and H. Niederreiter: Uniform Distribution of Sequences. Pure and Applied Mathematics. Wiley-Interscience, New York-London-Sydney, 1974.
  * [29] D. Lubinsky: Rogers–Ramanujan and the Baker–Gammel–Wills (Padé) conjecture. Ann. of Math. 157 (2003), 847–889.
  * [30] D. Lubinsky: The size of $(q;q)_{n}$ for $q$ on the unit circle. J. Number Theory 76 (1999), 217–247.
  * [31] W. Philipp: Mixing Sequences of Random Variables and Probabilistic Number Theory. Mem. Amer. Math. Soc. 114. American Mathematical Society, Providence, RI, 1971.
  * [32] W. Philipp and O. Stackelberg: Zwei Grenzwertsätze für Kettenbrüche. Math. Ann. 181 (1969), 152–156.
  * [33] J. Samur: On some limit theorems for continued fractions. Trans. Amer. Math. Soc. 316 (1989), 53–79.
  * [34] C. Sudler Jr.: An estimate for a restricted partition function. Quart. J. Math. Oxford Ser. 15 (1964), 1–10.
  * [35] D. Zagier: Quantum modular forms. Quanta of maths, Clay Math. Proc. pp. 659–675. Amer. Math. Soc. Providence, RI, 2010.