\section{The generalised Riemann hypothesis: proof of Theorem~\ref{cor:GRH}}\label{sec:grh} Throughout this section assume the generalised Riemann hypothesis (GRH) for Dirichlet $L$-functions: every nontrivial zero of every Dirichlet $L$-function, $\zeta(s)$ included, has real part $1/2$. \subsection{Pre-sieving to larger moduli} For a prime $w \ge 3$ let $q_w := \prod_{3 \le p \le w} p$, $g_w := \prod_{3 \le p \le w} (p - 2)/(p - 1)$, $\sigma_w := \sum_{p \le w} 1/p$, and let $w^+$ be the least prime above $w$. For $X \ge 10372$ put $S'_w(X) := \log\log X + B + d(X) - \sigma_w$, \begin{gather*} P_w(k) := \sum_{p > w} p^{-k}, \qquad C_w(z) := \sum_{k \ge 2} \frac{P_w(k)}{k} z^k,\\ R^{(w)}_j := [z^j] \exp\bigl( z S'_w(X) + C_w(z) \bigr), \qquad A^{(w)}_a := \sum_{p > w} \frac{a \log p}{p^a} . \end{gather*} For $w = 11$ these are $S'(X)$, $C_{11}$, $R^*_j$ and $A_a$ of \S\ref{sec:middle}. For $X \ge \max(10372,w)$, Lemma~\ref{lem:Rstar} holds, with the same proof, for $m$ coprime to $2q_w$, with $\sigma_w$, $P_w(k)$ and $R^{(w)}_j$ in place of $\sigma_{11}$, $P_{13}(k)$ and $R^*_j$. \begin{lemma}\label{lem:C3GRH} Assume GRH. Let $w \ge 3$ be prime, $4 \cdot 10^{18} \le Y_{\rm low} \le X$ with $q_w^2 \le Y_{\rm low} - 2$, $L_Y := \log Y_{\rm low}$, $L_X := \log X$, $k_{\max} := \lfloor L_X/\log w^+ \rfloor$, let $0 < \delta < 1$ with $\delta L_Y \ge 1$, and let $K \ge 1$ be an integer with \begin{multline}\label{eq:C3GRH} L_Y\, e^{-\delta L_Y} + \frac{1}{1 - \delta} \sum_{k = K+1}^{k_{\max}} \Bigl( c_\theta R^{(w)}_{k-1} + \sum_{a=2}^{k} A^{(w)}_a R^{(w)}_{k-a} \Bigr)\\ <\ g_w \bigl(1 - 4e^{-L_Y}\bigr) - 1.01 \cdot 0.64\, \varphi(q_w)\, L_Y^2 e^{-L_Y/2} - L_Y e^{-L_Y} - 10^{-12}. \end{multline} Then every even $N$ with $Y_{\rm low} \le N \le X$ and $N > 4 \cdot 10^{18}$ is $p + \eta$ with $p$ an odd prime, $\eta \ge 3$, $(\eta, 2q_w) = 1$ and $\Omega(\eta) \le K$. \end{lemma} \begin{proof} Fix $N$, $L := \log N$ and $y := N - 2$, and put $X_2 := \max(4 \cdot 10^{18}, Y_{\rm low} - 2)$. Then $y \ge X_2$, and $q_w^2 \le Y_{\rm low} - 2$ gives $3 \le q_w \le \sqrt{X_2}$, so (I6) applies with $d = q_w$ and $x = y$. The classes $a \bmod q_w$ with $(a, q_w) = 1 = (N - a, q_w)$ number at least $\prod_{3 \le p \le w} (p - 2) = g_w \varphi(q_w)$ and at most $\varphi(q_w)$. Summing (I6) over them, the number of odd primes $p \le y$ in these classes is at least $g_w \li(y) - 0.64\, \varphi(q_w) \sqrt y \log y - 1$. Each gives $\eta = N - p \ge 3$, odd, with $(\eta, q_w) = 1$. The bad ones have $n = N - p$ in $E := \{ n \le N : (n, 2q_w) = 1,\ \Omega(n) \ge K + 1 \}$. As in the proof of Lemma~\ref{lem:C3}, with the primes up to $w$ removed (every such $n$ has $P^-(n) \ge w^+$, so $\Omega(n) \le k_{\max}$), and with this form of Lemma~\ref{lem:Rstar}, \[ \#E \le N^{1-\delta} + \frac{N}{(1 - \delta) L} \sum_{k = K+1}^{k_{\max}} \Bigl( c_\theta R^{(w)}_{k-1} + \sum_{a=2}^{k} A^{(w)}_a R^{(w)}_{k-a} \Bigr). \] Multiply both counts by $L/N$. Since $\li(y) \ge (y - 2)/\log y$ and $\log y \le L$, $L \li(y)/N \ge 1 - 4/N \ge 1 - 4e^{-L_Y}$. The error term is at most $0.64\, \varphi(q_w) L^2 e^{-L/2}$, which decreases in $L$, and $L/N \le L_Y e^{-L_Y}$; also $L e^{-\delta L} \le L_Y e^{-\delta L_Y}$. So \eqref{eq:C3GRH} implies that the good primes outnumber the bad ones. \end{proof} \begin{lemma}\label{lem:C3GRHnum} Condition \eqref{eq:C3GRH} holds with $K = 9$ and $\delta = 0.15$ for $(w, Y_{\rm low}, X) = (19, e^{62}, e^{70})$, the left side being $< 0.147535$ against a right side $> 0.2281295$, and for $(w, Y_{\rm low}, X) = (23, e^{65}, e^{73})$, with $< 0.139061$ against $> 0.2171299$. \end{lemma} \begin{proof} Interval computation, \S\ref{sec:numerics}; here $q_{19}^2 = 4849845^2 < e^{62} - 2$ and $q_{23}^2 = 111546435^2 < e^{65} - 2$. \end{proof} \subsection{The sieve range} \begin{lemma}\label{lem:GRHsieve} Assume GRH. Let $K \ge 1$ be an integer, $73 \le L_1 < L_2$, $0 < \delta < 1$ with $\delta L_1 \ge 2$, $z_1 := e^{L_1/11}$, and let $\eps$ and the recursive $\mu_j$ of Lemma~\ref{lem:R3} be taken at $z = z_1$ and $M = 11$, with $\eps = S(z_1) + D(\log z_1) + 1/z_1$. Put $\Phi := \sum_{k=K+1}^{10} [c_\theta \mu_{k-1} + \sum_{a=2}^{k} A_a(z_1) \mu_{k-a}]$. If \[ \frac{L_2\, \Phi}{(1 - \delta) \cdot 0.146\, U_{\rm low}} + \frac{L_1^2 e^{-\delta L_1} + 5 L_2^2 e^{-L_1}}{0.146\, U_{\rm low}} < 1, \] then every even $N$ with $L_1 \le \log N \le L_2$ is $p + \eta$ with $\eta \ge 2$, $P^-(\eta) \ge N^{1/11}$ and $\Omega(\eta) \le K$. \end{lemma} \begin{proof} The proof of Lemma~\ref{lem:S4} applies without Lemma~\ref{lem:P}, with (I7) in place of (I4$'$) and $M = 11$: $z = N^{1/11} \ge z_1$, a $z$-rough $n < z^{11}$ has $\Omega(n) \le 10$, the bad elements number at most $N^{1-\delta}$ plus the count of Lemma~\ref{lem:R3}, which is bounded by its value at $z_1$ because $S(z)$, $D(\log z)$, $1/z$, $1/(z - 1)$ and $A_a(z)$ decrease in $z$, and one sifted element may be $1$. The term $5 L_2^2 e^{-L_1}$ is more than this needs. \end{proof} \begin{lemma}\label{lem:GRHsievenum} With $K = 9$, the condition of Lemma~\ref{lem:GRHsieve} holds on each of the $238$ intervals of \S\ref{sec:numerics}, which cover $73 \le \log N \le 7.7 \cdot 10^6$; the largest left side is $< 0.000265$. \end{lemma} \begin{proof} Interval computation, \S\ref{sec:numerics}. Here $z_1 \ge e^{73/11} > 761$, and $S(z_1)$ is bounded by enclosed prime sums below $10372$ and by $D(\log x)$ above, using that $\sum_{p \le x} 1/p - \log\log x - B$ decreases between consecutive primes. \end{proof} \begin{proof}[Proof of Theorem~\ref{cor:GRH}] For $N \le 4 \cdot 10^{18}$ use (I1). For $4 \cdot 10^{18} \le N \le e^{62}$ use Lemma~\ref{lem:C3} with $\delta = 1/5$ and $K = 9$ (Lemma~\ref{lem:C3num}); this step is unconditional. For $e^{62} \le N \le e^{73}$ use Lemma~\ref{lem:C3GRH} with Lemma~\ref{lem:C3GRHnum}: the pieces $[e^{62}, e^{70}]$ and $[e^{65}, e^{73}]$ overlap. For $73 \le \log N \le 7.7 \cdot 10^6$ use Lemma~\ref{lem:GRHsieve} with Lemma~\ref{lem:GRHsievenum}. For $N > \exp(\exp(15.85))$ use (I8); since $e^{15.85} < 7.65 \cdot 10^6 < 7.7 \cdot 10^6$, the ranges overlap. In every range $\eta \ge 2$ and $\Omega(\eta) \le 9$. \end{proof} \begin{remark} The value $8$ is not established by these steps. With $K = 8$, $w = 29$, $Y_{\rm low} = e^{65}$, $X = e^{73}$ and $\delta = 0.15$, the left side of \eqref{eq:C3GRH} is $> 0.363$ and the right side is $< 0.189$, and the left side of \eqref{eq:C3} at $X = e^{73}$, $K = 8$ and $\delta = 1/5$ is about $1.004$. These are failures of sufficient conditions at these parameters, not proofs that $8$ cannot be reached. The sieve range alone passes $K = 8$ when Lemma~\ref{lem:P} is added for $z_1 \ge 8 \cdot 10^9$. Larger $w$ lowers the bad count but costs $\varphi(q_w)$ in the error term, which is why the middle range is cut into pieces with growing $w$. \end{remark}