An asymptotics for $\sum_{N\leq p\leq 2N}\frac{1}{p^2}$ for primes in a residue class

analytic-number-theorynumber theory

Let $\mathcal{A}=\{p\text{ prime}\mid p\equiv a\pmod q\}$, $a\neq 0$, $q$ a prime. Then PNT gives us$$S:=\sum\limits_{p\leq x, \, p\in\mathcal{A}}\frac{1}{p}=\frac{\log\log x}{\phi(q)}+c+O\left(\frac{1}{\log x}\right).$$

I am working on a problem in which I have to find an asymptotics of $$\sum\limits_{N\leq p\leq 2N, \, p\in\mathcal{A}}\frac{1}{p^2\left(\frac{23}{8}-\frac{5p}{4N}\right)}<\frac{8}{3}\sum\limits_{N\leq p\leq 2N, \, p\in\mathcal{A}}\frac{1}{p^2},$$ $N\ge1$. But does there exist any asymptotics of $$\sum\limits_{p\leq x, \, p\in\mathcal{A}}\frac{1}{p^2}$$ similar to that of $S$?

P.S. I know that the sum would be smaller than $0.46$ but I am looking for something that would depend on $N$ like $1/\log N$ but this tends to $0$ as $N\to\infty$. That's causing some confusion. Moreover, $1/\log N+O(1)$ doesn't fit well with the rest of the problem.

Best Answer

Expanding on my comment, if we use Abel's summation formula with $a_n = I_{\mathcal A}(n)$ and $\phi(n) = \frac{1}{n^2}$, we get $$\sum_{p\leq x, p\in A} \frac1{p^2} = \sum_{n\leq x}\frac {a_n} {n^2} = \frac{A(x)}{x^2} + 2\int_1^x{\frac{A(u)}{u^3}} du$$ According to Dirichlet's theorem, $A(n) = \frac n{\phi(q)\log n} + O(\frac n {\log^2(n)})$, so $$\sum_{p\leq x, p\in A} \frac1{p^2} = \frac{1}{\phi(q) x \log x} + C + \frac2{\phi(q)}\int_2^x{\frac{1}{u^2 (\log u + \Omega(\log^2(u))}} du + O(\frac 1 {x \log^2(x)}) = \frac{1}{\phi(q) x \log x} + C_2 + \frac2{\phi(q)}\text{Ei}(-\log x) + O(\frac 1 {x \log^2(x)}) = \frac{1}{\phi(q) x \log x} + C_2 - \frac2{\phi(q)}\frac{1}{x \log x} (1 + O(\frac{1}{\log x})) + O(\frac 1 {x \log^2(x)}) = C_2 - \frac{1}{\phi(q) x \log x} + O(\frac1{x \log^2(x)})$$

Related Question