# Mertens-like sum in arithmetic progressions

I find myself needing a good estiamate for $\sum_{p\le x,\, p\equiv a\mod q} 1/p$, perhaps something like $$\sum_{p\le x,\, p\equiv a\mod q} \frac1p = \frac{\log\log x}{\phi(q)} + b(q,a) + O\big(\exp(-c\sqrt{\log x})\big)$$ for $q$ up to a power of $\log x$, or something of that shape. Moreover, I'd like to be able to apply this uniformly in $q$, so the dependence of the error term on $q$ needs to be explicit (and the constant $b(q,a)$ needs to be explicit enough to manage as well).

Does anyone have a good reference to recommend for such sums?

-

Theorem 2 there works uniformly for $q\leq (\exp((\log x)^{2/5}(\log\log x)^{1/5}))^A$ for every $A>0$. Theorem 4 there works for $q\leq x$ assuming GRH. You can also get explicit $b(q,a)$.