Barban–Davenport–Halberstam theorem
# Barban–Davenport–Halberstam theorem

In mathematics, the Barban–Davenport–Halberstam theorem is a statement about the distribution of prime numbers in an arithmetic progression. It is known that in the long run primes are distributed equally across possible progressions with the same difference. Theorems of the Barban–Davenport–Halberstam type give estimates for the error term, determining how close to uniform the distributions are.

## Statement

Let a be coprime to q and

    $\vartheta (x;q,a)=\sum _{p\leq x\,;\,p\equiv a{\bmod {q}}}\log p\$

be a weighted count of primes in the arithmetic progression a mod q. We have

    $\vartheta (x;q,a)={\frac {x}{\varphi (q)}}+E(x;q,a)\$

where φ is Euler's totient function and the error term E is small compared to x. We take a sum of squares of error terms

    $V(x,Q)=\sum _{q\leq Q}\sum _{a{\bmod {q}}}|E(x;q,a)|^{2}\ .$

Then we have

    $V(x,Q)=O(Qx\log x)+O(x^{2}(\log x)^{-A})\$

for $1\leq Q\leq x$ and every positive A, where O is Landau's Big O notation.

This form of the theorem is due to Gallagher. The result of Barban is valid only for $Q\leq x(\log x)^{-B}$ for some B depending on A, and the result of Davenport–Halberstam has B = A + 5.

