%! TEX root = AN.tex
% vim: tw=50
% 05/02/2025 09AM


\begin{fcthm}[Dirichlet's divisor problem]
  \label{dirichlet:d:problem}
  For $x \ge 2$,
  \[
    \sum_{n \le x} \tauf(n)
    = \mathcloze{x \log x + (2\gamma - 1)x +
    \On(x^{1 / 2})}
  \]
  where $\eulgamma$ is \gls{eulc}.
\end{fcthm}

\begin{proof}
  We use the \nameref{dhypm}, with $y =
  x^{\half}$. Note that $\tau = 1 \conv 1$. Then,
  \begin{align*}
    \sum_{n \le x} \tau(n)
    &= \sum_{d \le x^{\half}} \sum_{m \le
    \frac{x}{d}} 1 + \sum_{m \le x^{\half}}
    \sum_{x^{\half} < d \le \frac{x}{m}} 1 \\
    &= \sum_{x \le x^{\half}} \left( \frac{x}{d} +
    \On(1)\right) + \sum_{m \le x^{\half}} \left(
    \frac{x}{m} - x^{\half} + \On(1) \right) \\
    &= x\sum_{d \le x^{\half}} \frac{1}{d} +
    x\sum_{m \le x^{\half}} \frac{1}{m} - \sum_{m
    \le x^{\half}} x^{\half} + \On(x^{\half})
  \end{align*}
  Recall from Lecture 2 that
  \[
    \sum_{d \le y} \frac{1}{d} = \log y +
    \eulgamma + \On \left( \frac{1}{y} \right)
  .\]
  Taking $y = x^{\half}$, the previous expression
  becomes
  \[
    2 \times \left( \half \log x + \eulgamma + \On
    \left( \frac{1}{x^{\half}} \right) \right) - x
    + \On(x^{\half})
    = x \log x + (2\eulgamma - 1) x + \On(x^{\half})
    .
    \qedhere
  \]
\end{proof}

\newpage
\section{Elementary Estimates for Primes}

Recall from Lecture 1:
\begin{itemize}
  \item $\sum_p \frac{1}{p} = \infty$
    (\gls{thm:eul})
  \item $\pi(x) \vll \frac{x}{\log x}$ (\gls{cheb})
\end{itemize}

\subsection{Merten's Theorems}

\begin{fcthm}[Merten's Theorem]
  \label{thm:merten}
  Assuming:
  - $x \ge 3$
  Thens:[(i)]
  - $\sum_{p \le x} \frac{\log p}{p} = \log x +
  \On(1)$
  - $\sum_{p \le x} \frac{1}{p} = \log \log x + M
  + \On \left( \frac{1}{\log x} \right)$ (for some
  $M \in \Rbb$)
  - $\prod_{p \le x} \left( 1 - \frac{1}{p}
  \right) = \frac{c + \on(1)}{\log x}$ (for some $c
  > 0$)
\end{fcthm}

\begin{remark*}
  Can show $c = e^{-\eulgamma}$.
\end{remark*}

\begin{proof}
  \phantom{}
  \begin{enumerate}[(i)]
    \item Let $N = \left\lfloor x \right\rfloor$.
      Consider $N!$. We have
      \begin{align*}
        N^N
        &\le N^N \\
        N!
        &\ge N^N e^{-N}
      \end{align*}
      (the second inequality cn be proved by
      induction, using $\left( 1 + \frac{1}{N}
      \right)^N \le e$).

      Let $v_p(k)$ be the largest power of $p$
      dividing $k$. Then
      \begin{align*}
        N!
        &= \prod_{p \le N} p^{v_p(N!)}
        &&\text{(fundamental theorem of
        arithmetic)} \\
        \implies \log N!
        &= \sum_{p \le N} v_p(N!) \log p
      \end{align*}
      We have $v_p(N!) = \sum_{j = 1}^\infty
      \left\lfloor \frac{N}{p^j} \right\rfloor$.
      Indeed,
      \begin{align*}
        v_p(N!)
        &= \sum_{k = 1}^N v_p(k) \\
        &= \sum_{k = 1}^N \sum_{j = 1}^\infty
        \indicator{v_p(k) \ge j} \\
        &= \sum_{j = 1}^\infty \sum_{k = 1}^N
        \indicator{v_p(k) \ge j} \\
        &= \sum_{j = 1}^\infty \left\lfloor
        \frac{N}{p^j} \right\rfloor
      \end{align*}
      Now,
      \begin{align*}
        \log N!
        &= \sum_{p \le N} \left\lfloor \frac{N}{p}
        \right\rfloor \log p
        + \sum_{p \le N} (\log p) \sum_{j =
        2}^\infty \left\lfloor \frac{N}{p^j}
        \right\rfloor \\
        &= \sum_{p \le N} \left( \frac{N}{p} +
        \On(1) \right) \log p + \On \left( \sum_{p \le
        N} \frac{\log p}{p^2} \cdot N \right)
        &&\text{(geometric series)} \\
        &= N \sum_{p \le N} \frac{\log p}{p} +
        \ub{\On
        \left( \sum_{p \le N} \log p \right)}_{\le
        (\log N) \pi(N) \vll N
        (\glsref[cheb]{Chebyshev})} + \On(N)
        &&\text{(since $\sum_p \frac{\log p}{p^2}
        < \infty$)} \\
        &= N \sum_{p \le N} \frac{\log p}{p} +
        \On(N)
      \end{align*}
      Combine with $\log N! = N\log N + \On(N)$ to
      get
      \[
        N \log N + \On(N)
        = N \sum_{p \le N} \frac{\log p}{p} +
        \On(N)
      .\]
      Divide by $N$ to get the result.
    \item By \nameref{lemma:partsum}, this is
      \[
        1 + \On \left( \frac{1}{ \log x} \right)
        + \int_{2}^{x} \frac{\sum_{p \le t}
        \frac{\log p}{p}}{t(\log t)^2} \dd t
      .\]
      Writing $\eps(t) = \sum_{p \le t} \frac{\log
      p}{p} - \log t$, we get
      \begin{align*}
        &1 + \On \left( \frac{1}{\log x} \right) +
        \int_2^x \frac{\dd t}{t \log t} + \int_2^x
        \frac{\eps(t)}{t(\log t)^2} \dd t \\
        &= 1 + \On \left( \frac{1}{\log x} \right)
        + \log \log x - \log \log 2 +
        \int_2^\infty \frac{\eps(t)}{t(\log t)^2}
        \dd t + \On \left( \int_x^\infty
        \frac{|\eps(t)|}{t(\log t)^2} \dd t \right)
      \end{align*}
      By part (i),
      \begin{align*}
        \int_x^\infty \frac{|\eps(t)|}{t(\log
        t)^2} \dd t \\
        &\vll \int_x^\infty \frac{1}{t(\log t)^2}
        \dd t \\
        &\vll \frac{1}{\log x}
      \end{align*}
      Take $M = 1 - \log \log 2 + \int_2^\infty
      \frac{\eps(t)}{t(\log t)^2} \dd t$.
    \item Use Taylor expansion
      \[
        \log(1 - y) = -\sum_{j = 1}^\infty
        \frac{y^j}{j}
      \]
      to get
      \begin{align*}
        \log \prod_{p \le x} \left( 1 -
        \frac{1}{p} \right)
        &= \sum_{p \le x} \log \left( 1 -
        \frac{1}{p} \right) \\
        &= -\sum_{p \le x} \frac{1}{p} - \sum_{p
        \le x} \sum_{j = 2}^\infty \frac{p - j}{j}
      \end{align*}
      Write $H = \sum_p \sum_{j = 2}^\infty
      \frac{p - j}{j}$. We get 
      \begin{align*}
        &= -\sum_{p \le x} \frac{1}{p} - H + \On
        \left( \sum_{p > x} \ub{\sum_{j = 2}^\infty
        \frac{p - j}{j}}_{\vll p^{-2}} \right) \\
        &= -\sum_{p \le x} \frac{1}{p} - H + \On
        \left( \frac{1}{x} \right) \\
        &\stackrel{\text{(ii)}}{=} -\log \log x - H + \On
        \left( \frac{1}{x} \right)
      \end{align*}
      Taking exponentials,
      \[
        \prod_{p \le x} \left( 1 - \frac{1}{p} \right)
        = \frac{c + \on(1)}{\log x}
        .
        \qedhere
      \]
  \end{enumerate}
\end{proof}
