\item $\bm{p}(\Ei x)  \,  \simeq \, \displaystyle  x-  \ \frac{1x} {x+1 \, -} \ \frac{2x} {x+2 \, -} \   \frac{3x} {x+3\, -} \ \frac{4x}{x+4 \, -}\ \cdots \ (x \to \infty)$.
\item $\bm{p}(\Ei x) \, \simeq \,  \cfrac{x}{1 \,-} \ \cfrac{\frac{1}{x}}{1 \,-}\  \cfrac{\frac{1}{x}}{1 \,-}\  \cfrac{\frac{2}{x}}{1 \,-}\  \cfrac{\frac{2}{x}}{1 \,-}\  \cfrac{\frac{3}{x}}{1 \,-} \  \cfrac{\frac{3}{x}}{1 \,-}\  \cfrac{\frac{4}{x}}{1 \,-}  \ \cfrac{\frac{4}{x}}{1 \,-}  \ \cdots \ (x \to \infty)$.
\item $\bm{p}(\Ei x)  \,  \simeq \, \displaystyle x -1 - \  \frac{1}{x  - 3 \,-}\  \frac{4}{x-5\,-}\  \frac{9}{x - 7 \,-} \ \frac{16}{x-9\,-} \ \cdots \ (x \to \infty)$.
\end{enumerate}
Moreover,  the best rational approximations of the functions $\PP(e^x)$ and $\frac{1}{\bm{p}(\Ei x)}$ are one and the same.    The statements above hold also when $\Ei$ is replaced with $\ERi$.
\end{remark}

