# An Exponential Sum Restricted to Primes

Let $a,q,N$ be integers such that $N/2 \leq q \leq N$ and $a/q \notin \mathbb{Z}$.

Is the following estimate true, and, if so, how can it be proved? $\left|\sum_{1 \leq p \leq N} \exp(2\pi i p a/q) \right|\leq |a|^{o(1)} N^{o(1)},$ where $f(x)=x^{o(1)}$ means $\lim_{x \rightarrow \infty}\frac{\log f(x)}{\log x}=0$, or equivalently $f(x) = O_{\epsilon} (x^{\epsilon})$ for all $\epsilon > 0$. Can it be obtained, for example, from Vinogradov-type estimates?

It would even be useful to know whether the estimate holds in the following average sense: $$\sum_{\substack{N/2 \leq q \leq N \\ a/q \notin \mathbb{Z}}} \left|\sum_{1 \leq p \leq N} \exp(2\pi i p a/q) \right|\leq |a|^{o(1)} N^{1+o(1)}.$$

$N$ may be assumed to be as large as required.

• A bound this strong seems really unlikely. I don't think we can have more than logarithmic cancellation, because by the prime number theorem there are significantly more primes closer to 0. – Will Sawin Jan 27 '17 at 5:15

For example, take $\frac aq=\frac14$; then $$\sum_{p\le x} e^{2\pi i p a/q} = \sum_{p\le x} e^{\pi i p/2} = -1 + i \big(\pi(x;4,1) - \pi(x;4,3) \big),$$ where $\pi(x;4,b)$ denotes the number of primes up to $x$ that are congruent to $b$ (mod $4$). Littlewood proved that the quantity in parentheses is $\Omega(\sqrt x \log\log\log x/\log x)$, which is far larger than $x^{o(1)}$.
• I understand the first estimate is false for some specific pairs $(a,q)$. Is it possible that the first estimate or the average estimate holds for sufficiently large $N$ or for an increasing sequence $(N_k)_{k=1}^{\infty}$? When you say "conditionally" you mean "conditionally on GRH"? – Linden Jan 27 '17 at 18:38
• Asking the estimate to hold for an increasing sequence $\{N_k\}$ is probably true, but really not the right question to ask. A good analogy is a random walk on the integers (each step is $+1$ or $-1$ each with probability $1/2$): it's not the case that the position of the random walk at time $N$ is $N^{o(1)}$—it's more like $N^{1/2}$. But of course a random walk will cross from positive to negative and back, and while it's crossing, it's $O(1)$ even. So occasionally it's small, but not for any real reason. – Greg Martin Jan 27 '17 at 19:19
• The average estimate is even worse, because you're forcing $p$ and $q$ to be the same size, which (for small $a$, say) will completely skew the distribution to one side. There are known exponential-sum techniques for dealing with sums with a smoothly varying component like $1/q$: I recommend reading Montgomery's "Ten Lectures" for example. – Greg Martin Jan 27 '17 at 19:21