# Is there an asymptotic formula for primes in an arithmetic progression with the error terms?

I have been reviewing primes in Arithmetic progression from Apostol's Introduction to analytic number theory book. It is given that:

$$\pi_a(x) \sim \frac{x}{\log(x)} \cdot \frac{1}{\phi(k)}$$

Where $$\pi_a(x) = \sum_{n \leq x\\ n \cong a (mod \text{ } k)} 1$$.

However, I am interested in the error terms as well. Can someone please provide an asymptotic formula with the error terms as well?

Any help is highly appreciated.

• See here, Theorem $4.3.3$. Apr 11, 2021 at 12:16
• – Gary
Apr 12, 2021 at 6:54

Siegal-Walfisz theorem asserts that

$$\psi(x;q,a)=\sum_{\substack{n\le x\\n\equiv a\pmod q}}\Lambda(n)={x\over\varphi(q)}+\mathcal O(xe^{-C_N\sqrt{\log x}})$$

wherein $$(a,q)=1$$, $$C_N$$ is a constant only dependent on the real number $$N$$, and $$q=q(x)\le(\log x)^N$$, and the O constant is independent of $$q$$. The drawback of this theorem is that $$C_N$$ cannot be effectively computed.

If we set

$$\Delta(x;q)=\max_{(a,q)=1}\sup_{y\le x}\left|\psi(x;q,a)-{x\over\varphi(q)}\right|$$

$$\sum_{q\le Q}\Delta(x;q)\ll_A x(\log x)^{-A}+\sqrt xQ(\log xQ)^4$$
• What about the $O$ constant? For any $A$: $\psi(x;q,a)=\frac{x}{\varphi(q)}+O(\frac{x}{\log^A x})$ where the $O$ constant depends on $A$ and $q$. Apr 11, 2021 at 12:20