\begin{remark}[Largest order of an element in the symmetric group $S_n$]\label{landaufunction}
Note that the function $\li^{-1}x$ arises in connection with another equivalent of the Riemann hypothesis, concerning the largest order $g(n)$ of an element of the symmetric group $S_n$.  The function $g(n)$ is known as {\bf Landau's function} and is OEIS Sequence A000793.   Let $h(n) = \log g(n)-\sqrt{\li^{-1}n}$.  By \cite[Theorems 10.41 and 10.42]{broughan}, one has the following.
\begin{enumerate}
\item If $\Theta < 1$,  then $\dege h \leq (\frac{\Theta}{2},\frac{\Theta}{2}, 0,0,0,\ldots)$.
\item If $\Theta = 1$, then $\dege h \leq (\frac{1}{2},0,-\infty,-\frac{1}{2}, 0,0,0,\ldots)$.
\item If $\Theta > \frac{1}{2}$,  then $\dege h \geq (\frac{\Theta}{2},-\infty,-1,0,0,0,\ldots)$.
\item If $\zeta(s)$ has a zero with real part $\Theta$, then $\dege h = (\frac{\Theta}{2}, \frac{\Theta}{2},0,0,0,\ldots)$.
\item As a consequence of (1)--(4), one has $\deg h  = \frac{\Theta}{2}$.
\item The following conditions are equivalent to the Riemann hypothesis $\Theta = \frac{1}{2}$.
\begin{enumerate}
\item $\deg h = \frac{1}{4}$.
\item $\dege h =  (\frac{1}{4},\frac{1}{4}, 0,0,0,\ldots)$.
\item $\log g(n)<\sqrt{\li^{-1}n}$ for all $n \gg 0$.
\end{enumerate}
\end{enumerate}
\end{remark}

\section{The $n$th prime gap $g_n = p_{n+1}-p_n$}

Far less is known about the {\bf prime gap function}\index{prime gap function $g_n$}\index[symbols]{.ru N@$g_n$}  $$g_n  = p_{n+1}-p_n$$ than is known about the prime listing function $p_n$.   It is easy to show that there are arbitrarily long sequences of consecutive composite numbers, or, equivalently, that
$$\limsup_{n \to \infty}  g_n = \infty.$$  The {\bf twin prime conjecture} states that there are infinitely many primes that differ by $2$, or, equivalently,
$$\liminf_{n \to \infty}  g_n = 2.$$
Until 2013, it was unknown whether or not $\liminf_{n \to \infty}  g_n$ is finite.   Until then, the best known bound on small prime gaps was one proved in 2007 by Goldson, Pintz, and Yildrim [102], namely, that
$$\liminf_{n \to \infty}  \frac{g_n}{\sqrt{\log n}\, (\log \log n)^2} < \infty$$
and therefore
$$\underline{\dege} \, g_n \leq (\tfrac{1}{2},2,0,0,0,\ldots).$$
However, in 2013, Y.\ Zhang made a startling breakthrough towards settling the twin prime conjecture by proving that there are infinitely many primes that differ by at most 70000000 [302].  In the immediate aftermath of Zhang's proof, several mathematicians teamed up to improve Zhang's result, and, ultimately, by April 2014, proved that   there are infinitely many primes that differ by at most 246 [238].  Equivalently, they proved that $$\liminf_{n \to \infty}  g_n  \leq 246.$$   As a consequence, one has
$$\underline{\dege} \, g_n = (0,0,0,\ldots).$$  Here, we consider the following  problem.

\begin{outstandingproblem}
Compute $\dege g_n$.
\end{outstandingproblem}

The  {\bf Bertrand--Chebyshev theorem},\index{Bertrand--Chebyshev theorem} conjectured by Bertrand in 1845 and proved by Chebyshev in 1850 [46], states that, for every integer $n >1$, there is at least one prime $p$ such that $n < p < 2n$.  Equivalently, one has
$$p_{n+1} < 2 p_n,$$
that is,
$$g_n < p_n,$$
for all positive integers $n$.   Many improvements on this inequality have since been proved, e.g.,  \cite[Proposition 5.4 and Corollary 5.5]{dus}.   One can do much better if one is concerned only with $O$ bounds rather than with explicit inequalities.  By (\ref{bakerres}), which is proved in [15],  and by Corollary \ref{simplepgcor} below, one has
$$g_n = O (p_n^{21/40}) \ (n \to \infty).$$
Since the prime number theorem is equivalent to
$$p_n \sim n \log n  \ (n \to \infty),$$ the $O$ bound above is equivalent to
$$g_n = O ((n \log n)^{21/40}) \ (n \to \infty).$$
In [53], Cram\'er proved on condition of the Riemann hypothesis that
$$g_n = O (p_n^{1/2}\log p_n) \ (n \to \infty),$$
or, equivalently,
$$g_n = O (n^{1/2}(\log n)^{3/2}) \ (n \to \infty).$$
In particular, one has
$$\dege g_n \leq (\tfrac{21}{40},\tfrac{21}{40},0,0,0,\ldots),$$
and one has
$$\dege g_n \leq (\tfrac{1}{2},\tfrac{3}{2},0,0,0,\ldots)$$
on condition of the Riemann hypothesis.

Since $$p_{n+1} = 2+\sum_{k = 1}^n g_k, \quad \forall n \geq 1,$$
the prime number theorem implies that $$g_n \neq o(\log n) \ (n \to \infty).$$  Thus, an obvious lower bound for $\dege g_n$ is $$\dege g_n  \geq (0,1,0,0,0,\ldots).$$ The state-of-the-art lower bound for $g_n$ at the writing of this text improves the lower bound above by nearly a factor of $\log \log n$: in 2016, Ford, Green, Konyagin, Maynard, and Tao  proved [96] that
\begin{align}\label{fgkmt}
g_n \neq o\left(\frac{\log n \log \log n\log \log \log \log n}{\log \log \log n}\right) \ (n \to \infty).
\end{align}  This result, of course, implies that $$\dege g_n \geq (0,1,1,-1,1,0,0,0,\ldots).$$
Note that there is a long history that led up to the 2016 result (\ref{fgkmt}),  e.g.,  in 1931,  E.\ Westzynthius was the first to prove that
$g_n  \neq O(\log n) \ (n \to \infty)$, via a more precise result that implies $\dege g_n \geq (0,1,0,1,-1,0,0,0,\ldots)$ [288].

By the following simple proposition, which relates the prime gap function to the prime counting function, many of the results of Section 12.1 apply to the study of the function $g_n$.

\begin{proposition}\label{simplepg}
Let $h(x)$ be a nonnegative real function defined on $[p_N, \infty)$,  where $N$ is a positive integer.  If
$$\pi(x+h(x)) -\pi(x) \geq 1, \quad \forall x \geq p_N,$$
$$h(p_n) \geq g_n, \quad \forall n \geq N.$$
Moreover, the converse holds if $h(x)$ is nondecreasing on $[p_N, \infty)$.
\end{proposition}

\begin{proof}
Suppose that
$$\pi(x+h(x)) -\pi(x) \geq 1, \quad \forall x \geq p_N.$$
Then one has
$$\pi(p_n+h(p_n))-\pi(p_n) \geq 1,$$
and therefore
$$p_{n+1} \leq  p_n+h(p_n),$$
$$g_n \leq h(p_n),$$
for all $n$ with $p_n \geq p_N$, that is, with $n \geq N$.  Conversely,  suppose that $h(x)$ is nondecreasing for all $x \geq p_N$ and
$$g_n \leq h(p_n), \quad \forall n \geq N.$$
Then one has
$$\pi(p_n+h(p_n))-\pi(p_n) \geq 1$$
for all $n \geq N$.    Let $x \geq  p_N$.  Let $n = \pi(x)$, so that  $n \geq N$ and $x \geq p_n \geq p_N$, and therefore also
$$\pi(x+h(x)) -\pi(x) \geq \pi(p_n+h(p_n))-\pi(p_n) \geq 1.$$
The proposition follows.
\end{proof}

\begin{corollary}\label{simplepgcor}
One has
\begin{align*}
\deg g_n =  \inf\{t > 0: \forall x \gg 0 \ (\pi(x+x^t) -\pi(x) \geq 1 )\}.
\end{align*}
\end{corollary}

Corollaries \ref{simplepgcor} and \ref{lindel} yield the following.

\begin{corollary}\label{lindelb}
If the density hypothesis holds, then $\deg g_n \leq \tfrac{1}{2}$.
\end{corollary}

Thus, the density hypothesis yields the same upper bound of $\deg g_n$, namely, $\frac{1}{2}$, as does the Riemann hypothesis.

The following conjecture was first made by Piltz in 1884 and is implied by many well-known conjectures regarding the prime gap function $g_n$.

\begin{conjecture}[{Piltz's conjecture [232]}]\label{gapconj}
One has $g_n = O(n^t) \ (n \to \infty)$ for all $t > 0$.  Equivalently, one has $\deg g_n = 0$.   Equivalently still, for all $t > 0$ one has $\pi(x+x^t) -\pi(x) \geq 1$ for all $x \gg 0$.
\end{conjecture}

Now, let $G(x)$ denote the   {\bf maximal prime gap function}\index{maximal prime gap function  $G(x)$}\index[symbols]{.st P@$G(x)$}
$$G(x) = \max_{p_{k} \leq x}  g_k = \max_{k \leq \pi(x)}  g_k, \quad \forall x \geq 0,$$
[107] [204] [234].     Note that, in the literature, one encounters the function $G(x)$  and slight variants thereof,  such as  the function
$$\widetilde{G}(x) = \max_{p_{k+1} \leq x}  g_k = \max_{k < \pi(x)}  g_k, \quad \forall x \geq 0,$$
[96] and the function $\max_{p_{k+1} < x}  g_k$ [293],  but such variations do not affect the various  asymptotics proved and conjectured for these functions.  The function $G(x)$ is the most natural of these variants.  It satisfies $$G(p_{n}) = \max_{k \leq n} g_k$$ for all positive integers $n$, and it is a nondecreasing step function with jumps precisely at those primes $p_{n}$ such that ($g_n = G(p_{n})$ and) $g_k < g_n$ for all $k < n$.   By Proposition \ref{supprop},  one has
$$\dege g_n = \dege G(p_n),$$ and, dually,
$$\dege G(x) = \dege g_{\pi(x)}.$$
Also, $G(x)$ is the smallest nondecreasing  function that is greater than or equal to $g_{\pi(x)}$.  Likewise, by Proposition \ref{simplepg}, it is the smallest nonnegative nondecreasing  function  $h(x)$ on $\RR_{\geq 0}$ such that $\pi(x+h(x)) - \pi(x) \geq 1$ for all $x \geq 2$.  Indeed,  one has the following.

\begin{corollary}\label{GmaxCor} If $h(x)$ is any function that is nonnegative and nondecreasing  on $\RR_{\geq 0}$,  then one has
$$\pi(x+h(x)) -\pi(x) \geq 1, \quad \forall x \geq 2,$$
if and only if $$h(x) \geq G(x), \quad \forall x \geq 0.$$  Likewise,  if $h(x)$ is any function that is  nonnegative and nondecreasing  on some neighborhood of $\infty$, then one has
$$\pi(x+h(x)) -\pi(x) \geq 1, \quad \forall x \gg 0,$$
if and only if $$h(x) \geq G(x), \quad \forall x \gg 0.$$
\end{corollary}

Thus,  the function $G(x)$ acts as a very natual  bridge between the prime gap function $g_n$ and the prime counting function $\pi(x)$ and bears directly on Problem \ref{Gmaxprob}.
Note that the  2016 result (\ref{fgkmt}) in [96] is proved there in the following stronger form.

\begin{theorem}[{[96]}] One has
$$G(x) \gg \frac{\log x \log \log x\log \log \log \log x}{\log \log \log x} \ (x \to \infty).$$
Equivalently,  if $h(x)$ is any function that is  nonnegative and nondecreasing  on some neighborhood of $\infty$ and satisfies
$$\pi(x+h(x)) -\pi(x) \geq 1, \quad \forall x \gg 0,$$
then one has
$$h(x) \gg  \frac{\log x \log \log x\log \log \log \log x}{\log \log \log x} \ (x \to \infty).$$
\end{theorem}

Note that the lower bound
$$G(x) > (1-\varepsilon) \log x, \quad \forall x \gg 0,$$
for any fixed $\varepsilon > 0$, follows from the prime number theorem.   This is because, if $G(x) \leq (1-\varepsilon ) \log x$ for some $x$, then
$$p_{\pi(x)+1} -2 = g_1 + g_2 + \cdots g_{\pi(x)} \leq (1-\varepsilon) \pi(x)\log x,$$
and, as $x \to \infty$,  one has $p_{\pi(x)+1} -2 \sim \pi(x)\log x$, so the two inequalities must fail for all $x \gg 0$.   In a sense, this is the sharpest lower bound that can be proved from the prime number theorem alone.   Note also that, again by the prime number theorem, the average prime gap satisfies
$$\frac{g_1 + g_2 + \cdots+ g_{n}}{n} = \frac{p_{n+1}-2}{n} \sim \log n \sim \log p_n \ (n \to \infty).$$

The increasing sequence $a(n)$ of all $N$ for which $g_k < g_N$ for all $k < N$ is OEIS Sequence  A005669 and
is given by $$1, 2, 4, 9, 24, 30, 99, 154, 189, 217, 1183, 1831, \ldots.$$
The corresponding sequence
$$2, 3, 7, 23, 89, 113, 523, 887, 1129, 1327, 9551, 15683, \ldots$$
of primes $p_{a(n)}$ is OEIS Sequence A002386,
and the corresponding sequence
$$1, 2, 4, 6, 8, 14, 18, 20, 22, 34, 36, 44, \ldots $$
of record prime gaps $g_{a(n)} = G(p_{a(n)})$ is OEIS Sequence A005250.   The primes $p_{a(n)}$ are precisely the points of discontinuity of the step function $G$,  and the respective values of $G$ at these points are the gaps $g_{a(n)}$.    In particular, the image of $G$ is equal to $ \{g_{a(n)}: n \geq 1\}\cup \{0\}$.
From $(p_{a(n)})^-$ to $p_{a(n)}$, the function $G$ jumps up by $g_{a(n)}-g_{a(n-1)}$, where the sequence $g_{a(n)}-g_{a(n-1)}$ for $n \geq 2$ is OEIS Sequence A053695 and is given by  $$1, 2, 2, 2, 6, 4, 2, 2, 12, 2, 8, 8,\ldots.$$

The following theorem summarizes what we can prove about $\dege g_n$ and $\dege G$ from the results noted above.

\begin{theorem}\label{GTM}   One has the following.
\begin{enumerate}
\item One has
\begin{align*}
\dege G & = \dege g_{\pi(x)} \\
& =  \dege g_n +(0,-\deg g_n, 0,0,0,\ldots) \\
& = \inf\{\dege r: r \in \mathbb{L}_{>0}, \, \forall x \gg 0 \ (\pi(x+r(x)) -\pi(x) \geq 1 )\}.
\end{align*}
\item $(0,1,1,-1,1,0,0,0,\ldots) \leq \dege g_n \leq (\tfrac{21}{40},\tfrac{21}{40},0,0,0,\ldots).$
\item $(0,1,1,-1,1,0,0,0,\ldots) \leq \dege G \leq (\tfrac{21}{40},0,0,0,0,\ldots).$
\item If the Riemann hypothesis holds, then $\dege g_n \leq (\tfrac{1}{2},\tfrac{3}{2},0,0,0,\ldots)$.
\item If the Riemann hypothesis holds, then $\dege G \leq (\tfrac{1}{2},1,0,0,0,\ldots)$.
\item If the density hypothesis holds, then $\deg g_n = \deg G \leq \tfrac{1}{2}$.
\item Conjecture \ref{gapconj}, namely, that $\deg g_n = 0$, is equivalent to $\deg G = 0$, and it implies that $\dege g_n = \dege G$ and
$$\dege_1 g_n = \dege_1 G = \inf\{t \in \RR: \forall x \gg 0\, ( \pi(x+(\log x)^t)-\pi(x) \geq 1 )\},$$
and therefore also that
$$\liminf_{x \to \infty}\,  (\pi(x+(\log x)^{t})-\pi(x)) =
\left.
\begin{cases}
\geq 1 & \text{if } t> \dege_1 g_n \\
0 & \text{if } t <\dege_1 g_n.
\end{cases}
\right.$$
\end{enumerate}
\end{theorem}

To prove the theorem, we first establish a few lemmas.

\begin{lemma}
One has
$$\dege G = \dege g_{\pi(x)} = \dege g_n + (0,-\deg g_n, 0,0,0,\ldots).$$
\end{lemma}

\begin{proof}
By Proposition \ref{supprop}, one has
$$\dege  G =  \dege g_{\pi(x)}.$$
Let $r \in \mathbb{L}_{>0}$ with $g_n \leq r(n)$ for all $n \gg 0$.  Then one has $g_{\pi(x)} \leq r(\pi(x))$ for all $x \gg 0$,  so that
$$\dege g_{\pi(x)} \leq \dege r(\pi(x)) = \dege r + (0,-\deg r, 0,0,0,\ldots).$$
Taking the infimum over all $r$ as chosen, we find that
$$\dege g_{\pi(x)} \leq  \dege g_n + (0,-\deg g_n, 0,0,0,\ldots).$$
(To verify this,  there are two cases to consider: $\dege g_n < (\deg g_n, \infty, 1,0,0,0,\ldots)$ and $\dege g_n = (\deg g_n, \infty, 1,0,0,0,\ldots)$.)  Conversely, let $s \in \mathbb{L}_{>0}$ with $g_{\pi(x)} \leq s(x)$ for all $x \gg 0$.    Then one has $g_n = g_{\pi(p_n)} \leq s(p_n)$ for all $n \gg 0$,  so that
$$\dege g_{n} \leq \dege s(p_n) = \dege s + (0,\deg s, 0,0,0,\ldots).$$
Taking the infimum over all $s$ as chosen, we find that
$$\dege g_{n} \leq  \dege g_{\pi(x)} + (0,\deg g_n, 0,0,0,\ldots).$$
This completes the proof.
\end{proof}

Replacing $\pi(x)$ with $\pi(x)-1$ in the proof above yields the following lemma.

\begin{lemma}\label{degeGcor0}
One has
$$\dege  \widetilde{G} = \dege g_{\pi(x)-1} = \dege g_n + (0,-\deg g_n, 0,0,0,\ldots) = \dege G.$$
\end{lemma}

\begin{lemma}\label{degeGcor}
One has
$$\dege g_{\pi(x)} = \inf\{\dege r: r \in \mathbb{L}_{>0}, \, \forall x \gg 0 \ (\pi(x+r(x)) -\pi(x) \geq 1 )\}.$$
\end{lemma}

\begin{proof}
Let $r \in \mathbb{L}_{>0}$.   By  Proposition \ref{simplepg},  one has
$$\pi(x+r(x)) -\pi(x) \geq 1, \quad \forall x \gg 0,$$
if and only if
$$g_n \leq r(p_n), \quad \forall n \gg 0,$$
if and only if
$$g_{\pi(x)} \leq r(p_{\pi(x)}), \quad \forall x \gg 0,$$
if and only if
$$g_{\pi(x)} \leq r(x), \quad \forall x \gg 0,$$
since each of the four conditions implies that $r$ is eventually increasing without bound, and since the latter three conditions are trivially equivalent.   It follows that
\begin{align*}
\dege g_{\pi(x)} & = \inf\{\dege r: r \in \mathbb{L}_{>0}, \, \forall x \gg 0 \ (g_{\pi(x)} \leq r(x)) \} \\
& =  \inf\{\dege r: r \in \mathbb{L}_{>0}, \, \forall x \gg 0 \ (\pi(x+r(x)) -\pi(x) \geq 1 )\}.
\end{align*}
This completes the proof.
\end{proof}

Now, we prove Theorem \ref{GTM}.

\begin{proof}[Proof of Theorem \ref{GTM}]
Statement (1) follows from Lemmas \ref{degeGcor0} and \ref{degeGcor}.
We have already verified statements (2) and (4).   Finally, statements (3) and (5) follow immediately from statements (1), (2), and (4), and statements (6) and (7) follow from statement (1),  Lemma \ref{degeGcor}, and Corollary \ref{lindelb}.
\end{proof}

Now, let $$g(x) = x-p_{\pi(x)},  \quad \forall x \geq 0.$$  Note that $p_{\pi(x)}$ is the largest prime less than or equal to $x$ (or $0$ if $x < 2$),  and thus $g(x) \geq 0$ is the distance from $x$ to the prime closest to $x$ from below.    It follows that $g(x)$ increases linearly (with slope $1$) from $0$ to $g_n$  on $[p_n,p_{n+1})$,  that is,  $g(x) = x-p_n$ on $[p_n,p_{n+1})$.  Thus, one has
$$g(p_{n+1}^-) = g_n$$
for all positive integers $n$ and
$$g(x) \leq g_{\pi(x)}$$
for all $x \geq 2$.

\begin{proposition}
One has
$$\dege g(x) = \dege G.$$
\end{proposition}

\begin{proof}
Clearly one has
$$\dege g(x) \leq \dege g_{\pi(x)} = \dege G.$$
It remains only to show that $\dege g_{\pi(x)} \leq \dege g$.
Let $r \in \mathbb{L}_{>0}$ with $g(x) \leq r(x)$ for all $x \gg 0$.
$$x-p_n = g(x) \leq r(x)$$
for all $x \in [p_n,p_{n+1})$ and $r$ is eventually continuous and increasing, one has
$$g_n = p_{n+1}-p_n \leq r(p_{n+1}),$$
for all $n \gg 0$.  Therefore, since $p_{\pi(x)} \leq x$ and thus $p_{\pi(x)+1}< 2x$ by the Bertrand--Chebyshev theorem, one has
$$g_{\pi(x)} \leq r(p_{\pi(x)+1}) < r(2x),$$
for all $x \gg 0$.   It follows that
$$\dege g_{\pi(x)} \leq \dege r(2x) = \dege r.$$
Taking the infimum over all $r$ as chosen, we find that $$\dege g_{\pi(x)} \leq \dege g(x),$$ as desired.
\end{proof}

Note that
$$\dege (x-p_{\li(x)})= \dege(\li-\pi) + (0,1,0,0,0,\ldots),$$
$$\dege (x-p_{\pi(x)})= \dege g = \dege G.$$
Note also that, since $\pi(p_x) = \lceil x \rceil$ for all $x \geq 0$, one has
$$\dege (x-p_{\pi(x)}) = \dege (\pi(p_x)-p_{\pi(x)}).$$

\begin{remark}[An alternatve maximal gap function]
$$\widetilde{g}_x =  \max_{k < x}  g_k, \quad \forall x \geq 0,$$
where $\widetilde{g}_x  = 0$ if $x \leq 1$.    Then one has
$$\widetilde{G}(x) = \widetilde{g}_{\pi(x)}, \quad \forall x \geq 0,$$
and, by Proposition \ref{supprop}, one has
$$\dege \widetilde{g}_x  = \dege g_n.$$
\end{remark}

\begin{remark}[Alternative expressions for $\dege g_n$]
Note that
$$\log \frac{p_{n+1}}{p_n} = \log \left(1+ \frac{g_n}{p_n} \right) \sim \frac{g_n}{p_n}  \ (n \to \infty),$$
so that
$$\dege \left(\log \frac{p_{n+1}}{p_n}\right) = \dege g_n + (-1,-1,0,0,0,\ldots).$$  Similarly, one has
$$\frac{\log p_{n+1}}{\log p_n}-1 = \frac{ \log \frac{p_{n+1}}{p_n}}{ \log p_n} \sim \frac{g_n}{p_n \log p_n}  \ (n \to \infty),$$
so that
$$\dege \left(\frac{\log p_{n+1}}{\log p_n}-1\right) = \dege g_n + (-1,-2,0,0,0,\ldots).$$
Thus, the results in this section can be recast in terms of the functions $\log \frac{p_{n+1}}{p_n}$ and $\frac{\log p_{n+1}}{\log p_n}-1$.
\end{remark}

The results in this section can be recast in terms of the gaps $ \widehat{p}_{n+1}- \widehat{p}_n$ between the {\bf  normalized primes}\index{normalized prime $\widehat{p}_n$} $$\widehat{p}_n = \Ri(p_n) \approx n\index[symbols]{.rt Pb@$\widehat{p}_n$}$$
discussed  briefly in the previous section.
Indeed, by the mean value theorem and the fact that
$$\Ri'(x) \sim \frac{1}{\log x} = \li'(x) \ (x \to \infty),$$ one has
$$\Ri(p_{n+1})-\Ri(p_n) \sim \li(p_{n+1})-\li(p_n) \sim \frac{g_n}{\log p_n} \ (n \to \infty),$$ so that
$$ \dege( \Ri(p_{n+1})-\Ri(p_n)) =\dege( \li(p_{n+1})-\li(p_n)) = \dege g_n+(0,-1,0,0,0,\ldots).$$

Note that the $n$th average prime gap is given by
$$\frac{1}{n}\sum_{k = 1}^n g_k = \frac{p_{n+1}-2}{n} \sim \log n \sim \log p_n \ (n \to \infty).$$
The quantity
$$\widehat{g}_n = \frac{g_n}{\log p_n}\index[symbols]{.ru N1@$\widehat{g}_n$}$$
is called the {\bf $n$th normalized prime gap},\index{normalized prime gap $\widehat{g}_n$} or the {\bf merit}\index{merit of the prime gap $g_n$} of the prime gap $g_n$.   The following well-known conjecture is an analogue of the Montgomery pair correlation conjecture for the normalized prime gaps.

\begin{conjecture}[{[54] [271]}]\label{poiss}
For all $0 \leq a \leq b$, one has
$$\frac{\# \left\{n \leq T: \widehat{g}_n \in (a,b] \right \} }{T} \sim  \int_a^b e^{-t} \,  dt  \  (T \to \infty).$$
\end{conjecture}

By \cite[Exercise 3]{sound}, Conjecture \ref{poiss} follows from the following conjecture.

\begin{conjecture}[{[271]}]\label{poissgen}
For all $\lambda > 0$ and all nonnegative integers $k$, one has
$$\frac{\# \{n \leq T: \pi(n+\lambda \log T)-\pi(n) = k \} }{T} \sim  \frac{\lambda^k}{k!} e^{-\lambda}  \  (T \to \infty).$$
\end{conjecture}

In 1976,   P.\ X.\ Gallagher proved that Conjecture \ref{poissgen} follows from a certain uniform version of the Hardy--Littlewood conjecture for prime $k$-tuples [98] [271].

One can recast Conjecture \ref{poiss}  in terms of the gaps between the normalized primes $\widehat{p}_n = \Ri(p_n)$ as follows.

\begin{conjecture}\label{poiss2}
For all $0 \leq a \leq b$, one has
$$\frac{\# \left\{n \leq T:   \widehat{p}_{n+1}- \widehat{p}_n \in (a,b] \right \} }{T} \sim  \int_a^b e^{-t} \,  dt  \  (T \to \infty).$$
Equivalently, one has
$$\frac{\# \left\{n \in \ZZ_{>0}:   \widehat{p}_n  \leq T, \, \widehat{p}_{n+1}- \widehat{p}_n \in (a,b] \right \} }{\# \left\{n \in \ZZ_{>0} : \widehat{p}_n \leq T \right\} } \sim  \int_a^b e^{-t} \,  dt  \  (T \to \infty),$$
where also
$$\# \left\{n \in \ZZ_{>0} : \widehat{p}_n \leq T \right\} = \pi(\Ri^{-1}(T)) \sim T \ (T \to \infty).$$
\end{conjecture}

Note that Conjecture \ref{poissgen} implies both Conjectures \ref{poiss} and \ref{poiss2}, which are likely equivalent.  Moreover, Conjecture \ref{poissgen} implies that, for all nonnegative integers $k$ and all $0 \leq a \leq b$, one has
$$\frac{\# \left\{n \leq T:   \widehat{p}_{n+k}- \widehat{p}_n \in (a,b] \right \} }{T} \sim  \int_a^b \frac{t^k}{k!} e^{-t} \,  dt  \  (T \to \infty).$$  The distribution $ \frac{t^k}{k!} e^{-t}$ is the {\bf gamma distribution with shape parameter $k+1$ and rate parameter $1$}, which has mean $k+1$ and variance $k+1$ and converges to the normal distribution with mean $k+1$ and variance $k+1$ as $k \to \infty$.   Section 8.6 provides an application of the gamma distribution $ \frac{t^k}{k!} e^{-t}$ to the prime counting function.

Further conjectures regarding the prime gaps are discussed in Section 14.6.

\chapter{ Diophantine approximation and continued fractions}

{\it Diophantine approximation} is the study of the approximation of real numbers by rational numbers. In this chapter, we apply degree and logexponential degree to the theories of Diophantine approximation and continued fractions.    We assume some familiarity with the theory of regular continued fractions (e.g., as contained in \cite[Chapter 9]{leve}), but not with  Diophantine approximation more broadly.

\section{The basics of Diophantine approximation}

In this chapter, we use the  notations $[a_0, a_1,a_2,\ldots,a_n]$  and $[a_0, a_1,a_2,\ldots]$ for the finite and infinite regular continued fractions
\begin{align*}
[a_0, a_1,a_2,\ldots,a_n] = a_0 +\cfrac{1}{a_1+\cfrac{1}{a_2+\cdots +\cfrac{1}{a_{n-1}+\cfrac{1}{a_{n}}}}} \in \QQ\index[symbols]{.t  Ha@$[a_0, a_1,a_2,\ldots,a_n]$}
\end{align*}
\begin{align*}
[a_0, a_1,a_2,\ldots] = a_0 +\cfrac{1}{a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\cdots}}} = \lim_{n \to \infty} [a_0, a_1,a_2,\ldots,a_n] \in \RR\backslash \QQ,\index[symbols]{.t  Hb@$[a_0, a_1,a_2,\ldots]$}
\end{align*}
respectively, where $a_0 \in \ZZ$ and $a_k \in \ZZ_{>0}$ for all $k> 0$.
For each nonnegative integer $k$, the integer $a_k$ is called the {\bf $k$th term}, or {\bf  $k$th partial quotient}, of the finite or infinite regular continued fraction above, and its {\bf $k$th convergent} $[a_0, a_1,a_2,\ldots,a_k]$  is written $\frac{p_k}{q_k}$ for unique relatively prime integers $p_k$ and $q_k$ with $q_k > 0$, where $k \leq n$ in the finite case.    The integers $p_k$ and $q_k$ satisfy identical recurrence relations of order $2$, namely,
$$p_k = a_k p_{k-1}+ p_{k-2}$$
$$q_k = a_k q_{k-1}+ q_{k-2}$$
for all $k \geq 1$,  with initial conditions $p_{-1} = 1$, $p_0 = a_0$, and $q_{-1} = 0$, $q_0 = 1$, respectively.

For any  $\alpha \in \RR\backslash \QQ$, there are unique integers $a_k = a_k(\alpha)$\index[symbols]{.u  a@$a_k(\alpha)$} with $a_k > 0$ for all $k > 0$ so that $\alpha = [a_0,a_1,a_2,\ldots]$.   The continued fraction $[a_0,a_1,a_2,\ldots]$ is called the {\bf regular continued fraction  (expansion)  of $\alpha$}.\index{regular continued fraction expansion} As with the terms $a_k$,  the $p_k= p_k(\alpha)$\index[symbols]{.u  b@$p_k(\alpha)$} and $q_k= q_k(\alpha)$\index[symbols]{.u  c@$q_k(\alpha)$} are uniquely determined by $\alpha$.    Any  $\alpha \in \QQ$, on the other hand, has exactly two finite regular continued fraction expansions,  where one has
$$\alpha = [a_0, a_1,a_2,\ldots,a_n] = [a_0, a_1,a_2,\ldots,a_{n-1},a_n-1,1]$$
if $a_n > 1$ or $n = 0$.   Nevertheless,  the $p_k= p_k(\alpha)$\index[symbols]{.u  b@$p_k(\alpha)$} and $q_k= q_k(\alpha)$\index[symbols]{.u  c@$q_k(\alpha)$} are both uniquely determined by $\alpha \in \QQ$,  where,  for $\alpha = [a_0, a_1,a_2,\ldots,a_n]$, we let $p_k(\alpha) = p_n(\alpha)$ and $q_k(\alpha) = q_n(\alpha)$, so that $\alpha = \frac{p_k(\alpha)}{q_k(\alpha)}$, for all $k \geq n$.

Let  $$S: (-\infty,\infty]  \longrightarrow (1,\infty] $$ be given by
$$S(\alpha)=   \left.
\begin{cases}
\frac{1}{\alpha-\lfloor \alpha \rfloor} & \text{if } \alpha \notin \ZZ\cup \{ \infty\}   \\
\infty  & \text{if } \alpha \in \ZZ\cup \{ \infty\}.\index[symbols]{.u  d@$S(\alpha)$}
\end{cases}
\right.$$
We call the function $S$ the {\bf regular continued fraction operator}.\index{regular continued fraction operator $S$}
If we write
$$[a_0, a_1,a_2,\ldots,a_n] =[a_0, a_1,a_2,\ldots,a_n,\infty,\infty,\infty,\ldots],$$
then the regular continued fraction expansion of any $\alpha \in \RR$ is given by
\begin{align}\label{regcontfrac}
\alpha =  [\lfloor  \alpha \rfloor, \lfloor S(\alpha) \rfloor,    \lfloor S(S(\alpha)) \rfloor,    \lfloor S(S(S(\alpha)))\rfloor, \ldots],
\end{align}
where we set $\lfloor \infty \rfloor  = \infty$.    Thus, $\alpha$ is rational if and only if $S^{\circ n}(\alpha) = \infty$ for  some nonneagtive  integer $n$,  if and only if the regular continued fraction of $\alpha$  terminates in a tail of $\infty$s, and in fact (\ref{regcontfrac}) always yields the shorter of the two  regular continued fraction expansions of $\alpha$ in that case.   With these conventions, one has
$$a_n(\alpha) = \lfloor S^{\circ n}(\alpha) \rfloor$$
$$ S^{\circ n}(\alpha) = [a_n(\alpha), a_{n+1}(\alpha), a_{n+2}(\alpha),\ldots]$$
for all $\alpha \in \RR$ and all nonnegative integers $n$.    Moreover, by \cite[Theorem 9.5]{leve}, one has
\begin{align}\label{cfineq00}
S^{\circ (n+1)}(\alpha) = -\frac{q_{n-1}(\alpha)\alpha-p_{n-1}(\alpha)}{q_{n}(\alpha)\alpha-p_{n}(\alpha)}
\end{align}
for all nonnegative integers $n$ for which $S^{\circ (n+1)}(\alpha) \neq \infty$, while also $S^{\circ (n+1)}(\alpha) = \infty$ if and only if $\alpha = \frac{p_n(\alpha)}{q_n(\alpha)}$.

Let $\alpha \in \RR$ and $n$ a positive integer with $S^{\circ (n+1)}(\alpha) \neq \infty$.  One has
$$a_n(\alpha) = \left\lfloor \frac{a_{n}(\alpha)q_{n-1}(\alpha)+q_{n-2}(\alpha)}{q_{n-1}(\alpha)}  \right\rfloor = \left\lfloor \frac{q_{n}(\alpha)}{q_{n-1}(\alpha)}  \right\rfloor,$$
and therefore
\begin{align}\label{cfineqa}
\frac{q_{n}(\alpha)}{q_{n-1}(\alpha)} = [a_n(\alpha),a_{n-1}(\alpha),\ldots,a_1(\alpha)].
\end{align}
By \cite[Theorem 9.9]{leve},  one has
\begin{align}\label{cfineq0}
\alpha -\frac{p_n(\alpha)}{q_n(\alpha)}  = \frac{ (-1)^n}{q_n(\alpha) ( q_n(\alpha) S^{ \circ(n+1)} (\alpha)+q_{n-1}(\alpha))}
\end{align}
and therefore
\begin{align}\label{cfineq}
\frac{1}{2q_n(\alpha) q_{n+1}(\alpha) } < \frac{1}{q_n(\alpha) (q_{n+1}(\alpha)+q_{n}(\alpha) )} < \left| \alpha -\frac{p_n(\alpha)}{q_n(\alpha)} \right|< \frac{1}{q_n(\alpha)  q_{n+1}(\alpha)}.
\end{align}
The relations (\ref{cfineq00})--(\ref{cfineq}) above are fundamental to the theory of  continued fractions and are used on several occasions in this chapter.

%\frac{ q_{n+2}(\alpha)}{q_n(\alpha) (1+\frac{q_{n}(\alpha) )}{ q_{n+1}(\alpha)})} < \frac{ \left| \alpha -\frac{p_n(\alpha)}{q_n(\alpha)} \right|}{\left| \alpha -\frac{p_{n+1}(\alpha)}{q_{n+1}(\alpha)} \right|}< \frac{q_{n+2}(\alpha)+q_{n+1}(\alpha)} {q_n(\alpha)}.

Throughout this chapter, we let
$$\Phi = \frac{1+\sqrt{5}}{2} =  [1,1,1,\ldots]\index[symbols]{.u  k@$\Phi$}$$
denote the {\bf golden ratio}.  We also let $F_n$\index[symbols]{.u  l@$F_n$} denote the $n$th Fibonacci number,  where $F_0 = 0$ and $F_1 = 1$, so that $F_n \sim \frac{1}{\sqrt{5}} \Phi^n \ (n \to \infty)$ and $\log F_{n} \sim n \log \Phi \ (n \to \infty)$.   Note that, by the recurrence relation for the $q_n(\alpha)$ and the $F_n$, one has $q_n(\alpha) \geq F_{n+1} = q_n(\Phi)$ for any irrational $\alpha$ and for every nonnegative integer $n$.

Now, let $\alpha \in \RR$.   We let
$$\ord_1 \alpha = \# ((1,\alpha)\ZZ/\ZZ),\index[symbols]{.u  e@$\ord_1 \alpha$}$$
denote the {\bf order of $\alpha$ modulo $1$},\index{order modulo $1$}
where $(1,\alpha)\ZZ/\ZZ$ is the subgroup of the circle group $\RR/\ZZ$ generated by $\overline{\alpha} = \alpha+\ZZ$.  In other words,  $\ord_1  \alpha$ is the order of $\overline{\alpha}$ in the abelian group $\RR/\ZZ$.
This defines a map
$$\ord_1: \RR  \longrightarrow \ZZ_{>0} \cup \{\infty\}.$$
We also  let
$$\left|\alpha\right|_1 = \frac{1}{\ord_1 \alpha}\index[symbols]{.u  f@$\vert\alpha\vert_1$}$$
for all $\alpha \in \RR$, where $\frac{1}{\infty} = 0$.
If $\frac{a}{b} \in \QQ$, where $a,b \in \ZZ$ are relatively prime and $b >0$, then one has
\begin{align*}
\ord_1 \frac{a}{b} = b
\end{align*}
\begin{align*}
\left|\frac{a}{b}\right|_1 = \frac{1}{b}.
\end{align*}
On the other hand,  one has $\ord_1 \alpha = \infty$ and $\left|\alpha\right|_1  = 0$
for all $\alpha \in \RR\backslash \QQ$.  The following proposition provides some basic properties of the maps $\ord_1$ and $|\!-\!|_1$.

\begin{proposition}
Let $r,s \in \QQ$ and $n,k \in \ZZ$ with $k > 0$. One has the following.
\begin{enumerate}
\item $\ord_1 r$ is the smallest $b \in \ZZ_{>0}$ such that $br \in \ZZ$.
\item $\ord_1 r = 1$ if and only if $|r|_1 = 1$, if and only if $r \in \ZZ$.
\item $|r|_1 = |r+n|_1 = |\{r\}|_1 = |-r|$.
\item If $r = \frac{a}{b}$, where $a, b \in \ZZ$ and $b \neq 0$, then $\ord_1 r =  \frac{|b|}{\gcd(a,b)}$ divides $b$ and $|r|_1 \geq \frac{1}{|b|}$.
\item $\ord_1(r+s) \mid \operatorname{lcm}( \ord_1 r, \ord_1 s)$.
\item $\ord_1(rs) \mid \ord_1 r \ord_1 s$.
\item $|r+s|_1 \geq |r|_1|s|_1$.
\item $|rs|_1 \geq |r|_1|s|_1$.
\item One has $\ord_1 r = k$ if and only if $\{r\} = \tfrac{a}{k}$ with $\gcd(a, k) = 1$ and $a \in [0,k-1]$.
\item There are exactly $\phi(k)$ elements $\overline{\alpha} = \alpha+\ZZ$ of $\QQ/\ZZ$  (or  of $\RR/\ZZ$)  with $\ord_1 \alpha  = k$.
\item For all $x \geq 1$, there are exactly $\sum_{k \leq x} \phi(k)$  elements $\overline{\alpha} = \alpha+\ZZ$ of $\RR/\ZZ$ (or of $\RR/\ZZ$) with $\ord_1 \alpha \leq x$.
\item For all $\alpha \in \RR$, one has
$$\left|\alpha\right|_1= \inf \, (1,\alpha)\ZZ \cap \RR_{>0} = \inf\left\{m+n \alpha: m,n \in \ZZ \text{ and } m+n \alpha  > 0\right \}.$$
\end{enumerate}
\end{proposition}

For any $x \in \RR$, let $\operatorname{nint}(x)$\index[symbols]{.u  g@$\operatorname{nint}(x)$}  denote the nearest integer  to $x$, which is equal to the floor of $x$ or the ceiling of $x$, whichever is closer to $x$.  Of course, there is ambiguity here in the case where $x$ is half an odd integer: in that case, we assume that $\operatorname{nint}(x)$ is even.   Thus, for example, one has $\operatorname{nint}(1/2) = 0$ and $\operatorname{nint}(3/2) = 2$.  For all $x \in \RR$,  we let
$$\Vert x\Vert  = |x-\operatorname{nint}(x)| = \min\{|x-n|: n \in \ZZ\} = \min(\{x\},1-\{x\}) \in [0,\tfrac{1}{2}]\index[symbols]{.u  h@$\Vert\alpha\Vert$}$$
denote the distance from $x$ to the nearest integer.   The function $\Vert \!-\! \Vert: \RR \longrightarrow [0,\frac{1}{2}]$ is continuous, even, and periodic of period $1$ and equals $|x|$ on $[-\frac{1}{2},\frac{1}{2}]$ and thus has the Fourier series representation
$$\Vert x\Vert  = \frac{1}{4}  - \frac{2}{\pi^2}\sum_{n = 0}^\infty \frac{\cos (( 2n+1)2\pi x)}{(2n+1)^2}, \quad \forall x \in \RR,$$
where $\frac{1}{4} $ is the average value of $\Vert x\Vert$ over any full period,  i.e.,  over any interval of length $1$ (or of any positive integer length).    Moreover,  any function $f:\RR \longrightarrow \overline{\RR}$ is even and periodic, with $1$ as a period, if and only if $f(x) = f(\Vert x\Vert)$ for all $x \in \RR$, if and only if $f$ factors through the map  $\Vert \!-\!\Vert$.   By contrast, a function $f:\RR \longrightarrow \overline{\RR}$ is periodic, with $1$ as a period, if and only if $f(x) = f(\{x\})$ for all $x \in \RR$, if and only if $f$ factors through the map  $\{ - \}$.   Note also that the map $d(x,y) = \Vert x-y\Vert $ is a metric on the circle group $\RR/\ZZ$ inducing its topology as a topological group (or as a one-dimensional compact  Lie group), and in fact the map  $\Vert \!-\! \Vert$ is a {\it norm} on the  group $\RR/\ZZ$, in the sense of [83].    Moreover, one has $\Vert x \Vert    =  \Vert y \Vert$,  if and only if $\overline{x} = \pm\overline{y}$ in $\RR/\ZZ$, if and only if $x= \pm y + n$ for some $n \in \ZZ$.

Propositions \ref{vert1}--\ref{dirapproxthm} below are the first of several results in this chapter that reveal connections between the Diophantine approximation properties of a real number $\alpha$ and the properties of the arithmetic function $\Vert n\alpha \Vert$.
The first two of these are easily verified.

\begin{proposition}\label{vert1}
Let $\alpha \in \RR$, and let $n$ be  a positive integer.   One has
$$\frac{\Vert n \alpha \Vert }{n} = \left|  \alpha - \frac{\operatorname{nint}(n\alpha)}{n}\right| = \min \left\{| \alpha-r|: \text{$r \in\QQ$ and $\ord_1 r \mid n$}\right\},$$ where
$$|n \alpha-\operatorname{nint}(n\alpha)|  = \Vert n\alpha \Vert  \leq \frac{1}{2},$$
or, equivalently,
$$\left|\alpha-\frac{\operatorname{nint}(n\alpha)}{n} \right| = \frac{\Vert n \alpha \Vert }{n}  \leq \frac{1}{2n}.$$
If the inequalities above are strict, then $\frac{\operatorname{nint}(n\alpha)}{n}$ is the closest rational number $r$ to $\alpha$ with $\ord_1 r \mid n$.  Moreover, equalities hold if and only if $n\alpha \in 2\ZZ\pm \frac{1}{2}$, and, if equalities hold, then  $\alpha \in \QQ$, and both  $\frac{\operatorname{nint}(n\alpha)}{n}$ and $\frac{\operatorname{nint}(n\alpha) \mp 1}{n}$ are  the closest rational numbers $r$ to $\alpha$ with $\ord_1 r \mid n$, where the sign of $\mp 1$ is opposite that of $\pm \frac{1}{2}$ and is uniquely determined by $\alpha$.
\end{proposition}

\begin{proposition}
Let $\alpha \in \RR$.   Then $\alpha$ is irrational if and only if  the arithmetic function $\Vert n\alpha \Vert$ is injective, if and only if the image of the arithmetic function $\Vert n\alpha \Vert$ is dense in $[0,\frac{1}{2}]$.  Moreover,  the following conditions are equivalent.
\begin{enumerate}
\item  $\alpha$ is rational.
\item  The arithmetic function $\Vert n\alpha \Vert$ is periodic (of period $\ord_1 \alpha$).
\item The arithmetic function $\Vert n\alpha \Vert$ has zeros (precisely at the multiples of  $\ord_1 \alpha$).
\item  The image of the arithmetic function $\Vert n\alpha \Vert$ is finite (and equal to $|\alpha|_1 \ZZ \cap [0,\frac{1}{2}]$,  of cardinality $1+ \left \lfloor \frac{\ord_1 \alpha}{2}\right \rfloor$).
\end{enumerate}
\end{proposition}

Let $\alpha \in \RR$.  One says that a rational number $r$ is a {\bf best rational approximation of $\alpha$ (of the first kind)} if $|\alpha -r| < |\alpha - s|$  for all rational numbers $s \neq r$ with $\ord_1 s \leq \ord_1 r$ \cite[p.\ 21]{khin}.   By \cite[Theorems 15--17]{khin}, every convergent of the regular continued fraction expansion of $\alpha$ is a best rational approximation of $\alpha$, and, reversely, every best rational approximation of $\alpha$ is either a convergent or an {\it intermediate fraction} of the regular continued fraction expansion of $\alpha$.    In particular, the denominators of the best rational approximations of $\alpha$ form an increasing sequence that contains the sequence $q_n(\alpha)$ as a subsequence.    For $\alpha = \pi$, for example,  these sequences are OEIS Sequence A063673, given by $1, 4, 5, 6, 7, 57, 64, 71, 78, 85, 92, 99, 106, 113, 16604, 16717,\ldots$,  and OEIS Sequence A002486, given by  $1, 7, 106, 113, 33102, 33215, 66317,\ldots$, respectively.

One says that a rational number $\frac{a}{b}$ with $a,b \in \ZZ$ and $b \neq 0$ is a {\bf best rational approximation of $\alpha$ of the second kind} if $|b\alpha -a| < |d\alpha - c|$  for all $c,d \in \ZZ$ with $0< |d| \leq |b|$  and $\frac{a}{b} \neq \frac{c}{d}$ (which implies that $\gcd(a,b) = 1$ and therefore $|b| = \ord_1 \frac{a}{b}$) \cite[p.\ 24]{khin}.      By Proposition \ref{denomschar} below, any best rational approximation of the second kind is a best rational approximation of the first kind.   By \cite[Theorems 16 and 17]{khin}, the convergents of the regular continued fraction expansion of an irrational number $\alpha$ are precisely the best rational approximations of $\alpha$ of the second kind.

The following result follows from the definitions and remarks above.

\begin{proposition}\label{denomschar}
Let $\alpha \in \RR$ be irrational.
\begin{enumerate}
\item The denominators $q_k(\alpha)$ of the convergents of the regular continued fraction expansion of $\alpha$ for $k \geq 0$ are precisely those positive integers $n$ such that  $\Vert n \alpha \Vert < \Vert m \alpha \Vert$ for all positive integers $m < n$.   Equivalently,  the points of discontinuity of the step function $\min\left \{\Vert n\alpha \Vert : n \leq x \right \}$ occur precisely at $x = q_k(\alpha)$ for $k \geq 0$.   Moreover, the $q_k(\alpha)$ are precisely the denominators of the best rational approximations of $\alpha$ of the second kind.
\item The denominators of the best rational approximations of $\alpha$ are precisely those positive integers $n$ such that  $\frac{\Vert n \alpha \Vert}{n} < \frac{ \Vert m \alpha \Vert}{m}$ for all positive integers $m < n$.   Equivalently,   the denominators of the best rational approximations of $\alpha$ are precisely the  points of discontinuity of the step function
\begin{align*}
\mu_\alpha(x) & =  \min\left \{\frac{\Vert n\alpha \Vert }{n} : n \leq x \right \} \\
& =  \min\left\{ | \alpha-r|: \text{$r \in\QQ$ and $\ord_1 r \leq x$} \right\} \\
& =  \min\left\{ \left| \alpha-\frac{a}{b}\right|: \text{$a,b \in\ZZ$ and $1 \leq b \leq x$} \right\}
\end{align*}
on $[1,\infty)$.
\item The step functions in (1) and (2) are positive, nonincreasing with limit $0$, and continuous from the right.
\item For all positive integers $n$, one has
$$\operatorname{nint}(q_n(\alpha)\alpha)= p_n(\alpha)$$
$$\frac{\Vert q_n(\alpha)\alpha) \Vert}{q_n(\alpha)} = \left| \alpha- \frac{p_n(\alpha)}{q_n(\alpha)} \right|.$$
\end{enumerate}
\end{proposition}

A general problem in Diophantine approximation is to find explicit bounds on the function $\mu_\alpha(x)$ for various irrationals or classes of irrationals $\alpha$ [87].

The following theorem is known as {\bf Dirichlet's approximation theorem}\index{Dirichlet's approximation theorem} and  is a simple  consequence of the pigeonhole principle.

\begin{proposition}[Dirichlet's approximation theorem]\label{dirapproxthm}
Let $\alpha \in \RR$.   For any real number $x \geq 1$, there exist integers $a$ and $b$ with $1\leq b \leq x$ such that
$$\left|b\alpha -a\right| < {\frac {1}{\lfloor x\rfloor}} \leq \frac{1}{b},$$
i.e., such that
$$\left|\alpha -\frac{a}{b}\right| < {\frac {1}{\lfloor x\rfloor b}} \leq \frac{1}{b^2}.$$
Equivalently, one has
$$\min\left \{\Vert n\alpha \Vert : n \leq x \right \}<   {\frac {1}{\lfloor x\rfloor}}$$
for all $x \geq 1$.  Consequently, one has $\Vert n \alpha \Vert < \frac{1}{n}$ for infinitely many positive integers $n$.
\end{proposition}

\begin{proof}
Consider the $\lfloor x \rfloor$ disjoint intervals $[k/\lfloor x \rfloor,(k+1)/\lfloor x \rfloor))$ of length $\frac{1}{\lfloor x \rfloor}$  for $k = [0,\lfloor x \rfloor-1]$, whose union is $[0,1)$, and the $\lfloor x \rfloor+1$ fractional parts $\{k\alpha\} \in [0,1)$ for $k \in [0,\lfloor x \rfloor]$.
By the pigeonhole principle, there exist integers $k>l$ in $[0,\lfloor x \rfloor]$ such that
$$|b\alpha - a| =  |\{k\alpha \} -\{l\alpha\}| < \frac{1}{\lfloor x\rfloor},$$
where $b = k-l \in [1,\lfloor x \rfloor]$ and $a = \lfloor  k\alpha\rfloor  -\lfloor  l\alpha\rfloor$.
\end{proof}

\begin{corollary}\label{dircor}
Let $\alpha \in \RR$.   For any real number $x \geq 1$, there exists a rational number $r$ with $\ord_1 r \leq x$ and
$$\left|\alpha -r\right| < {\frac {1}{\lfloor x\rfloor }}|r|_1 \leq |r|_1^2.$$
\end{corollary}

The following well-known result illustrates why,  in studying the rational approximations of a real number, one can often restrict one's attention to the convergents of its regular continued fraction expansion.   It is thus one of the main reasons that continued fractions are a central tool in the theory of Diophantine approximation.

\begin{theorem}[{\cite[Theorems 9.9 and 9.10]{leve} \cite[Theorem 18]{khin}}]\label{ccfa}
Let $\alpha \in \RR$.   For every convergent $\frac{p_n(\alpha)}{q_n(\alpha)}$  of the regular continued fraction expansion of $\alpha$,  one has
$$\left | \alpha -\frac{p_n(\alpha)}{q_n(\alpha)} \right| < \frac{1}{q_n(\alpha)^2},$$
and, if $n > 0$, then  at least one of $\frac{a}{b} = \frac{p_n(\alpha)}{q_n(\alpha)}$ and $\frac{a}{b} =\frac{p_{n-1}(\alpha)}{q_{n-1}(\alpha)}$ satisfies
$$\left | \alpha -\frac{a}{b} \right| < \frac{1}{2b^2}.$$
Conversely, if $a,b \in \ZZ$ with $b \neq 0$ and
$$\left | \alpha -\frac{a}{b} \right| < \frac{1}{2b^2},$$
then $\gcd(a,b) = 1$ and $\frac{a}{b}$ is a convergent of the regular continued fraction expansion of $\alpha$.
\end{theorem}

Let $f: \ZZ_{>0} \longrightarrow \RR_{\geq 0}$ be a nonnegative real-valued arithmetic function, and let $\alpha \in \RR$.     Let us write
$$\alpha \gg_1 f\index[symbols]{.u  i@$\gg_1$}$$
if there are only finitely many $r \in \QQ$ such that $$\left|\alpha -r \right| < f(\ord_1 r).$$
that is, if  one has
$$\left|\alpha -r \right| \geq f(\ord_1 r)$$
for all but finitely many  $r \in \QQ$.
Let us also write
$$\alpha \ggg_1 f\index[symbols]{.u  j@$\ggg_1$}$$
if $$\left|\alpha -r \right| \geq f(\ord_1 r)$$
for all $r \in \QQ$ with $r \neq \alpha$, that is, if $\left|\alpha -r \right| < f(\ord_1 r)$ implies $r = \alpha$,  for all $r \in \QQ$.   Note that
$\alpha \ggg_1 f$ implies $\alpha \gg_1 f$,  and both conditions are specific restrictions on how well $\alpha$ can be approximated by rational number.   More precisely,  the conditions $\alpha \gg_1 f$ and $\alpha \ggg_1 f$ place restrictions on how many rational numbers with denominator exactly $d$ are within $f(d)$ of $\alpha$,      for all $d \gg 0$,  or for all $d$ in total,  respectively.   Not only do these two notations allow us to shorten the statements of several definitions and results in this chapter,  but they also suggest various analogies between definitions and results in the theory of Diophantine approximation and those in algebraic asymptotic analysis.  They are meant, specifically, to be suggestive of the notation $f(x)\gg g(x) \ (x \to a)$.

Either by iterating Corollary \ref{dircor} or by applying Theorem \ref{ccfa}, one obtains the following.

\begin{corollary}\label{dirapproxcor}
Let $\alpha \in \RR$ be irrational.    Then $\alpha \not \gg_1  n^{-2}$, that is, there exist infinitely many rational numbers $r$ such that $|\alpha - r| <  |r|_1^2$.
\end{corollary}

Again, let $f: \ZZ_{>0} \longrightarrow \RR_{\geq 0}$ be a nonnegative real-valued arithmetic function, and let $\alpha \in \RR$.     We also write
$$\alpha \succ_1 f\index[symbols]{.u  ja@$\succ_1$}$$ if  there are only  finitely many pairs $(a,b)$ of  integers with $b > 0$ and
$$\left|\alpha-\frac{a}{b}\right|< f(b).$$   Note that $\alpha \succ_1 f$ implies $\alpha \gg_1 f$, but not conversely.
The following proposition provides some basic properties of the relations $ \gg_1$, $\ggg_1$, and $\succ_1$.

\begin{proposition}\label{basicrelations}
Let $\alpha \in \RR$, and let $f,g: \ZZ_{>0} \longrightarrow \RR_{\geq 0}$ be nonnegative real-valued  arithmetic functions.   One has the following.
\begin{enumerate}
\item For all $x \geq 1$, there are only finitely many pairs $(a,b)$ of integers $a$ and $b$ with
$$\left|\alpha -\frac{a}{b} \right| < f(b)$$
and $1 \leq b \leq x$.
\item For all $x \geq 1$, there are only finitely many $r \in \QQ$ such that
$$\left|\alpha -r \right| < f(\ord_1 r)$$
and $\ord_1 r \leq x$.
\item  One has $\alpha \gg_1 f$ if and only if there are only finitely many pairs $(a,b)$ of relatively prime integers $a$ and $b$  with $b > 0$ and
$$\left|\alpha -\frac{a}{b} \right| < f(b),$$  if and only if
$$\left|\alpha -\frac{a}{b} \right| \geq f(b)$$
for all relatively prime integers $a$ and $b$  with $b > 0$ and $b \gg 0$, if and only if
$$\left|\alpha -r \right| \geq f(\ord_1 r)$$
for all $r \in \QQ$ with $\ord_1 r \gg 0$.
\item One has $\alpha \succ_1 f$ if and only if $$\left|\alpha-\frac{a}{b}\right| \geq f(b)$$ for all integers $a$ and $b$ with $b > 0$ and $b\gg 0$, if and only  if $\frac{\Vert n\alpha \Vert}{n} \geq f(n)$ for all   $n \gg 0$, if and only if there are only finitely many positive integers $n$ such that $\frac{\Vert n\alpha \Vert}{n} < f(n)$.
\item For all $n \in \ZZ$, one has $\alpha \gg_1 f$ if and only if $\alpha +n \gg_1 f$, if and only if $-\alpha \gg_1 f$.
\item For all $n \in \ZZ$, one has $\alpha \ggg_1 f$ if and only if $\alpha +n \ggg_1 f$, if and only if $-\alpha \ggg_1 f$.
\item For all $n \in \ZZ$, one has $\alpha \succ_1 f$ if and only if $\alpha +n \succ_1 f$, if and only if $-\alpha \succ_1 f$.
\item If $f(n) \geq g(n)$ for all $n \gg 0$, then $\alpha \gg_1 f$ implies $\alpha \gg_1 g$.
\item If $f(n) \geq g(n)$ for all $n$, then $\alpha \ggg_1 f$ implies $\alpha \ggg_1 g$.
\item If $f(n) \geq g(n)$ for all $n \gg 0$, then $\alpha \succ_1 f$ implies $\alpha \succ_1 g$.
\item If $\alpha \ggg_1 f$, then  $\alpha \gg_1 f$.
\item If $\alpha \succ_1 f$, then  $\alpha \gg_1 f$.
\item If $\alpha \gg_1 f$, then there exists a $C > 0$ such that $\alpha \ggg_1 Cf$.
\item Suppose that $\alpha$ is irrational and that $\lim_{n \to \infty} f(n) = 0$.   Then  $\alpha \gg_1 f$  if and only if $\alpha \succ_1 f$.
\item Suppose that $\alpha$ is irrational, and let  $t  > 0$.  Then one has $\alpha \gg_1 n^{-t}$ if and only if $\alpha \succ_1 n^{-t}$, if and only if there are only finitely many pairs $(a,b)$ of integers $a$ and $b$  with $b> 0$ and
$$\left|\alpha -\frac{a}{b} \right| < \frac{1}{b^t},$$ if and only if $\frac{\Vert n\alpha \Vert}{n}  \geq \frac{1}{n^{t}}$ for all $n \gg 0$.
\item  Suppose that $f(n) > 0$ for all $n \gg 0$.  Then there are uncountably many $\beta \in \RR$ such that $\beta \not \gg_1 f$.
\end{enumerate}
\end{proposition}

\begin{proof}
For all positive integers $b$, there are only finitely many integers $a$ such that $|b\alpha-a|< bf(b)$, i.e., such that $|\alpha - a/b|<f(b)$.   Statements (1)--(4) follow, and statements (5)--(12) are trivial to check.  To prove (13), suppose that $\alpha \gg_1 f$, so that there exists an $N$  such that  $$\left|\alpha -r \right| \geq f(\ord_1 r)$$
for all $r \in \QQ$ with $\ord_1 r > N$.  Let
$$C = \min\{|\alpha-r|f(\ord_1 r)^{-1}: r \in \QQ\backslash\{\alpha\},\, \left|\alpha -r \right| < f(\ord_1 r), \text{ and } \ord_1 r \leq N\}.$$
Then $C \in (0,1)$.    It follows that, for all $r \in \QQ$,  one has
$$\left|\alpha -r \right| \geq f(\ord_1 r) \geq Cf(\ord_1 r)$$
if $\ord_1 r > N$,  while, if
$\ord_1 r \leq N$ and   $$\left|\alpha -r \right| < Cf(\ord_1 r) < f(\ord_1 r),$$
$$\left|\alpha -r \right| f(\ord_1 r)^{-1} \geq C$$
if $r \neq \alpha$, which is impossible.   Therefore, one has $\alpha \ggg_1 Cf$.   This proves (13).

Next, we prove (14).  Suppose that $\alpha$ is irrational and $\alpha \gg_1 f$, and  let $(a,b)$ be any  of the finitely many pairs of relatively prime integers $a$ and $b$  with $b > 0$ and
$$\left|\alpha -\frac{a}{b} \right| < f(b).$$
Since $\left|\alpha -\frac{a}{b} \right|> 0$ and $\lim_{c \to \infty} f(cb) = 0$, one has
$$\left|\alpha -\frac{ca}{cb} \right|  = \left|\alpha -\frac{a}{b} \right| >  f(cb)$$
for all $c \gg 0$.
It follows that there are only finitely many pairs $(a',b') = (ca,cb)$ with $c > 0$ and
$$\left|\alpha -\frac{a'}{b'} \right| \leq  f(b')$$ corresponding to each pair $(a,b)$,
whence $\alpha \succ_1 f$.  Statements (14) and  (15) follow.  Finally, statement (16) follows from the proof of  \cite[Theorem 22]{khin} (which is a simple application of the theory of continued fractions).
\end{proof}

The following result,  known as {\bf Hurwitz's theorem},\index{Hurwitz's theorem}  was proved by Hurwitz in 1891 and is an optimized version of Corollary \ref{dirapproxcor}.

\begin{theorem}[{Hurwitz's theorem [131]}]
Let $\alpha \in \RR$.  Then  $\alpha$ is irrational if and only if  there are infinitely many rational numbers $r$ such that
$$\left|\alpha -r \right| < \frac{1}{\sqrt{5}} \left|r\right|_1^2,$$ if and only if
$$\alpha \not \gg_1 \frac{1}{\sqrt{5}}n^{-2}.$$
Moreover,  one has
$$\Phi \gg_1  t n^{-2}$$
for all $t < \frac{1}{\sqrt{5}}$, so the constant  $\frac{1}{\sqrt{5}}$ is optimal.
\end{theorem}

We also note the following result, which is complementary to Hurwitz's theorem.

\begin{proposition}\label{dioprop}
Let $\alpha \in \QQ$.   Then there are infinitely many $r \in \QQ$ such that
$$\alpha- r  = |\alpha|_1 |r|_1,$$
and therefore
$$\alpha  \not \gg_1  t n^{-1}$$
for all  $t > |\alpha|_1$.
Moreover, one has
$$\left|\alpha- r \right| \geq |\alpha|_1 |r|_1$$
for all $r \in \QQ\backslash \{\alpha\}$, that is, one has
$$\alpha \ggg_1 |\alpha|_1 n^{-1}.$$
\end{proposition}

\begin{proof}
Let $\alpha = \frac{a}{b}$, where $a$ and $b$ are relatively prime integers and $b > 0$.   For any integers $x$ and $y$ such that $ay-bx = 1$ and $y \neq 0$, one has
$$\alpha - r  = \frac{1}{by} = |\alpha|_1 |r|_1,$$
where $r = \frac{x}{y}$.  Since there are infinitely many (necessarily relatively prime) pairs $(x,y)$ of such integers,  the first statement follows.  To prove the second statement, let $r =  \frac{x}{y}$, where  $x$ and $y$ are relatively prime integers and $y > 0$.   Then one has
$$|\alpha - r| = \frac{|ay-bx|}{by} \geq \frac{1}{by} = |\alpha|_1 |r|_1$$
if $\alpha  \neq r$, that is, if $ay-bx \neq 0$.
\end{proof}

The following remarkable result, proved by Koukoulopoulos  and Maynard  in 2019,   settled two important conjectures in the positive,  namely,  the {\bf Duffin--Schaeffer conjecture} and {\bf Catlin's conjecture}. \index{Duffin--Schaeffer conjecture}  As is usual with deep theorems, there is a long chain of partial results preceding it: for a survey, see [158].

\begin{theorem}[{\cite[Theorems 1 and 2]{kou2}}]\label{duffin}
Let  $f: \ZZ_{>0} \longrightarrow \RR_{\geq 0}$ be a nonnegative real-valued arithmetic function.   For all positive integers $n$, let
$$f^*(n) =  \sup\left\{ f(kn) : k \in \ZZ_{>0}\right\},$$ so that  $f^*$ is the smallest extended real-valued function greater than equal to $f$ such that $f^*(a) \geq f^*(b)$ if $a \mid b$.   One has the following.
\begin{enumerate}
\item  If $\sum_{n = 1}^\infty \phi(n) f(n) < \infty$, then  $\alpha \gg_1 f$  for almost all $\alpha \in \RR$.  On the other hand, if
$\sum_{n = 1}^\infty \phi(n) f(n) = \infty$, then $\alpha \not \gg_1 f$  for almost all $\alpha \in \RR$.
\item  If $\sum_{n = 1}^\infty \phi(n) f^*(n)  < \infty$, then $\alpha \succ_1 f$   for almost all $\alpha \in \RR$.  On the other hand, if $\sum_{n = 1}^\infty \phi(n) f^*(n)  = \infty$, then $\alpha \not \succ_1 f$  for almost all $\alpha \in \RR$.
\end{enumerate}
\end{theorem}

Note, of course, that if $f$ is nonincreasing, then $f^* = f$ and thus the convergence conditions in statements (1) and (2) of the theorem are equivalent.   Likewise, if $\lim_{n \to \infty} f(n) = 0$, then  $\alpha \gg_1 f$ is equivalent to $\alpha \succ_1 f$.

\begin{remark}[Littlewood's conjecture]
{\bf Littlewood's conjecture},\index{Littlewood's conjecture} proposed by Littlewood around 1930, states that, for all $\alpha,\beta \in \RR$, one has
$$ \liminf _{n\to \infty }\ n\,\Vert n\alpha \Vert \,\Vert n\beta \Vert =0,$$
or, equivalently,  for every $\varepsilon > 0$, there exist infinitely many positive integers $n$ such that
$$n\,\Vert n\alpha \Vert \,\Vert n\beta \Vert < \varepsilon.$$
\end{remark}

\begin{remark}[On the integral $\int_1^\infty \frac{\Vert x\Vert}{x^{s+1}}\, dx $]\label{vertremark}
For all $s \in  \CC$ with $\operatorname{Re} s > 2$, one has
\begin{align*}
\int_1^\infty \frac{\Vert x\Vert}{x^{s+1}}\, dx & = \frac{1}{s(s-1)} \sum_{n = 1}^\infty (n^{1-s} +(n+1)^{1-s} -2^{s}(2n+1)^{1-s}) \\
& =  \frac{(4-2^{s})\zeta(s-1)+2^{s}-1}{s(s-1)}.
\end{align*}
It follows that
\begin{align*}
\int_1^\infty \frac{\Vert x\Vert}{x^{s+1}}\, dx  =  \frac{(4-2^{s})\zeta(s-1)+2^{s}-1}{s(s-1)}
\end{align*}
for all $s \in  \CC \backslash \{1,2\}$ with $\operatorname{Re} s > 0$,
with limiting value
$$\int_1^\infty \frac{\Vert x\Vert}{x^2}\, dx = \sum_{n = 1}^\infty \log \left( \frac{(2n+1)^2}{
(2n+1)^2-1}\right)  = \log \prod_{n = 1}^\infty \frac{(2n+1)^2}{
(2n+1)^2-1}  = \log \frac{4}{\pi}$$
at $s = 1$, where $ \log \frac{4}{\pi}$ is the {\bf alternating Euler constant\index{alternating Euler constant}} [270], and limiting value
$$\int_1^\infty \frac{\Vert x\Vert}{x^3}\, dx = \frac{1}{2} \sum_{n = 1}^\infty \frac{1}{n(n+1)(2n+1)} =  \frac{3}{2}-2\log 2$$
at $s = 2$.    Reversely, one has
\begin{align*}
(2-2^s)\zeta(s) =  \frac{s(s+1)}{2}\int_1^\infty \frac{\Vert x\Vert}{x^{s+2}}\, dx+2^{-1}-2^s
\end{align*}
for all $s \in \CC\backslash \{1\}$ with $\operatorname{Re} s > -1$, where the left hand side is entire.   It follows that
$$\lim_{{s \to 0}\atop {\operatorname{Re} s > 0}}s \int_1^\infty \frac{\Vert x\Vert}{x^{s+1}}\, dx = -3\zeta(-1) = \frac{1}{4},$$
and therefore the function
\begin{align*}
s \int_1^\infty \frac{\Vert x\Vert}{x^{s+1}}\, dx =  \frac{(4-2^{s})\zeta(s-1)+2^{s}-1}{s-1}
\end{align*}
entends to an entire function with values $\frac{1}{4}$ at $s = 0,-1$  and $\log \frac{4}{\pi}$ at $s = 1$ (cf., (\ref{zetaexp})), and the function
\begin{align*}
\int_1^\infty \frac{\Vert x\Vert-\frac{1}{4}}{x^{s+1}}\, dx  =  \int_1^\infty \frac{\Vert x\Vert}{x^{s+1}}\, dx  + \frac{3\zeta(-1)}{s}
\end{align*}
on $\operatorname{Re} s  > 0$ also extends to entire function with a zero at $s = -1$.  It also follows that the function $ \int_1^\infty \frac{\Vert x\Vert}{x^{s+1}}\, dx$ has meromorphic continuation to $\CC$ with a single (simple) pole at $s = 0$ with residue $-3\zeta(-1) = \frac{1}{4}$, which is the average value of $\Vert x\Vert$ over any full period.  This provides an interesting interpretation of the well-known identity $\zeta(-1) = -\frac{1}{12}$.  Moreover,  at $s = 0$  one has
$$ \int_1^\infty \frac{\Vert x\Vert-\frac{1}{4}}{x}\, dx  = -3(\zeta(-1)+\zeta'(-1)) -\frac{13}{12}\log 2 = 3\log A-\frac{13}{12}\log 2 = -0.00464601\ldots,$$  where $A$ is the {\it  Glaisher--Kinkelin constant}.
\end{remark}

\section{Irrationality measure}

The {\bf irrationality measure}, {\bf approximation order}, or {\bf approximation exponent},\index{irrationality measure $\mu(\alpha)$}\index{approximation order $\mu(\alpha)$}\index{approximation exponent $\mu(\alpha)$} {\bf of} $\alpha \in \RR$, denoted $\mu(\alpha)$, is given by
\begin{align*}
\mu(\alpha)  = \inf\{t \in \RR: \alpha \gg_1 n^{-t}\}  = -\sup\{t \in \RR: \alpha \gg_1 n^{t}\} \in [0,\infty].\index[symbols]{.u  m@$\mu(\alpha)$}
\end{align*}
Given the notation $\gg_1$ and its  resemblance (by design) to the asymptotic notation $\gg$, the definition above is reminiscent of the expression $$\underline{\deg} \, f  = \sup \{t \in \RR: f(x) \gg x^t  \ (x \to \infty)\}$$ in Proposition \ref{firstprop0lower}(3).    Corollary \ref{degmu} below shows that this resemblance is more than superficial.

By Hurwitz's theorem and  Proposition \ref{dioprop}, one has the following.

\begin{proposition}
Let $\alpha \in \RR$.   Then $\alpha$ is rational if and only if $\mu(\alpha) = 1$.  Moreover,  $\alpha$ is irrational if and only if $\mu(\alpha) \geq 2$.
\end{proposition}

The following proposition, whose proof is straightforward,  given Proposition \ref{basicrelations}, provides some basic properties of irrationality measure.

\begin{proposition}\label{muapprox}
Let $\alpha, t \in \RR$ with $t > 0$.
\begin{enumerate}
\item  The map $\mu: \RR \longrightarrow [1,\infty]$ is even and periodic, with $1$ as a period.  Equivalently, one has  $\mu(\alpha+n) = \mu(\left\{\alpha\right\}) = \mu(\Vert \alpha\Vert ) = \mu(-\alpha) = \mu(\alpha)$ for all $n \in \ZZ$.
\item $\mu(\alpha)$ is the unique $T > 0$ such that $\alpha \gg_1 n^{-u}$ for all $u > T$ and $ \alpha \not \gg_1 n^{-u}$ for all $u < T$.
\item One has
\begin{align*} \mu(\alpha) = \sup\{t \in \RR: \alpha  \not \gg_1   n^{-t}\} = -\inf\{t \in \RR: \alpha  \not \gg_1   n^{t}\}.
\end{align*}
\item $t \geq \mu(\alpha)$ if and only if  $\alpha \gg_1  n^{-u}$ for all $u > t$.
\item $t< \mu(\alpha)$ if and only if  $\alpha  \not \gg_1   n^{-u}$ for some $u > t$.
\item If $t > \mu(\alpha)$, then $\alpha \gg_1 n^{-t}$,  and there exists a $C >0$ such that $\alpha \ggg_1 Cn^{-t}$.
\item If $t< \mu(\alpha)$, then $\alpha  \not \gg_1   n^{-t}$ and $\alpha \, {\not \ggg}_1 \, Cn^{-t}$ for all $C > 0$.
\end{enumerate}
Suppose that $\alpha$ is irrational.
\begin{enumerate}
\item[(8)] $t \geq \mu(\alpha)$ if and only if  $\alpha \succ_1  n^{-u}$ for all $u > t$.
\item[(9)] $t< \mu(\alpha)$ if and only if  $\alpha  \not \succ_1   n^{-u}$ for some $u > t$.
\item[(10)] $\mu(\alpha)$ is the unique $T > 0$ such that $\alpha \succ_1 n^{-u}$ for all $u > T$ and $ \alpha \not \succ_1 n^{-u}$ for all $u < T$.
\item[(11)] One has \begin{align*}
\mu(\alpha) & = \sup\{t \in \RR:  \alpha  \not \succ_1   n^{-t} \}   \\
& = \inf\{t \in \RR:  \alpha \succ_1 n^{-t}\} \\
& = \inf\left\{t \in \RR: \forall n \gg 0\, \left(  \tfrac{n}{ \Vert n\alpha \Vert} \leq n^{t}\right) \right\}.
\end{align*}
\end{enumerate}
\end{proposition}

As an immediate consequence of statement (11) of the proposition, one has the following.

\begin{corollary}\label{degmu}
For all irrational numbers $\alpha$, one has
\begin{align*}
\mu(\alpha) = \deg \frac{n}{\Vert n \alpha \Vert} = 1+ \deg \frac{1}{\Vert n \alpha \Vert},
\end{align*}
where  $$\frac {\Vert n \alpha \Vert }{n}=  \min \left\{| \alpha-r|: \text{$r \in\QQ$ and $\ord_1 r \mid n$}\right\}$$
for all positive integers $n$.
\end{corollary}

Thus, $\mu(\alpha)$ for any irrational number $\alpha$ can be interpreted as the degree of the  arithmetic function $ \frac{n}{\Vert n \alpha \Vert}$.  In Section 13.4, we study, more generally, the logexponential degree $\dege \frac{n}{ \Vert n \alpha \Vert}$ of the arithmetic function $ \frac{n}{\Vert n \alpha \Vert}$.

Applying Proposition \ref{supprop}, we obtain the following.

\begin{corollary}\label{degmu2}
For all irrational numbers $\alpha$, one has
\begin{align*}
\mu(\alpha) = \deg \frac{1}{\mu_\alpha(x)} = -\underline{\deg} \,  \mu_\alpha(x),
\end{align*}
where $\mu_\alpha(x)$ is the step function on $[1,\infty)$ defined in Proposition \ref{denomschar}
\end{corollary}

A real number $\alpha$ is said to be {\bf very well approximable}\index{very well approximable} if $\mu(\alpha) > 2$, or, equivalently, if $\alpha  \not \gg_1  n^{-t}$ for some $t > 2$.   By this measure, the larger $\mu(\alpha)$ is, the  ``more well approximable'' the number $\alpha$  is.    It is known (see Corollary \ref{2cor}) that the set of all very well approximable numbers has  (Lebesgue) measure $0$.  In other words, one has $\mu(\alpha) = 2$ for almost all real numbers $\alpha$, that is,  for all $\alpha \in \RR$ outside a set of measure $0$.

\begin{corollary}
Let $\alpha \in \RR$ be irrational.  The following conditions are equivalent.
\begin{enumerate}
\item $\alpha$ is not very well approximable, that  is, $\mu(\alpha) = 2$.
\item For every $t > 2$, one has $\alpha \gg_1 n^{-t}$.
\item For every  $t >2$, there exists a $C > 0$ such that $\alpha \ggg_1 Cn^{-t}$.
\item For every $t > 1$, one has $\Vert n\alpha \Vert < \tfrac{1}{n^{t}}$ for only finitely many positive integers $n$.
\item For every $t \in \RR$, one has $\Vert n\alpha \Vert < \tfrac{1}{n^{t}}$ for infinitely many positive integers $n$ if and only if $t \leq 1$.
\item $\deg \frac{1}{ \Vert n \alpha \Vert }= 1$.
\end{enumerate}
\end{corollary}

Note that, by Dirichlet's approximation theorem,  the ``if'' portion of statement (5) of the corollary is automatic  for any real number $\alpha$.  Thus,  the real numbers $\alpha$ with $\mu(\alpha) = 2$ are those real numbers for which the conclusion of Dirichlet's approximation theorem for $\alpha$ is more or less optimal---and this holds for almost all $\alpha \in \RR$.

A real number $\alpha$ is said to be {\bf Liouville}\index{Liouville number} if $\mu(\alpha) = \infty$.   Liouville numbers are  real numbers that are ``extremely well approximable.''   The following theorem, proved by Liouville in 1844,  implies that all Liouville numbers are transcendental.

\begin{theorem}[{Liouville [190] [191]}]
If $\alpha$ is an algebraic number of degree at most $N$, then there exists a $C > 0$ such that
$$\alpha \ggg_1 Cn^{-N},$$
and therefore $\mu(\alpha) \leq N$.
\end{theorem}

Continuing the work of Thue (1909), Siegel (1921),  and Dyson (1947),  in 1955,  Roth proved the following strengthening of Liouville's theorem,  known as {\bf Roth's theorem}, or the {\bf Thue--Siegel--Roth theorem},\index{Roth's theorem}\index{Thue--Siegel--Roth theorem} for which he received the Fields Medal in 1958.

\begin{theorem}[{Roth's theorem [257]}]
One has $\mu(\alpha) = 2$ for every algebraic irrational number $\alpha$.    Equivalently,  every very well approximable real number is transcendental.
\end{theorem}

Next,  let $f,  h \in \RR^{\RR_\infty}$, and suppose that $\dom h$ contains $[N,\infty) \cap \dom f$ for some $N >0$, and also    that $h(x) \neq 0$ and $h(x) \neq 1$  for all $x \gg 0$ in $\dom h$.   We define
$$\deg(f;h) = \limsup_{x \to \infty} \frac{\log |f(x)|}{\log |h(x)|},$$
which we call the {\bf degree of $f$ with respect to $h$}.\index{degree $\deg(f;h)$ of $f$ with respect to $h$}\index[symbols]{.g dz@$\deg(f;h)$} This generalizes the usual degree map $\deg(-) = \deg(-;\id)$.    We also define
$$\underline{\deg}(f;h) = \liminf_{x \to \infty} \frac{\log |f(x)|}{\log |h(x)|} = -\deg(f; 1/h),$$
which we call the {\bf lower degree of $f$ with respect to $h$}.\index{lower degree $\deg(f;h)$ of $f$ with respect to $h$}\index[symbols]{.g dz@$\underline{\deg}(f;h)$}
Note that the function $\frac{\log |f(x)|}{\log |h(x)|}$
is the unique (germ of a) function   $L(x)$  such that $$|f(x)| = |h(x)|^{L(x)}$$ for all $x \gg 0$ in $\dom f$.  Also note that, if $h$ has finite and positive exact degree, then
$$\deg(f;h) = \frac{\deg f}{\deg h},$$
while, if $h$ has finite and negative exact degree, then
$$\deg(f;h) = \frac{\underline{\deg}\, f}{\deg h}.$$
In particular, one has
$$\deg f =  \deg(f;\id)$$
$$\underline{\deg}f =  \underline{\deg}(f;\id) = - \deg(f;1/\id).$$  In general, one has
$$\deg(f;h) = \deg |f(x)|^{\frac{\log x}{\log |h(x)|}}.$$
Moreover, if $|h(x)| > 1$ for all $x \gg 0$, then
$$\deg(f;h) = \inf\{t \in \RR: |f(x)| \ll |h(x)|^t \ (x \to \infty)\},$$
while,   if $0<|h(x)| < 1$ for all $x \gg 0$, then
$$\deg(f;h) = \inf\{t \in \RR: |f(x)| \gg |h(x)|^t \ (x \to \infty)\}.$$

The following result,  whose proof  in [269] is a straightforward application of Theorem \ref{ccfa} and (\ref{cfineq}),    expresses $\mu(\alpha)$ in terms of the regular continued fraction expansion of $\alpha$ and provides motivation for introducing the degree notions defined above.

\begin{proposition}[{\cite[Theorem 1]{sondow}}]\label{sondprop}
For all irrational numbers $\alpha$, one has
\begin{align*}
\mu(\alpha) & = 1+  \limsup_{n \to \infty} \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)} \\ & = 2+  \limsup_{n \to \infty} \frac{\log a_{n+1}(\alpha)}{\log q_{n}(\alpha)},
\end{align*}
or, equivalently,
\begin{align*}
\mu(\alpha) & =\deg(q_n(\alpha) q_{n+1}(\alpha); q_n(\alpha)) \\ & =  1+\deg(q_{n+1}(\alpha); q_n(\alpha)) \\ & =  2+\deg(a_{n+1}(\alpha); q_n(\alpha)).
\end{align*}
\end{proposition}

\begin{corollary}\label{sondpropcor}
For all irrational numbers $\alpha$, one has
\begin{align*}
\mu(\alpha) = \deg\left(\left|\alpha-\frac{p_n(\alpha)}{q_n(\alpha)}\right|; \frac{1}{q_n(\alpha)}\right).
\end{align*}
\end{corollary}

\begin{proof}
This follows readily from the proposition and (\ref{cfineq}).
\end{proof}

\begin{corollary}
For all irrational numbers $\alpha$, one has $\mu(\alpha) = 2$ if and only if
$$\lim_{n \to \infty} \frac{\log q_{n+1}(\alpha) }{\log q_{n}(\alpha) } = 1,$$
if and only if
$$\log q_{n+1}(\alpha) \sim \log q_{n}(\alpha) \ (n \to \infty).$$
\end{corollary}

\begin{corollary}\label{mu0}
For all irrational numbers $\alpha$,  if $\deg a_n(\alpha) < \infty$,  or, more generally,  if $\deg(a_{n}(\alpha);F_n) = 0$ (or, equivalently,  if $\deg(a_{n}(\alpha);e^n) = 0$), then $\mu(\alpha) = 2$.
\end{corollary}

\begin{proof}
Since $F_n$ has exact degree $\infty$,  if  $\deg a_n(\alpha) < \infty$,  then
$$\deg(a_{n}(\alpha);F_n) =  \limsup_{n \to \infty}  \frac{\log a_{n}(\alpha)}{\log n}   \frac{\log n}{\log F_n} = 0.$$
Supposing that $\deg(a_{n}(\alpha);F_n) = 0$,  one has $\deg(a_{n+1}(\alpha);F_{n+1}) = 0$,  and therefore,  since also $q_n(\alpha) \geq F_{n+1}$ for all $n \geq 0$,  one has $\deg (a_{n+1}(\alpha),q_n(\alpha)) = 0$ and therefore
$$\mu(\alpha) =  2+\deg(a_{n+1}(\alpha); q_n(\alpha)) = 2.$$
This completes the proof.
\end{proof}

Recall that the degrees of many important number-theoretic functions are known only within some bound, e.g., one has $\Theta = \deg(\li-\pi) \in [\tfrac{1}{2},1]$.  By the same token, $\mu(\alpha) = \deg \frac{n}{\Vert n\alpha \Vert}$ is unknown for a great many important constants in  analysis.    For example,  the Euler--Mascheroni constant is not known to be irrational, i.e., one may have $\mu(\gamma) = 1$, for all we know.   For the constant $\log 2$, the best we can do thus far is $\mu(\log 2) \in [2,3.57455391]$ [201], and,  likewise, $\mu(\pi) \in [2,7.103205334137\ldots]$ for the constant $\pi$ [303].   Probably one has $\mu(\alpha) = 2$ for all three of these constants $\alpha$.    Since the Riemann hypothesis is equivalent to $\deg(\li-\pi) = \tfrac{1}{2}$, such conjectures can be regarded, loosely speaking,  as Diophantine approximation analogues of the Riemann hypothesis.

In 1937,  P.\  L\'evy proved the following.

\begin{theorem}[{L\'evy [181]}]\label{levythm}
For almost all real numbers $\alpha$, that is, for all $\alpha \in \RR$ outside a set of (Lebesgue) measure $0$, one has
$$\lim_{n \to \infty} q_n(\alpha)^{1/n} = e^{\pi^2/(12 \log 2)},$$
or, equivalently,
$$\log q_n(\alpha) \sim \frac{\pi^2}{12\log 2} n\ (n \to \infty),$$
where $ \frac{\pi^2}{12\log 2} = 1.186569110415\ldots$.
\end{theorem}

Consequently, one has the following.

\begin{corollary}\label{2cor}
One has
$$\log q_{n+1}(\alpha) \sim \log q_{n}(\alpha) \ (n \to \infty),$$
or, equivalently,  $\mu(\alpha) = 2$,
for almost all $\alpha \in \RR$.
\end{corollary}

By the following corollary, one cannot bound $\mu(\alpha+\beta)$ or $\mu(\alpha \beta)$ generally in terms of $\mu(\alpha)$ and $\mu(\beta)$.

\begin{corollary}
Let $\alpha_0 \in \RR$  be irrational.   Then, for almost all real numbers $\alpha$,  one has $\mu(\alpha) = \mu(\alpha_0-\alpha) = \mu(\alpha_0/\alpha) = 2$, and yet $\mu(\alpha+(\alpha_0-\alpha) )= \mu(\alpha (\alpha_0/\alpha)) = \mu(\alpha_0)$.
\end{corollary}

\begin{proof}
The sets $\{\alpha \in \RR: \mu(\alpha) \neq 2\}$,  $\{\alpha \in \RR: \mu(\alpha_0-\alpha) \neq 2\}$, and $\{\alpha \in \RR: \mu(\alpha_0/\alpha) \neq 2\}$ have measure $0$, and thus so does their union.  Therefore, almost all real numbers $\alpha$ do not lie in any of those three sets.
\end{proof}

Nevertheless, one has the following.

\begin{proposition}\label{muplusrat}
For all $\alpha \in \RR$ and all $r \in \QQ$, one has $\mu(\alpha+r) = \mu(\alpha)$.
\end{proposition}

\begin{proof}
Let $r = \frac{m}{n}$, where $m,n \in \ZZ$ are relatively prime and $n > 0$.  Suppose to obtain a contradiction that $\mu(\alpha+r) > \mu(\alpha)$.  Let $t, u \in \RR$ with $\mu(\alpha+r) > u > t > \mu(\alpha)$.    Since $t > \mu(\alpha)$,  one has $$\left| \alpha - \frac{a}{b} \right| \geq \frac{1}{b^t}$$ for all $a, b \in \ZZ$ with $b \gg 0$.   It follows that
$$\left| \alpha + r - \frac{a}{b} \right|  = \left| \alpha - \frac{na-mb}{nb}  \right|  \geq \frac{1}{(nb)^t} > \frac{1}{b^u}$$
for all $a, b \in \ZZ$ with $b \gg 0$.  But that contradicts $\mu(\alpha+r) > u$.
\end{proof}

For any $\alpha \in \RR$, we let
$$\underline{\mu}(\alpha) = 1+\liminf_{n \to \infty} \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)}\index[symbols]{.ua  n@$\underline{\mu}(\alpha)$}$$
if $\alpha$ is irrational,   and we let $\underline{\mu}(\alpha) = 1$  if $\alpha$ is rational.
We call $\underline{\mu}(\alpha)$ the {\bf lower irrationality measure}, {\bf lower approximation order}, or {\bf lower approximation exponent},\index{lower irrationality measure $\mu(\alpha)$}\index{lower approximation order $\mu(\alpha)$}\index{lower approximation exponent $\mu(\alpha)$} {\bf of} $\alpha$.  Note that the obvious analogue of Proposition \ref{sondprop} holds  for $\underline{\mu}(\alpha)$.   One also has
$$\mu(\alpha) = \inf\left\{t \in \RR: \forall n \gg 0 \ \left| \alpha-\frac{p_n(\alpha)}{q_n(\alpha)} \right| \geq  \frac{1}{q_n(\alpha)^t} \right\},$$
$$\underline{\mu}(\alpha) = \sup\left\{t \in \RR: \forall n \gg 0 \ \left| \alpha-\frac{p_n(\alpha)}{q_n(\alpha)} \right| \leq  \frac{1}{q_n(\alpha)^t} \right\},$$
for all irrationals $\alpha$.  Note that $\underline{\mu} (\RR\backslash \QQ) = [2,\infty)$.

Two real numbers are said to be {\bf continued-fraction equivalent}\index{continued-fraction equivalent} if they are both rational or if  they are both irrational and their regular continued fraction expansions have identical tails \cite[Section 9.6]{leve}.   In other words, $\alpha, \beta \in \RR$ are continued-fraction equivalent if and only if $S^{\circ n}(\alpha) = S^{\circ m}(\beta)$ for some nonnegative integers $n$ and $m$.   It is well known   that  $\alpha, \beta \in \RR$ are continued-fraction equivalent if and only if there exist integers $a,b,c,d$ such that $$\beta = \frac{a\alpha +b}{c\alpha + d}$$  and $ad-bc = \pm 1$ \cite[Theorem 9.14]{leve}.   In particular, for any $\alpha \in \RR$, the real numbers $\alpha+n$, and $\frac{1}{\alpha}$ if $\alpha \neq 0$, are continued-fraction equivalent to $\alpha$ for all $n \in \ZZ$.   Moreover, continued-fraction equivalence is the smallest equivalence relation on $\RR$  with that property, since then $\alpha$ is  equivalent  to $S(\alpha) =  \frac{1}{\alpha-\lfloor \alpha \rfloor}$ for all $\alpha \in \RR\backslash \ZZ$.  Thus, a function $f: \RR\backslash \QQ \longrightarrow \overline{\RR}$ satisfies $f(\alpha) = f(\beta)$ for all continued-fraction equivalent irrationals $\alpha, \beta$ if and only if $f(\alpha) = f(\alpha+1) = f(\frac{1}{\alpha})$ for all irrationals $\alpha$, if and only if $f(\alpha) = f(S(\alpha))$ for all irrationals $\alpha$, if and only if the function $f$ factors through the map $S: \RR\backslash \QQ \longrightarrow \RR \backslash \QQ$.  Moreover, since $-\alpha$ is continued-fraction equivalent to $\alpha$ for all $\alpha$, any  such function $f$ is even (and periodic, with $1$ as a period).

\begin{proposition}
For all $\alpha,\beta \in \RR$, if $\alpha$ and $\beta$  are continued-fraction equivalent, then $\mu(\alpha) = \mu(\beta)$ and $\underline{\mu}(\alpha) = \underline{\mu}(\beta)$.
\end{proposition}

\begin{proof}
We may assume without loss of generality that $\alpha$ and $\beta$ are irrational.   We prove the corollary for $\mu(\alpha)$; the proof for $\underline{\mu}(\alpha)$ is similar.  Since $\mu(\alpha) = \mu(\{\alpha\})$, it suffices to show that $\mu(\alpha) = \mu(\tfrac{1}{\alpha})$ if $\alpha \in (0,1)$ is irrational.   Note that, for any irrational $\alpha \in (0,1)$, one has
\begin{align}\label{qpq}
\frac{q_{n+1}(\alpha)}{q_n(\tfrac{1}{\alpha})}  = \frac{p_n(\tfrac{1}{\alpha})}{q_n(\tfrac{1}{\alpha})}  \to \frac{1}{\alpha} \quad \text{as } n \to \infty,
\end{align}
and therefore
$$\mu(\tfrac{1}{\alpha})= 1+\deg(q_{n+1}(\tfrac{1}{\alpha}); q_n(\tfrac{1}{\alpha})) =  1+\deg(q_{n+2}(\alpha); q_{n+1}(\alpha)) = \mu(\alpha).$$
This completes the proof.
\end{proof}

\begin{remark}[Irrationality base]
Let $\alpha\in \RR$ be irrational.   By \cite[Theorem 1]{sondow},   the  {\it irrationality base $\beta(\alpha) \in [1,\infty]$ of $\alpha$} \cite[Definition 3]{sondow} is equivalently given by
\begin{align*}
\beta(\alpha) & = \exp \deg (q_{n+1}(\alpha);  \exp q_{n}(\alpha))  \\
& = \exp \deg q_{n+1}(\alpha)^{\log n/q_{n}(\alpha)} \\
& = \exp \limsup_{n \to \infty} \frac{\log q_{n+1}(\alpha)}{q_{n}(\alpha)} \\
& = \limsup_{n \to \infty} q_{n+1}(\alpha)^{1/q_{n}(\alpha)}.
\end{align*}
Consequently, if $\mu(\alpha) < \infty$, then $\beta(\alpha)  = 1$ (so, if $\beta(\alpha) > 1$ then  $\mu(\alpha) = \infty$).  The larger the irrationality base of $\alpha$, the ``more extremely well approximable,''  or ``more Liouville,'' $\alpha$ is.
\end{remark}

\section{Markov and relativized Markov constants}

The {\bf Markov constant $M(\alpha)$}\index{Markov constant $M(\alpha)$} of $\alpha \in \RR$ is defined by
\begin{align*}
M(\alpha) & = \inf \left\{ t \in \RR_{>0}: \alpha  \gg_1 \frac{1}{t} n^{-2}\right\} \\
& =  \sup \left\{ t \in \RR_{>0}: \alpha \,  {\not \gg}_1 \, \frac{1}{t} n^{-2}\right\}.\index[symbols]{.ub  o@$M(\alpha)$}
\end{align*}

\begin{lemma}
For all  real numbers $\alpha$,  the Markov constant $M(\alpha)$ is the unique $T \in [0,\infty]$ such that  $\alpha    \gg_1  \frac{1}{ t} n^{-2}$  for all $t > T$ and  $\alpha \,  {\not \gg}_1  \, \frac{1}{ t} n^{-2}$ for all positive $t< T$.
\end{lemma}

From Hurwitz's theorem and Proposition \ref{dioprop},  we obtain the following.

\begin{proposition}
For all $\alpha \in \RR$, one has $M(\alpha) = 0$ if and only if  $\alpha$ is rational,  and $M(\alpha) \geq M(\Phi) = \sqrt{5}$ if and only if $\alpha$ is irrational.
\end{proposition}

Thus,  for all irrational numbers $\alpha$, one has $M(\alpha) \geq M(\Phi) =\sqrt{5}$.  Moreover, equality holds if and only if $\alpha$ is continued-fraction equivalent to the golden ratio  $\Phi = [1,1,1,\ldots]$.  If equality fails,  that is,  if $\alpha$ is not continued-fraction equivalent to $\Phi$,   then one has $M(\alpha) \geq M(\sqrt{2}) = \sqrt{8}$.  Proceeding in this way, one can study the image of the function $M$ on $\RR\backslash \QQ$, which is known as the {\bf Lagrange spectrum},\index{Lagrange spectrum} and which has a remarkably intricate structure [51] [203].

A real number $\alpha$ is said to be  {\bf badly approximable}\index{badly approximable} if
$M(\alpha) < \infty$, and {\bf well approximable}\index{well approximable} if
$M(\alpha) = \infty$.  Under this measure,  the smaller $M(\alpha)$ is, the ``more badly approximable'' $\alpha$ is, while, the larger $M(\alpha)$ is, the ``more well approximable'' $\alpha$ is.    Thus, the rational numbers, somewhat ironically, are the ``most badly approximable'' numbers, followed by  the golden ratio $\Phi$ and all of its continued-fraction equivalents, followed by $\sqrt{2}$ and all of its equivalents.

Using (\ref{cfineqa})--(\ref{cfineq}) and Theorem \ref{ccfa},  one can express the Markov constant $M(\alpha)$ of an irrational number  $\alpha$ in terms of its regular continued fraction expansion,  and also in terms of the arithmetic function $\Vert n \alpha \Vert$, as follows.

\begin{theorem}[{\cite[Theorem 9.9 and the proof of Theorem 9.16]{leve}}]\label{markovconst}
For all irrational numbers $\alpha$, one has
\begin{align*}
M(\alpha )   = \limsup_{n \to \infty} \frac{1}{n \Vert n\alpha\Vert} =\limsup_{n\to \infty }  M_n(\alpha),
\end{align*}
\begin{align*}
M_n(\alpha) & = \frac{1}{q_n(\alpha) \Vert q_n(\alpha)\alpha\Vert} \\
& = \frac{1}{ {q_n(\alpha)^2 \left | \alpha- \frac{p_n(\alpha)}{q_n(\alpha)} \right|}} \\
& = S^{\circ (n+1)}(\alpha)+ \frac{q_{n-1}(\alpha)}{q_n(\alpha)} \\
& = [a_{n+1},a_{n+2},a_{n+3},\ldots]+[0,a_{n},a_{n-1},\ldots, a_2, a_{1}]
\end{align*}
for all positive integers $n$,  and where $[a_0, a_1,a_2,\ldots]$ is the regular continued fraction expansion of $\alpha$.
Consequently, if $A(\alpha) = \limsup_{n \to \infty} a_n$, then  $M(\alpha) \in [A(\alpha),A(\alpha)+2]$,  and therefore  $A(\alpha)$ is finite if and only if  the $a_n$ are bounded,  if and only if   $M(\alpha) < \infty$.    Moreover, if $\alpha, \beta \in \RR$  are continued-fraction equivalent, then $M(\alpha) = M(\beta)$.
\end{theorem}

\begin{corollary}\label{markcor}
Let $\alpha \in \RR$ be irrational.  Then the following conditions are equivalent.
\begin{enumerate}
\item $\alpha$ is badly approximable.
\item $\alpha \gg_1 Cn^{-2}$ for some $C > 0$.
\item $\alpha \ggg_1 Cn^{-2}$ for some $C > 0$.
\item The terms $a_n(\alpha)$ of the regular continued fraction expansion of $\alpha$ are bounded.
\item  The sequence $\frac{q_{n+1}(\alpha)}{q_n(\alpha)}$ is bounded.
\end{enumerate}
Moreover,  if $B(\alpha) = \limsup_{n \to \infty}\frac{q_{n+1}(\alpha)}{q_n(\alpha)}$, then one has $M(\alpha) \in [B(\alpha),B(\alpha)+1]$.
\end{corollary}

\begin{corollary}
If $\alpha \in \RR$ is badly approximable, then $\mu(\alpha) \leq 2$, i.e., $\alpha$ is not very well approximable.    Equivalently, if $\alpha$ is very well approximable, then $\alpha$ is well approximable.
\end{corollary}

Although almost all real numbers are both well approximable and not very well approximable, all quadratic irrationals, that is, all algebraic real numbers of degree $2$, are badly approximable, as their regular continued fraction expansions are eventually periodic.   On the other hand, it has been conjectured that all algebraic irrationals of degree greater than $2$ are well approximable.   Unfortunately, however,  there is not a single algebraic irrational of degree greater than $2$ that is known to be well approximable,  or to be badly approximable!  Regarding the transcendental number $e$, since
$$e-1 = [1,1,2,1,1,4,1,1,6,1,1,8,\ldots],$$
one has $M(e) = \infty$ and
$\mu(e) = 2$,  that is, $e$ is well approximable but not  very well approximable, by Corollaries \ref{markcor} and \ref{mu0}.    It is conjectured that $\pi$ is also well approximable, since, for example,  all of the terms $a_n(\pi)$ have been computed for $n \leq 3 \cdot 10^{10}$, and the largest term in this range is $a_{15621034283}(\pi) = 52662113289$: see OEIS Sequences A033089 and A033090.  Similar computations suggest that the Euler--Mascheroni constant $\gamma$ is well approximable, and thus irrational: see OEIS Sequences A033091 and A033092.

If $\alpha \in \RR$ is not a Liouville number,  that is, if $\mu(\alpha)$  is finite,
then we let
\begin{align*}
m(\alpha)  & = \inf \left\{ t \in \RR_{>0}: \alpha  \gg_1 \frac{1}{t} n^{-\mu(\alpha)}\right\} \\
& = \sup \left\{ t \in \RR_{>0}: \alpha \,  {\not \gg}_1  \, \frac{1}{t} n^{-\mu(\alpha)}\right\};\index[symbols]{.ub  p@$m(\alpha)$}
\end{align*}
otherwise,  we let $m(\alpha) = \infty$.    We call $m(\alpha)$ the {\bf relativized Markov constant of $\alpha$}.\index{relativized Markov constant $m(\alpha)$}

\begin{lemma}\label{marklem}
For all  real numbers $\alpha$ with $\mu(\alpha) < \infty$,  the relativized Markov constant $m(\alpha)$ is the unique $T \in [0,\infty]$ such that $\alpha    \gg_1  \frac{1}{ t} n^{-\mu(\alpha)}$  for all $t > T$ and
$\alpha \,  {\not \gg}_1  \, \frac{1}{ t} n^{-\mu(\alpha)}$ for all positive $t< T$.
\end{lemma}

For all irrational $\alpha$, one has
$$m(\alpha) \leq M(\alpha),$$ with equality if $\mu(\alpha) = 2$.   Moreover, one has $M(\alpha) = \infty$ if $\mu(\alpha)> 2$.    Thus, $m(\alpha)$  is a more refined invariant than $M(\alpha)$ is.   Note, however, that, unlike $M$,  the function $m$ is not invariant under continued-fraction equivalence, e.g., see Corollary \ref{minva} below.
Nevertheless,  both functions $M: \RR \longrightarrow [0,\infty]$ and $m: \RR \longrightarrow [0,\infty]$ are even and periodic of period $1$.   Moreover,  Proposition \ref{dioprop} implies the following.

\begin{proposition}
For all $\alpha \in \QQ$, one has
$$m(\alpha)  =\ord_1 \alpha = \frac{1}{|\alpha|_1}.$$
\end{proposition}

Thus,  $m(\alpha)$ for $\alpha \in \QQ$ provides an {\it analytic} expression for $\ord_1 \alpha$, which was defined algebraically.  Note also that, if $\alpha \in \QQ$ has (finite) regular continued fraction expansion $[a_0, a_1, a_2, \ldots, a_n]$, then $$m(\alpha) =\ord_1 \alpha = q_n(\alpha) = \max_k q_k(\alpha).$$

Theorem \ref{markovconst} generalizes as follows.

\begin{theorem}\label{markk}
For all irrational numbers $\alpha$ with $\mu(\alpha) < \infty$, one has
\begin{align*}
m(\alpha )  & = \limsup_{n \to \infty} \frac{1}{n^{\mu(\alpha)-1} \Vert n\alpha\Vert} =  \limsup_{n\to \infty } m_n(\alpha),
\end{align*}
\begin{align*}
m_n(\alpha)  & = \frac{1}{q_n(\alpha)^{\mu(\alpha)-1} \Vert q_n(\alpha)\alpha\Vert}\\
& = \frac{1}{ {q_n(\alpha)^{\mu(\alpha)} \left | \alpha- \frac{p_n(\alpha)}{q_n(\alpha)} \right|}}  \\
& = q_n(\alpha)^{2-\mu(\alpha)}\left( S^{\circ (n+1)}(\alpha)+ \frac{q_{n-1}(\alpha)}{q_n(\alpha)}\right) \\
& =  q_n(\alpha)^{2-\mu(\alpha)} ([a_{n+1},a_{n+2},a_{n+3},\ldots]+[0,a_{n},a_{n-1},\ldots, a_2, a_{1}])
\end{align*}
for all positive integers $n$,
and where $[a_0, a_1,a_2,\ldots]$ is the regular continued fraction expansion of $\alpha$.    Moreover, if $\mu(\alpha) > 2$,  then
$$0< m_n(\alpha) - \frac{q_{n+1}(\alpha)}{q_n(\alpha)^{\mu(\alpha)-1}} < \frac{1}{q_n(\alpha)^{\mu(\alpha)-2}} = o(1)  \ (n \to \infty)$$
for all positive integers $n$ and therefore
\begin{align*}
m(\alpha )  = \limsup_{n \to \infty} \frac{q_{n+1}(\alpha)}{q_n(\alpha)^{\mu(\alpha)-1}}.
\end{align*}
\end{theorem}

\begin{proof}
$$\kappa_n = \frac{1}{n^{\mu(\alpha)-1} \Vert n\alpha\Vert} $$
for all positive integers $n$.  Since
$$\left|\alpha-\frac{\operatorname{nint}(n\alpha)}{n} \right| = \frac{1}{\kappa_n} n^{-\mu(\alpha)}$$
for all $n$,  we conclude from Lemma \ref{marklem} that
$$m(\alpha) = \limsup_{n \to \infty} \kappa_n = \limsup_{n \to \infty}\frac{1}{n^{\mu(\alpha)-1} \Vert n\alpha\Vert}.$$
By Theorem \ref{markovconst},  to prove the rest of the  theorem, we may suppose without loss of generality that $\mu(\alpha)> 2$.
By (\ref{cfineq0}), one has
\begin{align*}
\left|\alpha -\frac{p_n(\alpha)}{q_n(\alpha)} \right| = \frac{ 1}{q_n(\alpha)^2 \left( S^{ \circ(n+1)} (\alpha)+\frac{q_{n-1}(\alpha)}{q_n(\alpha)} \right)} = \frac{1}{m_n(\alpha)}q_n(\alpha)^{-\mu(\alpha)}.
\end{align*}
From Theorem \ref{ccfa} and Lemma \ref{marklem}, it follows, readily, that $$m(\alpha)  = \limsup_{n \to \infty} m_n(\alpha).$$   Moreover, by (\ref{cfineq}), one has
\begin{align*}
q_n(\alpha)^{2-\mu(\alpha)}\frac{q_{n+1}(\alpha)}{q_n(\alpha)}< m_n(\alpha)  <q_n(\alpha)^{2-\mu(\alpha)}\left(1+\frac{q_{n+1}(\alpha)}{q_n(\alpha)}  \right)
\end{align*}
for all positive integers  $n$.  The theorem follows.
\end{proof}

Note that, by Corollary \ref{degmu}, the function $\frac{1}{n^{\mu(\alpha)-1} \Vert n\alpha\Vert}$ has degree $0$.
Moreover,  the degree of both $m_n(\alpha)$ and $ \frac{q_{n+1}(\alpha)}{q_n(\alpha)^{\mu(\alpha)-1}}$ with respect to $q_n(\alpha)$ is also $0$.

\begin{remark}[Relativized Markov constant as an upper leading coefficient]
It follows from Corollary \ref{degmu} and Theorem \ref{markk} that the relativized Markov constant $m(\alpha)$ of an irrational $\alpha$ is precisely  the {\it upper leading coefficent} $$\operatorname{lc}^{+} \frac{n}{\Vert n \alpha \Vert} = \operatorname{lc}^{+} \frac{1}{\Vert n \alpha \Vert}$$ of the arithmetic functions $\frac{n}{\Vert n \alpha \Vert}$ and $\frac{1}{\Vert n \alpha \Vert}$, in the sense of Remark \ref{lc}.
\end{remark}

\begin{corollary}\label{minva}
The function $m$ is even and periodic of period $1$.
For any irrational $\alpha \in \RR$ with $\mu(\alpha) < \infty$, one has
$$m(\tfrac{1}{\alpha}) = |\alpha|^{2-\mu(\alpha)} m(\alpha)$$
$$m(S(\alpha)) = |S(\alpha)|^{\mu(\alpha)-2} m(\alpha),$$
and therefore $m(\tfrac{1}{\alpha})  = m(\alpha)$ if and only if  $m(S(\alpha)) = m(\alpha)$,  if and only if $\mu(\alpha) = 2$ or $m(\alpha) \in \{0,\infty\}$.
In particular, for any irrational $\alpha$ with $\mu(\alpha) < \infty$ and $0<m(\alpha) < \infty$, the irrationality measure $\mu(\alpha)$ of $\alpha$ can be recovered from $m(\alpha)$ and either of $m(\tfrac{1}{\alpha})$ or $m(S(\alpha))$ by $$\mu(\alpha) =  2+ \log_{|\alpha|}  \left(\frac{m(\alpha)}{m(\tfrac{1}{\alpha})} \right) = 2+ \log_{|S(\alpha)|}  \left(\frac{m(S(\alpha))}{m(\alpha)} \right).$$
\end{corollary}

\begin{corollary}
Let $\alpha$ be an irrational  number with $\mu(\alpha)<\infty$.   One has
$$ \frac{q_{n+1}(\alpha)}{q_{n}(\alpha)^{\mu(\alpha)-1}} \asymp 1 \ (n \to \infty)$$
if and only if
$$  \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)} +1-\mu(\alpha) = O\left( \frac{1}{\log q_{n}(\alpha)} \right)  \ (n \to \infty).$$  Moreover, if the equivalent conditions above hold, then one has
$$0<m(\alpha)< \infty,$$
$$  \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)} +1-\mu(\alpha) = O\left( \frac{1}{n}\right) \ (n \to \infty),$$
$$\mu(\alpha) = 1+   \lim_{n \to\infty} \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)}.$$
\end{corollary}

\begin{proof}
The stated equivalence follows from the identity $$ \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)} +1-\mu(\alpha)= \frac{\log \frac{ q_{n+1}(\alpha)}{q_{n}(\alpha)^{\mu(\alpha)-1}}}{\log q_{n}(\alpha)} $$ and the fact that, for any real function $f$, one has $f(x) \asymp 1 \ (x \to \infty)$ if and only if $\log |f(x)| = O(1) \ (x \to \infty)$.  The rest of the proposition then follows from Theorem \ref{markk} and the fact that $\log q_n(\alpha) \geq \log F_{n+1} \asymp n \ (n \to \infty)$.
\end{proof}

\begin{corollary}\label{badapp}
Let $\alpha$ be an irrational  number.  Then $\alpha$ is badly approximable if and only if
$$ \frac{q_{n+1}(\alpha)}{q_{n}(\alpha)} \asymp 1 \ (n \to \infty),$$ if and only if
$$  \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)} -1 \asymp \frac{1}{\log q_{n}(\alpha)} \ (n \to \infty).$$
Moreover,  if the equivalent conditions above hold,  then one has $\log q_n(\alpha) \asymp  n \ (n \to \infty)$ and therefore
$$ \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)} -1  \asymp \frac{1}{n} \ (n \to \infty).$$
\end{corollary}

