I have a slightly open-ended question about the Barban-Halberstam-Davenport theorem and hope that it is not off-topic. The theorem itself states that for any $A>0$ and $Q$ lying the range $x\log^{-A}x\leq Q\leq x$, we have $$\sum\_{q\leq Q}\sum\_{\substack{a=1,\\\gcd(a,q)=1}}^q\left(\psi(x;q,a)-\frac{x}{\phi(q)}\right)^2\ll\_{A} xQ\log x.$$


As usual, $\displaystyle \psi(x;q,a)=\sum\_{\substack{n\leq x\\ n\equiv a \bmod q}}\Lambda(n)$, where $\Lambda$ is the von Mangoldt function.


The theorem seems very beautiful in its own right but I am curious as to the importance of the theorem. As in, are there some interesting applications of this theorem? Can we prove a similar theorem by changing the range of $Q$ and are they interesting to number theorists?



Why is the Barban-Halberstam-Davenport theorem important?
Barban-Davenport-Halberstam provides evidence for Montgomery's conjecture on the distribution of primes in progressions. This is important for many reasons.
For example, Montgomery's conjecture is sufficient to imply the Elliott-Halberstam conjecture.


The left-hand side is an average over $\sim \frac{3}{\pi^2}Q^2$ terms because you average over residue classes as well as over moduli (unlike the Bombieri-Vinogradov theorem). Therefore,


$\displaystyle\frac{1}{\sum\_{q\leq Q}\sum\_{\substack{\gcd(a,q)=1} \\ 1\leq a\leq q}1}\sum\_{q\leq Q}\sum\_{\substack{\gcd(a,q)=1} \\ 1\leq a\leq q}|\psi(x;q,a)-x/\varphi(q)|^2\ll\_A \frac{x\log x}{Q}$.


Thinking of Barban-Davenport-Halberstam as computing the variance of an error term that is expected to behave with some measure of "randomness", we therefore expect that the typical size of $|\psi(x;q,a)-x/\varphi(q)|$ (as we sample over both $a$ AND $q$) for $q<x^{1-\epsilon}$ is $\sqrt{x \log x} / \sqrt{q}$. Montgomery's conjecture, roughly speaking, is that the typical behavior is always true: If $q<x^{1-\epsilon}$, then


$|\psi(x;q,a)-x/\varphi(q)| \ll\_{\epsilon} x^{1/2+\epsilon}/q^{1/2}$.


If true, then this is MUCH stronger than what follows from GRH, namely


$|\psi(x;q,a)-x/\varphi(q)| \ll \sqrt{x}(\log qx)$,


which is nontrivial only when $q\ll \sqrt{x}/\log x$ (far weaker than what Montgomery's conjecture would give).


In the paper below, the version of Barban-Davenport-Halberstam that you cite is improved by Montgomery to a very precise asymptotic that holds regardless of how large $Q$ is relative to $x$. It also contains the first semblance of Montgomery's conjecture.


*Montgomery, H. L.*, [**Primes in arithmetic progressions**](http://dx.doi.org/10.1307/mmj/1029000373), Mich. Math. J. 17, 33-39 (1970). [ZBL0209.34804](https://zbmath.org/?q=an:0209.34804).


