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

% Lecture notes on Moodle
% jt945@cam.ac.uk
% Books:
% - Apostol: Introduction to analytic number
%   theory
% - Murty: Problems in analytic number theory
% - Davenport: Multiplicative number theory

\newpage
What is analytic number theory?

\begin{itemize}
  \item Study of number-theoretic problems using
    analysis (real, complex, Fourier, \ldots)
  \item Also tools from combinatorics,
    probability, \ldots
\end{itemize}

What kind of problems are studied?

A variety of problems about integers, especially
primes.

\begin{itemize}
  \item Are there infinitely many primes? (Euclid,
    ~300BC)
  \item Are there infinitely many primes starting
    with 7 in base 10? (follows from prime number theorem)
  \item Are there infinitely many primes ending
    with 7 in base 10? (follows from Dirichlet's theorem)
  \item Are there infinitely many primes with 49\%
    of the digits being 7 in base 10? {would
    follow from the Riemann hypothesis}
  \item Are there infinitely many pairs of primes
    differing by 2? (twin prime conjecture)
\end{itemize}

Key feature: To show that a set (of primes) is
infinite, want to estimate the number of elements
$\le x$.

\begin{definition*}
  Define
  \[
    \pi(x) = |\{\text{primes $\le x$}\}| = \sum_{p
    \le x} 1
  .\]
\end{definition*}

Euclid showed: $\lim_{x \to \infty} \pi(x) =
\infty$.

\begin{theorem*}[Prime number theorem]
  \[
    \lim_{x \to \infty} \frac{\pi(x) \log x}{x} =
    1
  .\]
\end{theorem*}

$\pi(x) \sim \frac{x}{\log x}$.
(Conjectured: Legendre, Gauss. Proved: Hadamard,
de la Vall\'ee Poussin)

\newpage
\section{Estimating Primes}

\begin{fcthmstar}[Euler]
  \glsnoundefn{thm:eul}{Euler's Theorem}{NA}%
  $\sum_p \frac{1}{p} = \infty$.
\end{fcthmstar}

\begin{proof}
  Consider $p_N = \prod_{p}^{N} \left( 1 +
  \frac{1}{p} + \frac{1}{p^2} + \cdots +
  \frac{1}{p^N} \right)$, for $N \in \Nbb = \{1, 2,
  3, \ldots\}$. We have:
  \begin{align*}
    p_N
    &\ge \sum_{n = 1}^{N} \frac{1}{n} \\
    &\ge \sum_{n = 1}^{N - 1} \int_{n}^{n + 1}
    \frac{\dd t}{t} \\
    &= \int_{1}^{N - 1} \frac{\dd t}{t} \\
    &= \log(N - 1)
  \end{align*}
  On the other hand, using $1 + x \le e^x$, so
  \begin{align*}
    p_N
    &\le \prod_{p \le N} \exp\left(\frac{1}{p} +
    \frac{1}{p^2} + \cdots + \frac{1}{p^N}\right) \\
    &= \exp \left( \sum_{p \le N} \left(
    \frac{1}{p} + \frac{1}{p^2} + \cdots +
    \frac{1}{p^N} \right) \right) \\
    &\le \exp \left( \sum_{p \le N} \left(
    \frac{1}{p} + \frac{1}{p^2 - p} \right)
    \right) \\
    &\le \exp \left( C + \sum_{p \le N}
    \frac{1}{p} \right)
  \end{align*}
  Comparing these two bounds gives
  \[
    \sum_{p \le N} \frac{1}{p} \ge \log \log (N -
    1) - C
  .\]
  Then letting $N \to \infty$ gives the desired
  result.
\end{proof}

\begin{theorem*}[Chebyshev's Theorem]
  \glsnoundefn{cheb}{Chebyshev's Theorem}{NA}%
  \[
    \pi(x) \le \frac{cx}{\log x}
  \]
  (for $x \ge 2$, where $c$ is an absolute
  constant).
\end{theorem*}

\begin{proof}
  Consider
  \begin{align*}
    S_N
    &= {2N \choose N} \\
    &= \frac{(2N)!}{(N!)^2}
  \end{align*}
  for $N \in \Nbb$. We have
  \[
    S_N \le \sum_{j = 0}^{2N} {2N \choose j} = (1
    + 1)^{2N} = 4^N
  .\]
  On the other hand,
  \[
    S_N = \prod_{p \le 2N} p^{\alpha^p(N)}
  \]
  where $\alpha_p(N)$ is the largest $j$ such that
  $p^j \mid {2N \choose N}$. We have $\alpha_p(N)
  = 1$ for $p \in (N, 2N]$. So
  \[
    (\log 4) N \ge \sum_{N < p \le 2N} \log p
  .\]
  Take $N = \left\lceil \frac{x}{2} \right\rceil$,
  for $x \ge 2$. Hence
  \[
    \sum_{x < p \le 2x} \log p \le (\log 4)
    \left\lceil \frac{x}{2} \right\rceil + \log x
    \le (\log 4) \frac{x}{2} + \log 4 + \log x
  .\]
  Then
  \begin{align*}
    \sum_{p \le x}
    &\le \sum_{0 \le j \le \frac{\log x}{\log 2}}
    \left( (\log 4) \frac{x}{2^{j + 2}} + \log x \right)
    &&(\text{telescoping summation, take
    $\frac{x}{2}, \frac{x}{2^2}, \frac{x}{2^3},
    \ldots$}) \\
    &\le (\log 4) x + (\log x)^2 + 1
  \end{align*}