The following lemma is useful for constructing irrationals $\alpha$ with prescribed values of $\mu(\alpha) > 2$ and $m(\alpha)$.

\begin{lemma}\label{prescribeda}
Let $f: \ZZ_{>0} \longrightarrow \RR_{>0}$ be a positive real-valued arithmetic function.  Then there exists a unique (irrational) real  number $\alpha$ with $a_0(\alpha) = 0$ and $$a_{n+1}(\alpha) = \lceil f(q_n(\alpha)) \rceil$$
for all nonnegative integers $n$.    Moreover, if  $\lim_{n \to \infty} f(n) = \infty$, then  one has
$$\frac{q_{n+1}(\alpha) }{ q_n(\alpha)} \sim a_{n+1}(\alpha) \sim f(q_n(\alpha)) \ (x \to \infty).$$
\end{lemma}

\begin{proof}
The $p_n(\alpha)$ and $q_n(\alpha)$, and thus $\alpha = \lim_{n \to \infty} \frac{p_n(\alpha)}{q_n(\alpha)}$, are uniquely determined by the initial conditions $p_0(\alpha) = 0$, $q_0(\alpha) = 1$,  $p_1(\alpha) = 1$,   $q_1(\alpha) = \lceil f(1) \rceil$, and the recurrence relations
$$p_{n+1}(\alpha)  =\lceil f(q_n(\alpha)) \rceil p_{n}(\alpha) +  p_{n-1}(\alpha)$$
$$q_{n+1}(\alpha)  =\lceil f(q_n(\alpha)) \rceil q_{n}(\alpha) +  q_{n-1}(\alpha).$$
Suppose that $\lim_{n \to \infty} f(n) = \infty$.  Then one has
\begin{align*}
\frac{q_{n+1}(\alpha) }{ q_n(\alpha)} =  a_{n+1}(\alpha) + \frac{q_{n-1}(\alpha) }{ q_n(\alpha)}  \sim a_{n+1}(\alpha) \sim f(q_n(\alpha)) \ (x \to \infty).
\end{align*}
This completes the proof.
\end{proof}

