Problem Archive

Let $\operatorname{smpf}(n)$ be the smallest prime factor of $n$.
$\operatorname{smpf}(91)=7$ because $91=7\times 13$ and $\operatorname{smpf}(45)=3$ because $45=3\times 3\times 5$.
Let $S(n)$ be the sum of $\operatorname{smpf}(i)$ for $2 \le i \le n$.
E.g. $S(100)=1257$.

Find $S(10^{12}) \bmod 10^9$.

Solution
No solution yet. Write yours at solutions/s521.md.
Problems sourced from Project Euler · Non-commercial & educational use only · CC BY-NC-SA 4.0