Let $\Lambda$ be the von Mangoldt function. I think the following is known to hold under GRH: Given any $q \geq 1$, $(a,q)=1$, and $X \geq 1$, we have $$ \sum_{\substack{1 \leq n \leq X \\ n \equiv a\,(\text{mod }q) }} \Lambda(n) = \frac{X}{\phi(q)} + O(X^{1/2} \log (qX)). $$ I was wondering if someone could give me a reference for this. I keep finding a slight variant of this without the von Mangoldt, but I just wanted this version so that I can directly reference in a paper. Thank you very much!

$\begingroup$ What's the relation between $a, X$ and $q, X$? $\endgroup$ – T. Amdeberhan Dec 26 '16 at 22:33

$\begingroup$ I suppose the sum is over $n\equiv a\pmod q$ within this bound? $\endgroup$ – Wojowu Dec 26 '16 at 22:39

$\begingroup$ Your answer to Wojowu is enough for my question. $\endgroup$ – T. Amdeberhan Dec 26 '16 at 22:43
The usual error term in this problem is not $O(X^{1/2} \log (qX))$ but $O(X^{1/2} \log^2(X))$. This version of the result is part of Corollary 13.8 in MontgomeryVaughan: Multiplicative number theory I. For a more general result (also featuring the slightly weaker error term above) see Theorem 5.15 in IwaniecKowalski: Analytic number theory.

$\begingroup$ Is there a (conjectured) $O$ term uniformly on $q,a$ (or $\chi$) ? $\endgroup$ – reuns Dec 27 '16 at 22:08

$\begingroup$ @user1952009: GRH implies the uniform error term $O(X^{1/2}\log^2(X))$. The implied constant is independent of $q$ and $a$. $\endgroup$ – GH from MO Dec 27 '16 at 22:32

$\begingroup$ I see. I'd say it is a consequence of an uniform estimate $A T \ln T+B T+O(\ln T)$ (or $O(\ln T/\ln \ln T)$) for the number of nontrivial poles of $\sum_{n \equiv a \bmod q} n^{s} \Lambda(n)$ ? $\endgroup$ – reuns Dec 27 '16 at 22:52

$\begingroup$ @user1952009: I gave two references for this estimate (MontgomeryVaughan and IwaniecKowalski). You can study the proof in those books. $\endgroup$ – GH from MO Dec 27 '16 at 23:27
The inequality you state is not a known consequence of GRH, not even in the case $q=1$. In this case von Koch proved 1901 the error term $\mathcal{O}(X^{1/2}\log^2 X)$. Gallagher and Mueller showed that $\mathcal{O}$ can be replaced by $o$ if we assume Montgomery's pair correlation conjecture, and HeathBrown proved the same under some weakening of the pair correlation conjecture, but no unconditional improvement is known. For an overview of these results see http://www.math.sjsu.edu/~goldston/article35.pdf . The general case runs parallel to the case $q=1$, although the work of Ozluk (J. Number Theory 59, 319351) gives a little hope that something nontrivial can be proven, at least on average over $q$.
You may like to look into
C. Hooley, The distribution of sequences in arithmetic progression, Proceedings of the International Congress of Mathematicians (Vancouver, 1974), 357364. Canad. Math. Congress, Montreal 1975.
Or, for a quick reference, see this paper and its references.