By Theorem \ref{markk} and the lemma above, one has the following.

\begin{corollary}
Let $\mu >2$ and $c > 0$.
\begin{enumerate}
\item  Let $\alpha$ be the unique real number with  $a_0(\alpha) = 0$ and
$$a_{n+1}(\alpha) = \lceil c q_n(\alpha)^{\mu-2} \rceil$$
for all nonnegative integers $n$.  Then one has
$$q_{n+1}(\alpha)  \sim c q_n(\alpha)^{\mu-1} \ (n \to \infty).$$
Consequently, one has $\mu(\alpha) = \mu$ and $m(\alpha) = c$.
\item Let $\alpha $ be the unique real number with  $a_0(\alpha) = 0$ and
$$a_{n+1}(\alpha) = \lceil n q_n(\alpha)^{\mu-2} \rceil$$
for all nonnegative integers $n$.  Then one has
$$q_{n+1}(\alpha)  \sim n q_n(\alpha)^{\mu-1} \ (n \to \infty).$$
Consequently, one has $\mu(\alpha) = \mu$ and $m(\alpha) = \infty$.
\item Let $\alpha$ be the unique real number with  $a_0(\alpha) = 0$ and
$$a_{n+1}(\alpha) = \lceil n^{-1} q_n(\alpha)^{\mu-2} \rceil$$
for all nonnegative integers $n$.  Then one has
$$q_{n+1}(\alpha)  \sim n^{-1} q_n(\alpha)^{\mu-1} \ (n \to \infty).$$
Consequently, one has $\mu(\alpha) = \mu$ and $m(\alpha) = 0$.
\end{enumerate}
\end{corollary}

