Sum of primes in the interval $(\delta n,n)$ Let $0<\delta<1$. What is an asymptotic formula for $$\sum_{\delta n\leqslant p\leqslant n}p,$$where $p$ is a prime number?

Let $s(n) = \sum_{p\leqslant n, p \text{ is prime}}p$. Then, as detailed in this MathOverflow answer, $s(n) \sim \frac{n^2}{2\log{n}}$.
Thus,
$$
\begin{align}
2s(n) - 2s(\delta n) &= \frac{n^2}{\log{n}} - \frac{\delta^2n^2}{\log{\delta n}} + o\left(\frac{n^2}{\log{n}}\right)\\
&= \frac{n^2 \log{\delta n} - \delta^2n^2\log{n}}{\log{n}\log{\delta n}} + o\left(\frac{n^2}{\log{n}}\right)\\
&= \frac{n^2(1 - \delta^2)}{\log{\delta n}} + \frac{n^2 \log{\delta}}{\log{n}\log{\delta n}} + o\left(\frac{n^2}{\log{n}}\right)\\
&= \frac{n^2(1 - \delta^2)}{\log{n} + \log{\delta}} + o\left(\frac{n^2}{\log{n}}\right)\\
&\sim \frac{n^2(1 - \delta^2)}{\log{n}}
\end{align}
$$


(Here, we have used the characterisation $a \sim b \iff a = b + o(b)$.)
