I am going to have to borrow the opening passage from Bombieri, Friedlander, Iwaniec${}^\*$ since they state this idea so well. In the following $\|f\|$ means $\big(\sum\_{n\leqslant x} |f(n)|^2\big)^{1/2}$.



> 
> Given an arithmetic function $f(n)$, it is natural to study its distribution in residue classes $a\: (\text{mod }q)$. One focuses on the classes $a$ with $(a,q)=1$, without restricting the generality, and expects that among these classes a reasonable function $f$ will be uniformly distributed, such uniformity being measured by upper bounds for the magnitude of
>  $$
> \Delta\_f(x;q,a) = \sum\_{\substack{n\leqslant x, \\ n\equiv a(\text{mod }q)}} f(n) - \frac{1}{\phi(q)} \sum\_{n\leqslant x, \\ (n,q)=1} f(n).
> $$
>  A not unreasonable goal is the estimate
>  $$
> \Delta\_f(x;q,a) \ll \frac{1}{\phi(q)} (\log x)^{-A}x^{1/2} \|f\|, \qquad \qquad (1)
> $$
>  for any $A>0$, the implied constant depending only on $A$, the result valid uniformly in $q$ in a range as large as possible. In view of Cauchy's inequality it is natural to regard (1) as saving $(\log x)^A$ from the "trivial" estimate. 
> 
> 
> 


I have two queries.


**1.** Just a slight niggle. I only got $\ll \frac{1}{\sqrt{q}} x^{1/2} \|f\|$ for the "trivial" estimate using Cauchy's inequality. Is anyone able to get $\ll \frac{1}{\phi(q)} x^{1/2} \|f\|$?


**2.** More philosophically, how does one know when (or where does the intuition come from) that an estimate like (1) is actually true, or can be improved on? Normally my first instinct would be resort to some computations as a check that time isn't being wasted proving something that has an easy counterexample, but I cannot really see how this is done here. There are so many variables; one would presumably have to fix some $q$ and then let $x$ vary, then see what happens with different values of $q$ --- and this doesn't even take into account the infinite choices for $f$. 




---


${}^\*$ Primes in arithmetic progressions to large moduli, *Acta Math.* **156** (1986).



Distribution of a function in an arithmetic progression
For individual $a$'s the best universal bound you can get is $\ll \frac{1}{\sqrt{q}} x^{1/2} \|f\|$, as shown by the example of the characteristic function of a reduced residue class mod $q$. I think the authors meant the following. We are interested in the sums $\sum\_{\substack{n\leqslant x, \ n\equiv a(\text{mod }q)}} f(n)$, but only when they are close to each other, i.e. close to their average $\frac{1}{\phi(q)} \sum\_{n\leqslant x, \ (n,q)=1} f(n)$. So we are interested in a situation when the "error term" $\Delta\_f(x;q,a)$ is smaller than the "main term" $\frac{1}{\phi(q)} \sum\_{n\leqslant x, \ (n,q)=1} f(n)$, for which we know the bound $\ll \frac{1}{\phi(q)} x^{1/2} \|f\|$ by Cauchy.


As to your philosophical question, the sum $\sum\_{\substack{n\leqslant x, \ n\equiv a(\text{mod }q)}} f(n)$ can be understood as the average of $\bar\chi(a)\sum\_{n\leq x}f(n)\chi(n)$ as $\chi$ varies over the mod $q$ Dirichlet characters. In some fortunate situations, the contribution of the principal character, i.e. the term $\frac{1}{\phi(q)} \sum\_{n\leqslant x, \ (n,q)=1} f(n)$ considered above, is much bigger then the total contribution of all the other characters. 


This is closely tied to the following phenomenon: the Dirichlet series $\sum f(n)n^{-s}$ is regular in a right half-plane with a pole on its boundary. Replacing $f(n)$ by $f(n)\chi(n)$ for a nonprincipal $\chi$ often destroyes the pole, and makes $\sum f(n)\chi(n)n^{-s}$ converge in a larger right half-plane. This is certainly expected to happen for $f(n)=\Lambda(n)$ which measures the distribution of primes mod $q$, as it is a consequence of the Generalized Riemann Hypothesis.


So I think the philosophy is this: there is a miracle that Riemann and Dirichlet discovered. We don't understand it, but we want to understand it, try to understand it.


