For each positive integer $k$, let $$a_k(n)=(\sum_p p^{-s})^k=\sum_{n=1}^{\infty} a_k(n)n^{-s},$$ where $\sigma={\rm Re}(s)>1$, and the sum on the left runs over all primes $p$. This paper is devoted to proving the following theorem: If $1/2<\sigma<1$, then $$\max_k(\sum_{n\leq N} a_k(n)^2n^{-2\sigma})^{1/2k}\approx (\log N)^{1-\sigma}/\log\log N$$ and $$(\sum_{n=1}^{\infty} a_k(n)^2n^{-2\sigma})^{1/2k} \approx k^{1-\sigma}/(\log k)^{\sigma}.$$ The constants implied by the $\approx$ sign may depend upon $\sigma$. This theorem has applications to the Riemann zeta function.