The image of  the function $m$ on $\QQ = \mu^{-1}(1)$ is just $\{\frac{1}{n}: n \in \ZZ_{>0}\}$, and the image of $m$ on $\mu^{-1}(2)$ is the Lagrange spectrum.  By the corollary above,   one has the following.

\begin{corollary}
For all $t >2$, the image of $m$ on  $\mu^{-1}(t)$ is $[0,\infty]$.
\end{corollary}

The marked contrast between the values of $m$ on $\mu^{-1}(t)$ for $ t > 2$ versus $t = 1,2$ is due to the fact that $t \in \RR$ is in the interior of $\im \mu$ if and only if $t > 2$.

\begin{problem}
What is the image of the map
$\deg\left(\frac{\log q_{n+1}(-)}{\log q_{n}(-)} - 1\right)$ on $\mu^{-1}(2)$?
\end{problem}

\section{Logexponential irrationality degree}

The following conjecture, due to Lang,  is a proposed strengthening of  Roth's theorem.

\begin{conjecture}[{Lang \cite[p.\ 98]{lang}}]\label{langconj}
Let $\alpha$ be an algebraic irrational number.  Then, for every $t > 1$,
one has
$$\alpha \gg_1  n^{-2} (\log n)^{-t}.$$
\end{conjecture}

