Min_25 筛
\[\large\begin{aligned}
&g(n,j)=\sum_{i=1}^n [i \in Prime \or \text{minp}(i) > p_j] i^k \\
&g(n,j)=g(n,j-1)-p_j^k\left( g(\frac{n}{p_j},j-1)-g(p_{j-1},j-1) \right)[p_j^2\leqslant n] \\
&sp(n)=\sum_{i=1}^n p_i^k \\
&g(p_{j-1},j-1)=sp(j-1) \\
&x=\text{maxp}(n) \\
&s(n,j)=g(n,x)-sp(j)+\sum_{k>j \and p_k^e\leqslant n}f(p_k^e)\left( s(\frac{n}{p_k^e},k)+[e \ne 1] \right)
\end{aligned}
\]