= Solution
Let $D(s)=\sum_{p\le X}p^{-s}$, a <Dirichlet polynomial> supported on <primes>. The cosine sum is $(D(\sigma+it)+\overline{D(\sigma+it)})/2$, so its $j$th power is a finite linear combination of $D(\sigma+it)^k\overline{D(\sigma+it)^{j-k}}$, $0\le k\le j$.
The <Dirichlet polynomial> $D(s)^k$ is supported on integers that are products of exactly $k$ <primes>, counted with multiplicity. Each coefficient is at most $k!$ by <unique prime factorization>; for $k=0$ the only coefficient is the one at $1$. As $j$ is odd, $k\ne j-k$, so no integer can appear in both supports. Thus \b[every diagonal term vanishes] in the <mean value of Dirichlet polynomials> from part (a).
Both supports lie in $[1,X^j]$. The first error bound in part (a), with that common length, now gives for each term
$$
\left|\int_T^{2T}D(\sigma+it)^k\overline{D(\sigma+it)^{j-k}}\,dt\right|\ll_j X^j\left(\sum_{n\le X^j}n^{-\sigma}\right)^2.
$$
Summing the finitely many terms proves \b[the <odd moment of a prime cosine sum> estimate]:
$$
\boxed{\left|\int_T^{2T}\left(\sum_{p\le X}\frac{\cos(t\log p)}{p^\sigma}\right)^j\,dt\right|\ll_j X^j\left(\sum_{n\le X^j}\frac1{n^\sigma}\right)^2.}
$$
The argument holds for all real $\sigma$ and all $T\ge0$; no cancellation estimate involving $T$ is needed once the diagonal is absent.
Back to article page