Lang's conjecture motivates the following definition:  for all $\alpha \in \RR$,  we let
\begin{align*}
\pmb{\mu}( \alpha) & = \inf\{\dege f: f \in \mathbb{L}_{>0} \text{ and } \alpha \gg_1  1/f|_{\ZZ_{>0}}\} \\
& =  \inf\{\dege f: f \in \mathbb{L}_{>0} \text{ and } |\alpha -r| \geq 1/f(\ord_1 r) \text{ for all but finitely many } r \in \QQ\}.\index[symbols]{.ua  o@$\pmb{\mu}(\alpha)$}
\end{align*}
For all nonnegative integers $k$, we let $\pmb{\mu}_k (\alpha)$ denote the $k$th coordinate of $\pmb{\mu}( \alpha)$.  We call $\pmb{\mu}(\alpha) \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ the {\bf logexponential irrationality degree of $\alpha$}.\index{logexponential irrationality degree $\pmb{\mu}(\alpha)$}

Using Proposition \ref{muapprox}(5), one can verify the following.

\begin{proposition}
One has
\begin{align*}
\mu( \alpha) = \inf\{\deg f: f \in \mathbb{L}_{>0} \text{ and } \alpha \gg_1  1/f|_{\ZZ_{>0}}\} = \pmb{\mu}_0 (\alpha).
\end{align*}
\end{proposition}

\begin{corollary}
Roth's theorem is equivalent to
$$\pmb{\mu}( \alpha) \leq (2,\infty,1,0,0,0,\ldots)$$
for all real algebraic numbers $\alpha$.  Moreover,  Lang's conjecture, Conjecture \ref{langconj},  is equivalent to $\pmb{\mu}_1 (\alpha) \leq 1$, and thus also to
$$\pmb{\mu} (\alpha) \leq (2,1,\infty,1,0,0,0,\ldots),$$
for all real algebraic  numbers $\alpha$.
\end{corollary}

The following proposition provides an alternative description of logexponential irrationality degree.

\begin{proposition}\label{mupropo}
Let $\alpha \in \RR$.   Then $\pmb{\mu} (\alpha)$  is the least $\dd \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ such that, for any arithmetic function $f: \ZZ_{>0} \longrightarrow \RR_{>0}$ with $\underline{\dege} \, f >\dd$, one has $\alpha \gg_1  1/f$.
\end{proposition}

\begin{proof}
Let $\mathbf{m}$ denote the infimum of all  $\dd \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ such that, for any arithmetic function $f: \ZZ_{>0} \longrightarrow \RR_{>0}$ with $\underline{\dege} \, f >\dd$, one has $\alpha \gg_1  1/f$.
Let $f: \ZZ_{>0} \longrightarrow \RR_{>0}$ be any arithmetic function  with $\underline{\dege} \,  f >\pmb{\mu} (\alpha )$.   Then,  by the definition of $\pmb{\mu}(\alpha)$, there exists a $g \in \mathbb{L}_{>0}$ with $\underline{\dege} \,  f > \dege g >\pmb{\mu} (\alpha )$ and $ \alpha \gg_1  1/g|_{\ZZ_{>0}}$.   By Proposition \ref{oexpprop}, one then has $g(n) = o(f(n)) \ (n \to \infty)$,  so that $1/g(n) \geq 1/f(n)$ for all $n \gg 0$, whence $\alpha \gg_1  1/f$.    Thus, one has $\pmb{\mu} (\alpha ) \geq \mathbf{m}$. Suppose, to obtain a contradiction, that $\pmb{\mu} (\alpha ) > \mathbf{m}$, so that  $\pmb{\mu} (\alpha ) >  \ee > \dd > \mathbf{m}$ for some $\dd,\ee \in  \prod_{n = 0}^{ \infty*}\overline{\RR}$.   By the definition of  $\pmb{\mu}(\alpha)$,  for any $g \in \mathbb{L}_{>0}$ with $ \alpha \gg_1  1/g|_{\ZZ_{>0}}$, one has $\dege g > \ee$.
By the definition of  $\mathbf{m}$,  for any arithmetic function $f: \ZZ_{>0} \longrightarrow \RR_{>0}$ with $\underline{\dege} \, f >\dd$, one has $\alpha \gg_1  1/f$.   By Proposition \ref{oexppropstrong},  we may choose  $g \in \mathbb{L}_{>0}$ with $\ee> \dege g >\dd$.   Let $f  = g|_{\ZZ_{>0}}$.  Since $\underline{\dege} \, f = \dege g >\dd$, one has $\alpha \gg_1  1/f$.   It follows, then, that $\dege g> \ee$, which is our desired contradiction.
\end{proof}

The following theorem provides some further equivalent characterizations of logexponential irrationality degree.  In particular,  it expresses $\pmb{\mu}(\alpha)$ for any irrational number $\alpha$ in terms of the arithmetic functions $\Vert n \alpha \Vert$ and $$\frac{\Vert n \alpha \Vert }{n} = \min \left\{| \alpha-r|: \text{$r \in\QQ$ and $\ord_1 r \mid n$}\right\},$$

\begin{theorem}\label{pmbmu}
Let $\alpha \in \RR$.
\begin{enumerate}
\item  $\pmb{\mu}( \alpha)$ is the unique $\dd \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ such that
$ \alpha  \gg_1  1/f|_{\ZZ_{>0}}$ for all $f \in  \mathbb{L}_{>0}$ defined on $[1,\infty)$ with $\dege f > \dd$, and
$ \alpha \not \gg_1  1/f|_{\ZZ_{>0}}$ for all $f \in  \mathbb{L}_{>0}$  defined on $[1,\infty)$ with $\dege f < \dd$.
\item If $\alpha$ is irrational, then $\pmb{\mu}( \alpha)$ is the unique $\dd \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ such that
$ \alpha  \succ_1  1/f|_{\ZZ_{>0}}$ for all $f \in  \mathbb{L}_{>0}$ defined on $[1,\infty)$ with $\dege f > \dd$, and
$ \alpha \not \succ_1 1/f|_{\ZZ_{>0}}$ for all $f \in  \mathbb{L}_{>0}$  defined on $[1,\infty)$ with $\dege f < \dd$.
\item If $\alpha$ is irrational, then one has
\begin{align*}
\pmb{\mu}( \alpha) & = \inf\{\dege f: f \in \mathbb{L}_{>0} \text{ and } \alpha \succ_1  1/f|_{\ZZ_{>0}}\}.
\end{align*}
\item  If $\alpha$ is irrational, then one has
\begin{align*}
\pmb{\mu}( \alpha) & =  \dege \frac{n}{\Vert n \alpha \Vert} \\  & =
\dege \frac{1}{\Vert n \alpha \Vert} + (1,0,0,0,\ldots).
\end{align*}
\end{enumerate}
\end{theorem}

\begin{proof}
Let $f \in  \mathbb{L}_{>0}$  be defined on $[1,\infty)$.   If $\alpha \gg_1  1/f|_{\ZZ_{>0}}$ or $\alpha \succ_1  1/f|_{\ZZ_{>0}}$,  then one has $\alpha \gg_1  1/f|_{\ZZ_{>0}}$ and therefore $\pmb{\mu}( \alpha) \leq \dege f$.  Suppose,  on the other hand, that $\pmb{\mu}( \alpha) < \dege f$.   Then there exists a  $g \in  \mathbb{L}_{>0}$  defined on $[1,\infty)$ with $\pmb{\mu}( \alpha) < \dege g < \dege f$ and $\alpha \gg_1  1/g|_{\ZZ_{>0}}$.   It follows that $g(x) < f(x)$, so that $1/g(x) > 1/f(x)$, for all $x \gg 0$,  whence $\alpha \gg_1  1/f|_{\ZZ_{>0}}$ by Proposition \ref{basicrelations}(8).  Finally,  if $\alpha$ is irrational, then, since also $\lim_{x \to \infty} f(x) = \infty$,  one has $\alpha  \succ_1  1/f|_{\ZZ_{>0}}$ by Proposition \ref{basicrelations}(14).   Statement (2)  and (3) follow.

Again, let $f  \in \mathbb{L}_{>0}$ be defined on $[1,\infty)$.   By Proposition \ref{basicrelations}(4), the condition $\alpha \succ_1 1/ f|_{\ZZ_{>0}}$ is equivalent to
$\frac{n}{\Vert n \alpha \Vert} \leq f(n) $ for all $n \gg 0$.   Therefore,  by statement (3) and Theorem \ref{infpropexp},  one has
\begin{align*}
\pmb{\mu}(\alpha) & = \inf\{\dege f: f \in \mathbb{L}_{>0} \text{ and } \alpha \succ_1 1/f|_{\ZZ_{>0}}\} \\
&  = \inf\left\{\dege f: f \in \mathbb{L}_{>0},  \, \forall n \gg 0 \, \left(  \frac{n}{\Vert n \alpha \Vert}  \leq f(n) \right) \right \} \\
& = \dege \frac{n}{\Vert n \alpha \Vert}.
\end{align*}
This proves statement (4) and completes the proof.
\end{proof}

