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

\subsection{Selberg Sieve}

\begin{center}
  \begin{tabular}{c|c|c}
    & asymptotes
    & good upper bound for primes \\
    \hline
    Erastothenes-Legendre
    & \cmark
    & \xmark \\
    \hline
    Selberg
    & \xmark
    & \cmark
  \end{tabular}
\end{center}

\begin{fcthm}[Selberg sieve]
  \label{thm:ss}
  Assuming:
  - $z \ge 2$
  - $A \subseteq \Zbb$ finite
  - $\mathcal{P} \subseteq \Pbb$
  - Assume the sieve hypothesis
  - $h : \Nbb \to [0, \infty)$ be the
  multiplicative function supported on square-free
  numbers, given on the primes by
  \[
    h(p) = \begin{cases}
      \frac{g(p)}{1 - g(p)} & p \in \mathcal{P} \\
      0 & p \notin \mathcal{P}
    \end{cases}
  \]
  Then:
  \[
    S(A, \mathcal{P}, z)
    \le \frac{|A|}{\sum_{d \le z} h(d)} +
    \sum_{\substack{d \le z^2 \\ d \mid P(z)}}
    \tauf_3(d) |R_d|
  .\]
\end{fcthm}

\textbf{Sieve hypothesis}: There is a
multiplicative $g : \Nbb \to [0, 1]$ and $R_d \in
\Rbb$ such that
\[
  |A_d| = g(d)|A| + R_d
\]
for all square-free $d \ge 1$.

