My question is why the following happens, and whether we can correct (2) below to account for an errant factor of 2.
By a slight generalization* of the argument of this problem we have I think that
$$\sum_{p<x}(\log p)^m \sim (\log x)^m\cdot \pi(x).\hspace{20mm}(1)$$
And from an earlier question we have that
$$\sum_{p_k < x} p_k = \lim_{n\to \infty}\left( k + \sum \log p_k + \sum (\log p_k)^2/2 +...+ \sum (\log p_k)^n/n!\right)$$
So I thought to re-write the last in terms of (1):
$$\sum p_k = \lim_{n\to\infty} \pi(x) \left(1 + \log x + (\log x)^2/2 +...+(\log x)^n/n! \right) \hspace{20mm}(2)$$
But the right-hand side is too big by a factor of 2 (very nearly).
Of course I went back and looked at (1) but for each m it is numerically plausible. When I compare the sums I see there are numerical discrepancies that accumulate in (2) without affecting (1). Is there some aspect of the error of (1) that would give such an exact discrepancy in (2)?
Thanks for any suggestions.
Edit--As a quick check, (2) (with the correction of division by 2 on the r.h.s.) would imply $\sum_{p < x} p \sim \frac{x^2}{2\log x}$ which is at least numerically plausible.
*I can post the proof as a separate question if it is in doubt.