Note that, since the image of $\Vert n \alpha \Vert$ is dense in $[0,\frac{1}{2}]$, one has $\dege \Vert n \alpha \Vert = (0,0,0,\ldots)$, whence $\underline{\dege}\, \frac{n}{ \Vert n \alpha \Vert} = (1,0,0,0,\ldots)$, for all irrationals $\alpha$.

\begin{corollary}
Let $\alpha \in \RR$ be irrational.   One has
\begin{align*}
\pmb{\mu}(\alpha)  = \dege \frac{1}{\mu_\alpha(x)} = -\underline{\dege}\, \mu_\alpha(x),
\end{align*}
\begin{align*}
\mu_\alpha(x) & =  \min\left \{\frac{\Vert n\alpha \Vert }{n} : n \leq x \right \} \\
& =  \min\left\{ | \alpha-r|: \text{$r \in\QQ$ and $\ord_1 r \leq x$} \right\} \\
& =  \min\left\{ \left| \alpha-\frac{a}{b}\right|: \text{$a,b \in\ZZ$ and $1 \leq b \leq x$} \right\}
\end{align*}
\begin{align*}
\frac{1}{\mu_\alpha(x)}  & = \max\left \{\frac{n}{\Vert n\alpha \Vert } : n \leq x \right \} \\
& =  \max\left\{ \frac{1}{| \alpha-r|}: \text{$r \in\QQ$ and $\ord_1 r \leq x$} \right\} \\
& =  \max\left\{ \frac{1}{\left| \alpha-\frac{a}{b}\right|}: \text{$a,b \in\ZZ$ and $1 \leq b \leq x$} \right\}
\end{align*}
on $[1,\infty)$.
\end{corollary}

\begin{proof}
This follows from the theorem and Propositions \ref{denomschar}(2) and \ref{supprop}.
\end{proof}

\begin{corollary}
Let $\alpha \in \RR$.  If $m(\alpha) < \infty$, then $$\pmb{\mu} (\alpha) \leq (\mu(\alpha),0,0,0,\ldots).$$  Likewise, if $m(\alpha) >0$, then $$\pmb{\mu} (\alpha) \geq (\mu(\alpha),0,0,0,\ldots).$$  Consequently, if $0< m(\alpha) < \infty$, then one has
$$\pmb{\mu} (\alpha) = (\mu(\alpha),0,0,0,\ldots).$$
\end{corollary}

\begin{proof}
Suppose that $m(\alpha) <\infty$, so that
$$ \alpha  \gg_1 \frac{1}{\lambda} n^{-\mu(\alpha)}$$
for some  $\lambda >0$.   Then one has $$\pmb{\mu} (\alpha) \leq \dege \lambda n^{\mu(\alpha)} = (\mu(\alpha),0,0,0,\ldots).$$
Suppose, on the other hand,  that $m(\alpha) >0$, so that
$$ \alpha \,  {\not \gg}_1  \, \frac{1}{\lambda} n^{-\mu(\alpha)}$$
for some  $\lambda >0$.   Then one has
$$\pmb{\mu} (\alpha) \geq \dege \lambda n^{\mu(\alpha)} =(\mu(\alpha),0,0,0,\ldots).$$
This completes the proof.
\end{proof}

\begin{corollary}
Let $\alpha \in \RR$.   One has
$$\pmb{\mu}(\alpha) = (1,0,0,0,\ldots)$$
if and only if $\alpha \in \QQ$, and one has
$$\pmb{\mu}(\alpha) \geq (2,0,0,0,\ldots)$$
if and only if $\alpha \in \RR\backslash \QQ$, with equality if  $\alpha \in \RR\backslash \QQ$ is  badly approximable (e.g., if $\alpha$ is a quadratic irrational).
\end{corollary}

The following theorem expresses the logexponential irrationality degree of any irrational number  $\alpha$ in terms of the regular continued fraction expansion of $\alpha$.

\begin{theorem}\label{pmbmutheorem}
Let $\alpha \in \RR$ be irrational,  let $D = \{q_n(\alpha): n \in \ZZ_{\geq 0}\}$, and let $F_1, F_2,G,H_1,H_2: D \longrightarrow [1,\infty)$ be defined, respectively, by
$$F_1(q_n(\alpha)) = \left| \alpha-\frac{p_n(\alpha)}{q_n(\alpha)}\right|^{-1},$$
$$F_2(q_n(\alpha)) = q_n(\alpha)q_{n+1}(\alpha),$$
$$G(q_n(\alpha)) = q_{n+1}(\alpha),$$
$$ H_1(q_n(\alpha)) = \frac{q_{n+1}(\alpha)}{q_n(\alpha)} = a_{n+1}(\alpha)+\frac{q_{n-1}(\alpha)}{q_n(\alpha)},$$
$$H_2(q_n(\alpha)) =  a_{n+1}(\alpha) =\left \lfloor \frac{q_{n+1}(\alpha)}{q_n(\alpha)} \right  \rfloor$$
for all nonnegative integers $n$.
Then one has
\begin{align*}
\pmb{\mu}(\alpha)  & =  \dege F_i  \\ & =  \dege  G+ (1,0,0,0,\ldots) \\ &
= \dege H_i + (2,0,0,0,\ldots)
\end{align*}
for $i = 1,2$.
\end{theorem}

\begin{proof}
Let $f  \in \mathbb{L}_{>0}$ be defined on $[1,\infty)$ with $f(n) \geq 2 n^2$ for all $n \gg 0$, and consider the condition that
$$\frac{n}{\Vert n \alpha \Vert} \leq f(n)$$ for all $n \gg 0$.
Note that,  for all $n \gg 0$, the inequality
$$\frac{n}{\Vert n \alpha \Vert} >  f(n)$$ implies
$$\frac{\Vert n \alpha \Vert}{n} < \frac{1}{2n^2}$$
and therefore,  by Theorem \ref{ccfa},  that $n$ is the denominator of a convergent of the regular continued fraction expansion of $\alpha$.
Thus,  by Proposition \ref{denomschar}(4), the condition under consideration is equivalent to
$$ F_1(q_k(\alpha)) \leq f(q_k(\alpha))$$
for all $k \gg 0$.  Also by Theorem \ref{ccfa}, one has $F_1(q_k(\alpha))> q_k(\alpha)^2$ for all $k$ and therefore
$$\dege F_1  \geq (2,0,0,0,\ldots).$$
By Theorem \ref{pmbmu}(4), Lemma \ref{difflemexp}, and Theorem \ref{infpropexp}, then, one has
\begin{align*}
\pmb{\mu}( \alpha) & =  \dege \frac{n}{\Vert n \alpha \Vert} \\
& =   \dege \max\left (\frac{n}{\Vert n \alpha \Vert},2n^2 \right) \\
&  = \inf\left\{\dege f: f \in \mathbb{L}_{>0},  \, \forall n \gg 0 \, \left( \max\left( \frac{n}{\Vert n \alpha \Vert},2n^2\right)  \leq f(n) \right) \right \} \\
& = \inf\{\dege f: f \in \mathbb{L}_{>0}, \, \forall k \gg 0 \, ( \max( F_1(q_k(\alpha)), 2q_k(\alpha)^2)) \leq f(q_k(\alpha)) \} \\
& = \dege \max (F_1(q_k(\alpha)), 2q_k(\alpha)^2) \\
&  = \dege F_1.
\end{align*}
Moreover, by (\ref{cfineq}), one has
$$F_2(q_k(\alpha)) < F_1(q_k(\alpha))< 2  F_2(q_k(\alpha))$$
for all $k$.    Therefore, one has
\begin{align*}
\dege F_1 & = \dege F_2 \\
& = \dege G + (1,0,0,0,\ldots) \\
& = \dege H_1 + (2,0,0,0,\ldots).
\end{align*}
Finally,  since $0 < H_1-H_2 < 1$, one has $$\dege H_1 = \dege H_2.$$
This completes the proof.
\end{proof}

The following corollary describes the image of function $\pmb{\mu}$.

\begin{corollary}
Let $f: \ZZ_{>0} \longrightarrow \RR_{>0}$ be a positive real-valued arithmetic function with  $\lim_{n \to \infty} f(n) = \infty$, and, per Lemma \ref{prescribeda}, let  $\alpha$ be the unique irrational number with $a_0(\alpha) = 0$ and $$a_{n+1}(\alpha) = \lceil f(q_n(\alpha)) \rceil$$
for all nonnegative integers $n$.   Then one has
$$\pmb{\mu}( \alpha) =  \dege f|_D+ (2,0,0,0,\ldots),$$
where $D = \{q_n(\alpha): n \in \ZZ_{\geq 0}\}$.  Consequently, for any $\dd \in \prod_{n = 1}^{\infty *} \overline{\RR}$ with $\dd \geq (2,0,0,0,\ldots)$, there exists an irrational $\alpha$ with $\pmb{\mu}(\alpha) = \dd$, and therefore
$$\pmb{\mu}(\RR) = \left\{\dd \in  \prod_{n = 1}^{\infty *} \overline{\RR}: \dd \geq (2,0,0,0,\ldots)\right\} \cup \{(1,0,0,0,\ldots)\}.$$
\end{corollary}

Note also the following.

\begin{corollary}
One has  $\pmb{\mu}(e) = (2,0,0,0,\ldots)$.
\end{corollary}

The following proposition generalizes the corresponding result for the function $\mu$.

\begin{proposition}
If $\alpha, \beta \in \RR$ are continued-fraction equivalent, then $\pmb{\mu}(\alpha) = \pmb{\mu}(\beta)$.  Moreover, if $\alpha \in \RR$ and $r \in \RR$, then $\pmb{\mu}(\alpha+r) = \pmb{\mu}(\alpha)$.
\end{proposition}

\begin{proof}
We may suppose without loss of generality that $\alpha$ is irrational.  By (\ref{qpq}),  if $\alpha \in (0,1)$, then one has $$q_n(\tfrac{1}{\alpha}) \sim \alpha q_{n+1}(\alpha) \ (n \to \infty)$$ and therefore  $$\log^{\circ k} q_n(\tfrac{1}{\alpha}) \sim \log^{\circ k} q_{n+1}(\alpha) \ (n \to \infty)$$ for all positive integers $k$.    The first statement then follows readily from the identity $\pmb{\mu}(\alpha) = \dege G$ of Theorem \ref{pmbmutheorem}.   Let $r = \frac{m}{n}$, where $m,n \in \ZZ$ are relatively prime and $n > 0$.  Suppose to obtain a contradiction that $\pmb{\mu}(\alpha+r) > \pmb{\mu}(\alpha)$.  Then, by Proposition \ref{oexppropstrong}, there exist $f,g \in \mathbb{L}_{>0}$ defined on $[1,\infty)$ with $\pmb{\mu}(\alpha+r) > \dege f > \dege g  > \pmb{\mu}(\alpha)$.    Since $\dege g > \pmb{\mu}(\alpha)$,  one has $$\left| \alpha - \frac{a}{b} \right| \geq \frac{1}{g(b)}$$ for all $a, b \in \ZZ$ with $b \gg 0$.   Moreover,  by Corollary \ref{fgie2}, one has $\dege g(nx) = \dege g < \dege f$, and therefore $g(nx) < f(x)$ for all $x \gg 0$.  It follows that
$$\left| \alpha + r - \frac{a}{b} \right|  = \left| \alpha - \frac{na-mb}{nb}  \right|  \geq \frac{1}{g(nb)} > \frac{1}{f(b)}$$
for all $a, b \in \ZZ$ with $b \gg 0$, whence $\alpha \succ_1 1/f|_{\ZZ_{>0}}$.  But, by Theorem \ref{pmbmu}(2), that contradicts $\pmb{\mu}(\alpha+r) > \dege f$.
\end{proof}

\begin{outstandingproblem}
Compute  $\pmb{\mu}(\alpha)$ for any real algebraic number $\alpha$ of degree greater than $2$, e.g., for $\alpha = \sqrt[3]{2}$.
\end{outstandingproblem}

Let $\mathbf{a} \in \prod_{n = 1}^{\infty*}\overline{\RR}$ denote the supremum of $\pmb{\mu}(\alpha)$ over all real algebraic numbers $\alpha$.   Roth's theorem and Lang's conjecture generalize as follows.

\begin{outstandingproblem}
Compute $\mathbf{a}$.
\end{outstandingproblem}

\begin{proposition}
One has $\mathbf{a} \geq (2,0,0,0,\ldots)$.   Moreover,  Roth's theorem is equivalent to  $\mathbf{a} \leq (2,\infty,1,0,0,0,\ldots)$, and Lang's conjecture is equivalent to $\mathbf{a}  \leq (2,1,\infty,1,0,0,0,\ldots)$.
\end{proposition}

Finally,  using Proposition \ref{iwannapp} and the following early predecessor of Theorem \ref{duffin} proved by Khinchin in 1924, we show that $\pmb{\mu}(\alpha) = (2,1,1,1,\ldots)$ for almost all real numbers $\alpha$.

\begin{theorem}[{Khinchin [150] \cite[Theorem 2.1]{koukou}}]\label{khinchin}
Let  $f: \ZZ_{>0} \longrightarrow \RR_{\geq 0}$ be a nonnegative real-valued arithmetic function.     If $\sum_{n = 1}^\infty n f(n) < \infty$, then  $\alpha \succ_1 f$  for almost all $\alpha \in \RR$.  On the other hand, if  $\sum_{n = 1}^\infty n f(n) = \infty$ and $n^2 f(n)$ is nonincreasing, then $\alpha \not \succ_1 f$  for almost all $\alpha \in \RR$.
\end{theorem}

\begin{theorem}\label{mualmostall}
Let  $F: [1,\infty) \longrightarrow \RR_{>0}$ be a positive continuous monotonic Hardian function of finite degree,  and let $f = F|_{\ZZ_{>0}}$.
\begin{enumerate}
\item If $\dege f > (2,1,1,1,\ldots)$, then one has $\alpha \succ_1 1/f$ for almost all $\alpha \in \RR$.
\item If $\dege f < (2,1,1,1,\ldots)$ and $\frac{n^2}{f(n)}$ is nonincreasing, then one has $\alpha  \not \succ_1 1/f$  for almost all $\alpha \in \RR$.
\item One has $\pmb{\mu}(\alpha) = (2,1,1,1,\ldots)$ for almost all $\alpha \in \RR$.
\end{enumerate}
\end{theorem}

\begin{proof}
Let $g = 1/f$.   If $\dege f > (2,1,1,1,\ldots)$, then  $\dege n g(n) < (-1,-1,-1,\ldots)$,  and therefore, by Proposition \ref{iwannapp}, the sum $\sum_{n = 1}^\infty n g(n)$ converges.  On the other hand,  if $\dege f < (2,1,1,1,\ldots)$, then $\dege n g(n) > (-1,-1,-1,\ldots)$,  and therefore, by Proposition \ref{iwannapp}, the sum $\sum_{n = 1}^\infty n g(n)$ diverges.   Thus,  statements (1) and (2) follow from Theorem \ref{khinchin}. Now, for any positive integer $n$, we may choose any positive continuous monotonic logarithmico-exponential functions $F_n(x)$ and $G_n(x)$ on $[1,\infty)$ of logexponential degree $(2,1,1,1,\ldots, 1,2,0,0,0,\ldots)$ and $(2,1,1,1,\ldots, 1,-2,0,0,0,\ldots)$, respectively,  where the initial $2$ is followed by a sequence of $n$ $1$s, and where  $\frac{x^2}{G_n(x)}$ is  nonincreasing on $[1,\infty)$.   Then, for almost all real numbers $\alpha$, one has
$\alpha \succ_1 1/F_n|_{\ZZ_{>0}}$ and therefore $\pmb{\mu}(\alpha) \leq \dege F_n$.  Likewise, for almost all real numbers $\alpha$, one has $\alpha  \not \succ_1 1/G_n|_{\ZZ_{>0}}$ and therefore $\pmb{\mu}(\alpha) \geq \dege G_n$.    Since a countable union of measure $0$ sets is measure $0$,   it follows that, for all real numbers $\alpha$ outside a set of measure $0$,  one has
$$(2,1,1,1,\ldots, 1,-2,0,0,0,\ldots) \leq \pmb{\mu}(\alpha) \leq (2,1,1,1,\ldots, 1,2,0,0,0,\ldots)$$
for any finite sequence of $1$s.   Statement (3) follows.
\end{proof}

