Estimating integral of product of terms $\cos(t\log p)$

I would like to prove the following proposition from A. Harper's paper "Sharp conditional upper bound for moments of the Riemann Zeta Function"

Proposition. Let $$T$$ be large and let $$n=p_1^{\alpha_1}\cdots p_r^{\alpha_r}$$, where $$p_i$$ are distinct primes and $$\alpha_i\in\mathbb{N}$$ for all $$i$$. Then $$\int_T^{2T}\prod_{i=1}^r\cos(t\log p_i)^\alpha_i dt = Tf(n)+\mathcal{O}(n)$$ where $$f(n)=0$$ if any of the exponents $$\alpha_i$$ is odd, and otherwise $$f(n)=\prod_{i=1}^r\frac{1}{2^{\alpha_i}}\frac{\alpha_i!}{((\alpha_i/2)!)^2}$$

He says that this is a slight variant of Lemma 4 from Radzwill's paper on Selberg's central limit theorem, noting that the error ter there is estimated quite generously, and can actually be taken a $$\mathcal{O}(n)$$. The proof goes on as follows: consider primes $$q_1,\dots q_k\leq x$$ with $$q_1\cdots q_k=p_1^{\alpha_1}\cdots p_r^{\alpha_r}=n$$. Since $$\cos(t)=\frac{e^{it}+e^{-it}}{2}$$ we have $$\cos(t\log p_i)^{\alpha_i}=\frac{1}{2^{\alpha_i}}(e^{it\log p_i}+e^{-it\log p_i})^{\alpha_i}=\frac{1}{2^{\alpha_i}}{\alpha_i\choose \alpha_i/2}+\sum_{\substack{0\leq \ell\leq \alpha_i \\ \ell\neq\alpha_i/2}}\frac{1}{2^{\alpha_i}}{\alpha_i\choose \ell}e^{i(\alpha_i-2\ell)t\log p_i}$$ Hence $$\int_T^{2T}\prod_{i=1}^r\cos(t\log p_i)^\alpha_i dt = \int_T^{2T}\prod_{i=1}^r\left(\frac{1}{2^{\alpha_i}}{\alpha_i\choose \alpha_i/2}+\sum_{\substack{0\leq \ell\leq \alpha_i \\ \ell\neq\alpha_i/2}}\frac{1}{2^{\alpha_i}}{\alpha_i\choose \ell}e^{i(\alpha_i-2\ell)t\log p_i}\right)$$ which equals to $$Tf(n)+\sum_{\substack{0\leq \ell_i\leq_{\alpha_i} \\ \text{for all } 1\leq i\leq r\\ \text{not all }\ell_i=\alpha_i/2}}\int_T^{2T}\prod_{i=1}^r\frac{1}{2^{\alpha_i}}{\alpha_i\choose \ell}e^{i(\alpha_i-2\ell)t\log p_i}dt$$ He then says that the number of terms in the sum is $$\leq(\alpha_1+1)\cdots(\alpha_r+1)\leq 2^{\alpha_1}\cdots 2^{\alpha_r}=2^k$$ where $$k=\alpha_1+\cdots\alpha_r$$. Moreover each of these terms is of the form $$\int_T^{2T} \gamma e^{it(\beta_1\log p_1+\cdots \beta_r \log p_r)}dt$$ with $$|\gamma|\leq 1$$ and integers $$|\beta_i|\leq\alpha_i$$. He then claims that $$\beta_1\log p_1+\cdots \beta_r \log p_r\gg x^{-k}$$ and therefore, using that $$\int e^{cit}=-\frac{ie^{cit}}{c}+constant$$ and that $$|\gamma|\leq 1$$ we get that $$\int_T^{2T} \gamma e^{it(\beta_1\log p_1+\cdots \beta_r \log p_r)}dt\ll x^k$$ therefore the sum actually contributes at most $$\mathcal{O}(2^kx^k)$$. My question is: how do I go from $$\mathcal{O}(2^kx^k)$$ to $$\mathcal{O}(n)$$? I guess the bound $$(\alpha_1+1)\cdots(\alpha_r+1)\leq 2^{\alpha_1}\cdots 2^{\alpha_r}=2^k$$ could be improved. I don't know how to show the bound $$\beta_1\log p_1+\cdots \beta_r \log p_r\gg x^{-k}$$ maybe this can be improved as well. The only other bound used is $$|\gamma|\leq 1$$ where $$\gamma$$ is product of factors of the form $$\frac{1}{2^{\alpha_i}}{\alpha_i\choose \ell}$$. Using Stirling's approximation for the factorial I have $$\frac{1}{2^{\alpha_i}}{\alpha_i \choose \ell}\leq \frac{1}{2^{\alpha_i}}{\alpha_i \choose \alpha_i/2}\sim\frac{\sqrt{2}}{\sqrt{\pi\alpha_i}}$$ hence this bound is good. Thank you very much for your help!

• Hey so write \sum \beta_i \log{p_i} =: \log{u} with u\in \Q and note that by complex conjugating the integral if necessary wlog u > 1 [u\neq 1 since not all \beta_i = 0]. now just bound the denominator of u to see that u > 1 + 1/denominator, QED that part (here denominator\leq n, in fact \leq n^{1/2} is also true: \log{numerator*denominator} = \sum |\beta_i| \log{p_i}\leq \log{n}). otherwise I think you’re maybe just confused by notation? I couldn’t entirely follow what you wrote, e.g. what role do the q_i play given that they don’t appear again, why is there an x^k and not an n, etc. – alpoge Apr 15 at 12:35
• Hi! what I would like to prove is that $(\alpha_1+1)\cdots(\alpha_r+1)\int_T^{2T}\gamma e^{it(\beta_1\log p_1+\cdots+\beta_r\log p_r)}dt\ll n$. The $p_i$ denote the distinct prime factor of $n$ whereas the $q_i$ are all the prime factors dividing $n$ with multiplicity. – asd Apr 15 at 19:28
• I can write $\beta_1\log p_1+\cdots+\beta_r\log _r=\log \prod_{i=1}^r p_i^{\beta_i}$. WLOG I can assume $u=\prod_{i=1}^r p_i^{\beta_i}>1$. Since all $\beta_i$ are bounded in absolute value by $\alpha_i$ I indeed get that the denominator of $u$ is bounded by $n^{1/2}$ (as $u$ must be greater than 1). If I now wirte $u=\frac{r}{s}$ with $(r,s)=1$ I have that $u>1+\frac{1}{s}$. Now using that $\log(u)>log(1+1/s)>\frac{1/s}{1+1/s}=\frac{1}{s+1}$ I get that $\beta_1\log p_1+\cdots+\beta_r\log _r\gg n^{-1/2}$ – asd Apr 15 at 20:20
• yep! except that should be \gg n^{-1/2}. – alpoge Apr 15 at 20:20
• well that’s why i added the note about the n^{1/2} —- i couldn’t exactly understand the bound you wanted, but anyway if you want a final bound of n certainly using d(n) << n^\eps is sufficient. – alpoge Apr 15 at 20:32