\begin{proof}
  Let $(\rho_d)_{d \in \Nbb}$ be real numbers with
  \[
    \rho_1 = 1, \rho_d = 0, d > z
    \tag{$*$}
    \label{lec9eq1}
  \]
  Then,
  \[
    \indicator{(n, P(z)) = 1}
    \le \left( \sum_{\substack{d \mid n \\ d \mid
    P(z)}} \rho_d \right)^2
  .\]
  (If $(n, P(z)) = 1$, get $1 \le \rho$ otherwise
  use $0 \le x^2$).

  Summing over $n \in A$,
  \begin{align*}
    S(A, \mathcal{P}, z)
    &= \sum_{n \in A} \indicator{(n, P(z)) = 1} \\
    &\le \sum_{n \in A} \left( \sum_{\substack{d
    \mid n \\ d \mid P(z)}} \rho_d \right)^2 \\
    &= \sum_{d_1 d_2 \mid P(z)} \rho_{d_1}
    \rho_{d_2} \sum_{\substack{n \in A \\ [d_1,
    d_2] \mid n}} 1 \\
    &= |A| \sum_{d_1, d_2 \mid P(z)} \rho_{d_1}
    \rho_{d_2} g([d_1, d_2])
    + \ub{\sum_{d_1, d_2 \mid P(z)} \rho_{d_1}
    \rho_{d_2} R_{[d_1, d_2]}}_{E}
    &&\text{(sieve hypothesis)}
  \end{align*}
  ($[m, n]$ means $\lcm(m, n)$).

  We first estimate $E$:
  \begin{align*}
    E
    &\le \max_k |\rho_k|^2 \sum_{d_1, d_2 \mid
    P(z)} |R_{[d_1, d_2]}| \\
    &= \max_k |\rho_k|^2 \sum_{\substack{d \le z^k
    \\ d \mid P(z)}} \sum_{\substack{d_1, d_2 \in
    \Nbb \\ [d_1, d_2] = d}} |R_d|
    &&(d = [d_1, d_2])
  \end{align*}
  We have
  \begin{align*}
    \sum_{\substack{d_1, d_2 \in \Nbb \\ d = [d_1,
    d_2]}} 1
    &= \sum_{l \le z} \sum_{\substack{d_1', d_2'
    \in \Nbb \\\ d = ld_1' d_2' \\ (d_1', d_2') =
    1}} 1
    &&(l = (d_1, d_2), d_1' = d_1 / l, [d_1, d_2]
    = ld_1' d_2') \\
    &\le \tauf_3(d)
  \end{align*}
  Therefore
  \[
    E
    \le \sum_{\substack{d \le z^z \\ d \mid P(z)}}
    \tauf_3(d) |R_d| \cdot \max_k |\rho_k|^2
  .\]
  Now it suffices to prove that there is a choice
  of $(\rho_d)_{d \in \Nbb}$ satisfying
  \eqref{lec9eq1} such that

  Claim 1: $\sum_{d_1, d_2 \mid P(z)} \rho_{d_1}
  \rho_{d_2} g([d_1, d_2]) = \frac{1}{\sum_{d \le
  z}} h(d)$.

  Claim 2: $|\rho_k| \le 1$ for all $k \in \Nbb$.

  Proof of claim 1:

  We have, writing $k = (d_1, d_2)$, $d_i' =
  \frac{d_i}{k}$,
  \begin{align*}
    \sum_{d_1, d_2 \mid P(z)} \rho_{d_1}
    \rho_{d_2} g([d_1, d_2])
    &= \sum_{k \mid P(z)} \mob(k)^2
    \sum_{\substack{d_1', d_2' \mid \frac{P(z)}{k}
    \\ (d_1', d_2') = 1}} \rho_{kd_1'}
    \rho_{kd_2'} g(kd_1'd_2') \\
    &= \sum_{k \mid P(z)} \mob(k)^2 g(k)
    \sum_{\substack{d_1', d_2' \mid \frac{P(z)}{k}
    \\ (d_1', d_2') = 1}} \rho_{kd_1'}
    \rho_{kd_2'} g(d_1') g(d_2')
    &&\text{(multiplicativity)}
  \end{align*}
  We have
  \[
    \indicator{(d_1', d_2') = 1}
    = \sum_{\substack{c \mid d_1' \\ c \mid d_2'}}
    \mob(c)
  \]
  (since $\mob \conv 1 = \dId$)
  so the previous expression becomes
  \begin{align*}
    &\sum_{k \mid P(z)} \mob(k)^2 g(k) \sum_{c \mid
    \frac{P(z)}{k}} \mu(c) \sum_{\substack{d_1',
    d_2' \mid P(z) \\ d_1' \equiv 0 \pmod(c) \\
    d_2' \equiv 0 \pmod{c}}} \rho_{kd_1'}
    \rho_{kd_2'} g(d_1') g(d_2') \\
    &= \sum_{k \mid P(z)} \mob(k)^2 g(k) \sum_{c
    \mid \frac{P(z)}{k}} \mob(k) \left(
    \sum_{\substack{d \mid \frac{P(z)}{k} \\ d
    \equiv 0 \pmod{c}}} \right)^2 \\
    &= \sum_{k \mid P(z)} \mob(k)^2 g(k)^{-1}
    \sum_{c \mid \frac{P(z)}{k}} \mob(c) \left(
    \sum_{d' \mid \frac{P(z)}{ck}} \rho_{ckd'}
    g(ckd') \right)^2 \\
    &= \sum_{n \le z} h(m)^{-1} \left(
    \sum_{\substack{d \mid P(z) \\ d \equiv 0
    \pmod{n}}} \rho_d g(d) \right)^2
  \end{align*}
  (multiplicativity, $d = cd'$, $m =
  ck$, $d = md'$)
  since $\frac{1}{h} = \frac{\mob^2}{g} \conv \mu$
  (check on primes $\frac{1}{h(p)} =
  \frac{1}{g(p)} - 1$).

  Now we get
  \[
    \sum_{d_1, d_2 \mid P(z)} \rho_{d_1}
    \rho_{d_2} g([d_1, d_2])
    = \sum_{m \le z} h(m)^{-1} \zeta_m^2
  \]
  where
  \[
    \zeta_m = \sum_{\substack{d \mid P(z) \\ d
    \equiv 0 \pmod{m}}} \rho_d g(d)
  .\]
  Want to minimise this subject to
  \eqref{lec9eq1}.