The {\bf Jarn\'ik--Besicovitch theorem}, \index{Jarn\'ik--Besicovitch theorem} proved independently by V.\ Jarn\'ik [144] and A.\ S.\ Besicovitch [26] in  1929 and 1934, respectively, states that the Hausdorff dimension of the set $\mu^{-1}(t)$ is $2/t$ for all $t \geq 2$.

\begin{problem} If possible, using \cite[Theorem 1]{beres} and/or the notion of {\it Hausdorff measure with respect to a dimension function (or gauge function)} [24] [252], generalize the Jarn\'ik--Besicovitch theorem to the function $\pmb{\mu}$.
\end{problem}

Given the results and conjectures discussed in this section,  it seems reasonable to speculate that $\pmb{\mu}(\alpha) \leq (2,1,1,1,\ldots)$ for all real algebraic numbers $\alpha$, and also that $\pmb{\mu}(\pi) = (2,1,1,1,\ldots)$.  If it were true that $\pmb{\mu}(\pi) = (2,1,1,1,\ldots)$, then $\pi$ would be like a ``typical'' real number, in the sense of Theorem \ref{mualmostall}(3).  Likewise, if it were true that $\pmb{\mu}(\alpha) < (2,1,1,1,\ldots)$ for all real algebraic numbers $\alpha$, then all real algebraic numbers would be exceptional.

\section{L\'evy and relative L\'evy constants}

For any irrational $\alpha$, the {\bf L\'evy constant $\lambda(\alpha)$ of $\alpha$}\index{Levy @L\'evy constant $\lambda(\alpha)$} is defined by
$$\lambda(\alpha) = \lim_{n \to \infty} \frac{1}{n} \log q_n(\alpha),\index[symbols]{.v  b@$\lambda(\alpha)$}$$ provided that the limit exists.    Note that, if  $\lambda(\alpha)$ exists, then $\mu(\alpha) \leq 2$.   By Theorem \ref{levythm}, which was proved by  L\'evy in 1937 [181], one has
$\lambda(\alpha) = \frac{\pi^2}{12 \log 2}$
for almost all real numbers $\alpha$.    Naturally, we define
$$\overline{\lambda}(\alpha) = \limsup_{n \to \infty} \frac{1}{n} \log q_n(\alpha) = \deg(q_n(\alpha); e^n) = \log \limsup_{n \to \infty} q_n(\alpha)^{1/n}\index[symbols]{.v  c@$\overline{\lambda}(\alpha)$}\index{upper L\'evy constant $\overline{\lambda}(\alpha)$}$$
$$\underline{\lambda}(\alpha) = \liminf_{n \to \infty} \frac{1}{n} \log q_n(\alpha) = \underline{\deg}(q_n(\alpha); e^n)= \log \liminf_{n \to \infty} q_n(\alpha)^{1/n},\index[symbols]{.v  d@$\underline{\lambda}(\alpha)$}\index{lower L\'evy constant $\underline{\lambda}(\alpha)$}$$
which we call the {\bf upper and lower L\'evy constants of $\alpha$}, respectively,  and which, unlike $\lambda(\alpha)$,
both exist  (in $[\log \Phi,\infty]$) for any irrational $\alpha$.   Note the following.

\begin{proposition}
Let $\alpha \in \RR$ be irrational.
\begin{enumerate}
\item $\overline{\lambda}(\alpha) \geq \underline{\lambda}(\alpha) \geq \lambda(\Phi) = \log\Phi$.
\item $\lambda(\alpha)$ exists if and only if $\log q_n(\alpha) \sim cn \ (n \to \infty)$ for some $c > 0$.
\item $\overline{\lambda}(\alpha) < \infty$ if and only if $\log q_n(\alpha) \ll n \ (n \to \infty)$, if and only if $\log q_n(\alpha) \asymp n \ (n \to \infty)$.
\item  $\overline{\lambda}(\alpha) \leq \log B(\alpha)$, where  $B(\alpha) = \limsup_{n \to \infty} \frac{q_{n+1}(\alpha)}{q_n(\alpha)}$.
\item $\underline{\lambda}(\alpha) \geq \log \underline{B}(\alpha)$, where  $\underline{B}(\alpha) = \liminf_{n \to \infty} \frac{q_{n+1}(\alpha)}{q_n(\alpha)}$.
\item If $\alpha$ is badly approximable, then $\overline{\lambda}(\alpha) < \infty$.
\end{enumerate}
\end{proposition}

\begin{proof}
Statement (1) follows from the fact that $q_n(\alpha) \geq q_n(\Phi) =  F_{n+1}$ for all $n$.  Statements (2) and (3) are clear.   If $\frac{q_{n+1}(\alpha)}{q_n(\alpha)}$ is bounded above,  say, by $M > 1$, for all $n \geq N$,  where $N$ is a positive integer, then $q_n(\alpha) \leq q_N(\alpha) M^{n-N}$, whence $\log q_n(\alpha) \leq (n-N) \log M+ \log q_N(\alpha)$,  for all $n \geq N$, so that $\overline{\lambda}(\alpha) \leq \log M$.  Statement (4)  follows, and statement (5) is proved similarly, with the inequalities reversed.
Finally, statement (6) follows from statements (3) and (4), or, alternatively, from Corollary  \ref{badapp}.
\end{proof}

It is known that the image of $\lambda$ on the set of all irrational numbers whose L\'evy constant exists is $[\log\Phi,\infty)$,  and in fact the image of $\lambda$ on the set of all transcendental real numbers whose L\'evy constant exists is also $[\log\Phi,\infty)$ [21].  Moreover,  $\lambda(\alpha)$ exists for every quadratic irrational $\alpha$, and the image of $\lambda$ on the set of all quadratic irrationals is dense in $[\log\Phi,\infty)$ [298].

The proof of \cite[Lemma 11]{baxa}, which is a simple application of (\ref{cfineq00}) and (\ref{cfineq0}), yields the following.

\begin{proposition}[{cf., \cite[Lemma 11]{baxa}}]
Let $\alpha,\beta \in \RR$ be irrational.   One has
$$\log q_{n}(\alpha) = \sum_{k = 1}^n \log S^{\circ k}(\alpha) + O(1) \ (n \to \infty).$$  Consequently, one has
$$\overline{\lambda}(\alpha) = \limsup_{n \to \infty}  \frac{1}{n} \sum_{k = 1}^n \log  S^{\circ k}(\alpha) $$
$$\underline{\lambda}(\alpha) = \liminf_{n \to \infty}  \frac{1}{n} \sum_{k = 1}^n \log S^{\circ k}(\alpha).$$
Moreover, if $\alpha$ and $\beta$ are continued-fraction equivalent, then $\overline{\lambda}(\alpha) = \overline{\lambda}(\beta)$ and $\underline{\lambda}(\alpha) = \underline{\lambda}(\beta)$.
\end{proposition}

For all irrationals $\alpha$ and $\beta$,  let us define
$$\overline{\lambda}(\alpha; \beta) = \limsup_{n \to \infty} \frac{\log q_n(\alpha)}{\log q_n(\beta)} = \deg(q_n(\alpha);q_n(\beta)) \in [0,\infty]\index[symbols]{.v  e@$\overline{\lambda}(\alpha; \beta)$}\index{upper relative L\'evy constant $\overline{\lambda}(\alpha;\beta)$}$$
$$\underline{\lambda}(\alpha; \beta)= \liminf_{n \to \infty} \frac{\log q_n(\alpha)}{\log q_n(\beta)} = \underline{\deg}(q_n(\alpha);q_n(\beta)) \in [0,\infty],\index[symbols]{.v  f@$\underline{\lambda}(\alpha; \beta)$}\index{lower relative L\'evy constant $\overline{\lambda}(\alpha;\beta)$}$$
which we call the {\bf upper and lower relative L\'evy constants of $\alpha$ with respect to $\beta$}, respectively.
Propositions \ref{levyprop1} and \ref{levyprop2} below  express both  the upper and lower L\'evy constants and the irrationality measure in terms of the upper and lower relative L\'evy constants.

\begin{proposition}\label{levyprop1}  One has the following.
\begin{enumerate}
\item For all irrationals $\alpha$ and $\beta$, one has
$$\overline{\lambda}(\alpha;\alpha) = \underline{\lambda}(\alpha;\alpha) = 1,$$
$$\underline{\lambda}(\alpha; \beta) = \frac{1}{\overline{\lambda}(\beta; \alpha)},$$
and also
$$\underline{\lambda}(\alpha)  \leq \underline{\lambda}(\beta) \underline{\lambda}(\alpha; \beta) \leq  \overline{\lambda}(\beta) \overline{\lambda}(\alpha; \beta) \leq \overline{\lambda}(\alpha)$$
whenever the respective products are defined in  $[0,\infty]$.
\item For any irrational $\alpha$, one has
$$\overline{\lambda}(\alpha) =\lambda (\Phi) \overline{\lambda}(\alpha;\Phi)$$
$$\underline{\lambda}(\alpha) = \lambda (\Phi)\underline{\lambda}(\alpha;\Phi).$$
\item For any irrational $\beta$,  the L\'evy constant $\lambda(\beta)$ exists and equals $l > 0$ if and only if
$$\overline{\lambda}(\alpha) = l  \overline{\lambda}(\alpha; \beta) $$
for all irrationals $\alpha$, if and only if
$$\underline{\lambda}(\alpha) = l \underline{\lambda}(\alpha; \beta)$$
for all irrationals $\alpha$.
\item For all irrationals $\alpha$ and $\beta$, one has
$$\overline{\lambda}(\alpha';\beta')  = \overline{\lambda}(\alpha;\beta) $$
$$\underline{\lambda}(\alpha';\beta') = \underline{\lambda}(\alpha;\beta)$$
if $\alpha'=  \alpha +m$ and $\beta' =  \beta +n$ for any $m,n \in \ZZ$.
\item For  all irrationals $\alpha$ and $\beta$, one has
$$\overline{\lambda}(\alpha; \beta) = \limsup_{n \to \infty}  \frac{ \sum_{k = 1}^n \log  S^{\circ k}(\alpha) }{\sum_{k = 1}^n \log  S^{\circ k}(\beta) }$$
$$\underline{\lambda}(\alpha; \beta) = \liminf_{n \to \infty}  \frac{ \sum_{k = 1}^n \log  S^{\circ k}(\alpha) }{\sum_{k = 1}^n \log  S^{\circ k}(\beta)}.$$
\end{enumerate}
\end{proposition}

Finally, by (\ref{qpq}) and Proposition \ref{levyprop1}(4) above,  one has the following.

\begin{proposition}\label{levyprop2}
For any irrational $\alpha$, one has
\begin{align*}
\mu(\alpha)   = 1+ \overline{\lambda}\left(\tfrac{1}{\{\alpha\}}, \{\alpha\}\right) = 1+\overline{\lambda}(S(\alpha), \alpha)
\end{align*}
\begin{align*}
\underline{\mu}(\alpha)   =1+ \underline{\lambda}\left(\tfrac{1}{\{\alpha\}}, \{\alpha\}\right)   =1+ \underline{\lambda}(S(\alpha), \alpha).
\end{align*}
\end{proposition}

Thus, the upper and lower  relative  L\'evy constants are a natural common generalization of both L\'evy constants and irrationality measure.

\section{Rates of convergence}

In this section, we discuss various ways to define  the ``rate of convergence'' of a  convergent sequence of real numbers.   Our primary concern is with the sequence of convergents of the regular continued fraction expansion of an irrational number.

Let $\{\alpha_n\}_n$ be a sequence of real numbers that converge to $\alpha$ but are eventually not equal to $\alpha$.   The {\bf $Q$-order of convergence $Q\{\alpha_n\}_n$ of $\{\alpha_n\}_n$}\index{$Q$-order of convergence $Q\{\alpha_n\}_n$} is defined by
\begin{align*}
Q\{\alpha_n\}_n & =  \sup\{ c \in [1,\infty): |\alpha-\alpha_{n+1}| = O\left( | \alpha-\alpha_n|^c \right) \ (n \to \infty) \} \\ &= \liminf_{n \to \infty } \frac{\log|\alpha-\alpha_{n+1}|}{\log|\alpha-\alpha_{n}|}
\\ & = \underline{\deg} \left( |\alpha-\alpha_{n+1}|;|\alpha-\alpha_{n}|\right)\\ &  \in [1,\infty]\index[symbols]{.v  k@$Q\{\alpha_n\}_n$}
\end{align*}
[240].  If $Q\{\alpha_n\}_n < \infty$, then we define the {\bf upper and lower reciprocal rates of convergence  $\overline{\rho}\{\alpha_n\}_n$ and  $\underline{\rho}\{\alpha_n\}_n$ of $\{\alpha_n\}_n$} to be
$$ \overline{\rho}\{\alpha_n\}_n  = \limsup_{n \to \infty } \frac{|\alpha-\alpha_{n+1}|}{|\alpha-\alpha_{n}|^{Q\{\alpha_n\}_n}} \in [0,\infty]\index[symbols]{.va  a@$\overline{\rho}\{\alpha_n\}_n$}\index{upper reciprocal rate of convergence  $\overline{\rho}\{\alpha_n\}_n$}$$
$$ \underline{\rho}\{\alpha_n\}_n = \liminf_{n \to \infty } \frac{|\alpha-\alpha_{n+1}|}{|\alpha-\alpha_{n}|^{Q\{\alpha_n\}_n}} \in [0,\infty],\index[symbols]{.va  b@$\underline{\rho}\{\alpha_n\}_n$}\index{lower reciprocal rate of convergence  $\underline{\rho}\{\alpha_n\}_n$}$$

\begin{example}
If for some $c \in [1,\infty)$ one has
$$|\alpha-\alpha_{n+1}| \asymp |\alpha-\alpha_{n}|^c \ (n \to \infty),$$
then $$Q\{\alpha_n\}_n = \lim_{n \to \infty } \frac{\log|\alpha-\alpha_{n+1}|}{\log|\alpha-\alpha_{n}|}  =  c,$$ and if also
$$|\alpha-\alpha_{n+1}| \sim r|\alpha-\alpha_{n}|^c \ (n \to \infty),$$
for some $r \in (0,\infty)$,
$$ \underline{\rho}\{\alpha_n\}_n =  \overline{\rho}\{\alpha_n\}_n = r.$$
In numerical analysis, if the $\sim$ condition above holds, then $\{\alpha_n\}_n$ is said to have  {\bf order of convergence $c$} and {\bf rate of convergence $r$}.
\end{example}

\begin{example}
Let $c,r,s \in \RR$ with $0< s < r \leq 1 \leq c$.   Let $a_0 = 1$, and let
$$a_{n+1}=   \left.
\begin{cases}
r a_n^c & \text{if $n$ is even} \\
s a_n^c  & \text{if $n$ is odd}
\end{cases}
\right.$$
for all nonnegative integers $n$.  Then one has $\lim_{n \to \infty} a_n = 0$,  $Q\{\alpha_n\}_n = c$, $ \overline{\rho}\{\alpha_n\}_n  = r$, and $ \underline{\rho}\{\alpha_n\}_n  = s$.
\end{example}

For any irrational $\alpha$,  we let $$ Q(\alpha) = Q\left\{\frac{p_n(\alpha)}{q_n(\alpha)}\right\}_n \in [1,\infty],\index[symbols]{.va  c@$Q(\alpha)$}$$
and, if $Q(\alpha) < \infty$, then we let
$$ \overline{\rho}(\alpha) =  \overline{\rho}\left\{\frac{p_n(\alpha)}{q_n(\alpha)}\right\}_n\in [0,\infty]\index[symbols]{.va  d@$\overline{\rho}(\alpha)$}$$
$$\underline{\rho}(\alpha) = \underline{\rho}\left\{\frac{p_n(\alpha)}{q_n(\alpha)}\right\}_n\in [0,\infty].\index[symbols]{.va  e@$\underline{\rho}(\alpha)$}$$
$$\left |\alpha -\frac{p_n(\alpha)}{q_n(\alpha)} \right|  \asymp \frac{1}{q_n(\alpha)q_{n+1}(\alpha)} = \left |\frac{p_{n+1}(\alpha)}{q_{n+1}(\alpha)}-\frac{p_n(\alpha)}{q_n(\alpha)} \right| \ (n \to \infty),$$ one has the following.

\begin{proposition}\label{Qmu}
Let $\alpha \in \RR$ be irrational.   One has
\begin{align*}
Q(\alpha) & =\underline{ \deg} \left (  \left |\alpha -\frac{p_{n+1}(\alpha)}{q_{n+1}(\alpha)} \right| ;  \left |\alpha -\frac{p_{n}(\alpha)}{q_{n}(\alpha)} \right|  \right) \\ & =\underline{ \deg} \left (  \left |\frac{p_{n+1}(\alpha)}{q_{n+1}(\alpha)}-\frac{p_n(\alpha)}{q_n(\alpha)} \right| ;  \left |\frac{p_{n}(\alpha)}{q_{n}(\alpha)}-\frac{p_{n-1}(\alpha)}{q_{n-1}(\alpha)} \right|  \right)  \\ & = \underline{\deg}( q_n(\alpha)q_{n+1}(\alpha); q_{n-1}(\alpha)q_{n}(\alpha)) \\
& =  \liminf_{n \to \infty} \frac{1+ \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)}}{1+\frac{1}{\frac{\log q_{n}(\alpha)}{\log q_{n-1}(\alpha)}}}
\end{align*}
and therefore
$$\underline{\deg} (q_{n+1}(\alpha); q_n(\alpha)) =  \underline{\mu}(\alpha)-1  \leq Q(\alpha) \leq \mu(\alpha)-1 = \deg (q_{n+1}(\alpha); q_n(\alpha)).$$
\end{proposition}

Let us define $\overline{Q}\{\alpha_n\}_n$ and $\overline{Q}(\alpha)$ as in the definitions of  $Q\{\alpha_n\}_n$ and $Q(\alpha)$, but using limits superior instead of limits inferior.   Then one has
\begin{align*}
\overline{Q}\{\alpha_n\}_n & =  \inf\{ c \in [1,\infty): |\alpha-\alpha_{n+1}| \gg | \alpha-\alpha_n|^c \ (n \to \infty) \} \\ &= \limsup_{n \to \infty } \frac{\log|\alpha-\alpha_{n+1}|}{\log|\alpha-\alpha_{n}|}
\\ & = \deg \left( |\alpha-\alpha_{n+1}|;|\alpha-\alpha_{n}|\right)\\ &  \in [1,\infty],
\end{align*}
and the obvious analogue of Proposition \ref{Qmu} holds for $\overline{Q}(\alpha)$.  In particular, one has
\begin{align}\label{qmuineq}
\underline{\mu}(\alpha)-1  \leq Q(\alpha) \leq \overline{Q}(\alpha) \leq \mu(\alpha)-1
\end{align}
for all irrationals $\alpha$.    Consequently,  one has the following.

\begin{corollary}
Let $\alpha \in \RR$, and suppose that $\mu(\alpha) = \underline{\mu}(\alpha)$, i.e.,  suppose that
$$\mu(\alpha) =1+ \lim_{n \to \infty}  \frac{\log q_{n+1}(\alpha)}{\log q_{n}(\alpha)}.$$
Then one has
\begin{align*}
Q(\alpha) = \overline{Q}(\alpha)  = \mu(\alpha)-1.
\end{align*}
\end{corollary}

\begin{corollary}
For all $\alpha \in \RR$ with $\mu(\alpha) = 2$, one  has $Q(\alpha) =  \overline{Q}(\alpha) = 1$, and therefore
\begin{align*}
\overline{\rho}(\alpha)    =   \limsup_{n \to \infty } \frac{ \left|\alpha-\frac{p_{n+1}(\alpha)} {q_{n+1}(\alpha)}\right|}{ \left|\alpha-\frac{p_{n}(\alpha)} {q_{n}(\alpha)}\right|} \in [0,1]
\end{align*}
\begin{align*} \underline{\rho}(\alpha)  = \liminf_{n \to \infty } \frac{ \left|\alpha-\frac{p_{n+1}(\alpha)} {q_{n+1}(\alpha)}\right|}{ \left|\alpha-\frac{p_{n}(\alpha)} {q_{n}(\alpha)}\right|} \in [0,1].
\end{align*}
\end{corollary}

\begin{example}
One has $\mu(e) = 2$, $M(e) =  \overline{\lambda}(e) = \underline{\lambda}(e) = \infty$,  $Q(e)  = \overline{Q}(e) = 1$,  $ \overline{\rho}(e) = 1$, and $ \underline{\rho}(e) = 0$.
\end{example}

The following example shows that all three inequalities in (\ref{qmuineq}) can be strict,  even given prescribed values $a$ of $\mu(\alpha)$ and $b$ of $\underline{\mu}(\alpha)$ with $2 < b < a < \infty$.

\begin{example}
For any real numbers $a > b> 1$,  there is a unique real number $\alpha$ with $a_0(\alpha) = 0$ and
$$a_{n+1}(\alpha) =   \left.
\begin{cases}
\lceil q_n(\alpha)^{a-1} \rceil & \text{if $n$ is even} \\
\lceil q_n(\alpha)^{b-1} \rceil  & \text{if $n$ is odd}
\end{cases}
\right.$$
for all nonnegative integers $n$,  and one has
$$ \underline{\mu}(\alpha)-1   = b < Q(\alpha)  = \frac{1+b}{1+\frac{1}{a}} <  \overline{Q}(\alpha) =  \frac{1+a}{1+\frac{1}{b}}  <  \mu(\alpha)-1 = a.$$
\end{example}

\begin{problem}
Does one have $\mu(\alpha) = 2$, $\overline{\rho}(\alpha) = 1$, and $ \underline{\rho}(\alpha) = 0$ for almost all irrationals $\alpha$?
\end{problem}

For any irrational number $\alpha$,  the quantity
$$R(\alpha)    =   \limsup_{n \to \infty } \frac{ \left|\alpha-\frac{p_{n}(\alpha)} {q_{n}(\alpha)}\right|}{ \left|\alpha-\frac{p_{n+1}(\alpha)} {q_{n+1}(\alpha)}\right|} \in [0,1] \index[symbols]{.va  f@${R}(\alpha)$}$$
is yet another measure of the rational approximability of $\alpha$.   Equivalently,  $R(\alpha)$ is the infimum of all $r \geq 1$ such that
\begin{align*}
\left|\alpha-\frac{p_{n}(\alpha)} {q_{n}(\alpha)}\right| \leq r \left|\alpha-\frac{p_{n+1}(\alpha)} {q_{n+1}(\alpha)}\right|, \quad \forall n \gg 0.
\end{align*}
If $Q(\alpha)$ is minimal, that is, if $Q(\alpha) = 1$ (or if $\mu(\alpha) = 2$), then one has
$$R(\alpha) = \frac{1}{ \underline{\rho}(\alpha)},$$
while, if $Q(\alpha) > 1$, then $R(\alpha ) = \infty$.  Thus,  the quantity $ \frac{1}{ \underline{\rho}(\alpha)}$ is a more refined invariant than $R(\alpha)$.  However,  unlike $Q(\alpha)$ and $R(\alpha)$,  the quantity $ \frac{1}{ \underline{\rho}(\alpha)}$  is not invariant under continued-fraction equivalence,  since, for example,  $ \underline{\rho}(\tfrac{1}{\alpha})$ need not equal $ \underline{\rho}(\alpha)$ if $Q(\alpha) > 1$.  Indeed,  for any irrational $\alpha$, the convergents of $\frac{1}{\alpha}$ are the reciprocals of the convergents of $\alpha$ with an index shift forward or back by $1$, and, moreover, if  $\alpha_n \neq 0$ for all $n$ and $\alpha = \lim_{n \to \infty} \alpha_n \neq 0$, then one has $$Q\left\{\frac{1}{\alpha_n}\right\}_n = Q\{\alpha_n\}_n,$$
$$\overline{\rho}\left\{\frac{1}{\alpha_n}\right\}_n = |\alpha|^{2Q\{\alpha_n\}_n-2}\overline{\rho}\{\alpha_n\}_n$$
$$\underline{\rho}\left\{\frac{1}{\alpha_n}\right\}_n =|\alpha|^{2Q\{\alpha_n\}_n-2} \underline{\rho}\{\alpha_n\}_n$$
if $ Q\{\alpha_n\}_n < \infty$.
Thus, one has the following.

\begin{proposition}
The functions $\overline{\rho}$ and $\underline{\rho}$ are even and periodic of period $1$.
Let $\alpha, \beta \in \RR$ be irrational.  If  $\alpha$ and $\beta$  are continued-fraction equivalent, then $Q(\alpha ) = Q(\beta)$ and $R(\alpha) = R(\beta)$.    Moreover,  if $Q(\alpha) < \infty$, then one has
$$\overline{\rho}\left(\frac{1}{\alpha} \right) = |\alpha|^{2Q(\alpha)-2}\overline{\rho}(\alpha),$$
$$\underline{\rho}\left(\frac{1}{\alpha} \right)  =|\alpha|^{2Q(\alpha)-2} \underline{\rho}(\alpha).$$
$$\overline{\rho}(S(\alpha)) = |S(\alpha)|^{2-2Q(\alpha)}\overline{\rho}(\alpha),$$
$$\underline{\rho}(S(\alpha))  =|S(\alpha)|^{2-2Q(\alpha)} \underline{\rho}(\alpha).$$
\end{proposition}

Note that the quantity
$$\underline{R}(\alpha) = \liminf_{n \to \infty } \frac{ \left|\alpha-\frac{p_{n}(\alpha)} {q_{n}(\alpha)}\right|}{ \left|\alpha-\frac{p_{n+1}(\alpha)} {q_{n+1}(\alpha)}\right|}  \in [1,\infty]\index[symbols]{.va  fa@$\underline{R}(\alpha)$}$$
which, equivalently,  is the supremum of all $r \geq 1$ such that
\begin{align*}
\left|\alpha-\frac{p_{n}(\alpha)} {q_{n}(\alpha)}\right| \geq r \left|\alpha-\frac{p_{n+1}(\alpha)} {q_{n+1}(\alpha)}\right|, \quad \forall n \gg 0,
\end{align*}
is also invariant under continued-fraction equivalence.

By (\ref{cfineq00})--(\ref{cfineq0}), one has the following.

\begin{proposition}\label{RProp}
Let $\alpha \in \RR$ be  irrational with regular continued fraction expansion $[a_0,a_1,a_2,\ldots]$.   One has
\begin{align*}