Let $p$ be a (large) prime number, and let $\chi : (\mathbf{Z}/p\mathbf{Z})^{\times} \rightarrow \mathbf{C}^{\times}$ be a Dirichlet character of conductor $p$. We have good estimates on the character sum $\sum_{n \leq x} \chi(n)$. For instance, if $p>10^7$ then for any $x\geq 1$ we have: $$\mid \sum_{n\leq x } \chi(n) \mid \leq 2.74\cdot p^{\frac{1}{2}}\cdot \log(p) \text{ .}$$

I'm looking for similar estimates for the character sum restricted to prime numbers: do we have similar upper-bound for $$\mid \sum_{q\leq x\atop q \text{ prime} } \chi(q) \mid \text{ ?}$$ I would be happy to make some restrictions on $x$ (for instance, $x = O(p^{1-\epsilon})$ for some $\epsilon>0$, or $x=C\cdot p$ for some $0<C<1$; I want $x$ to be large). I really need an $\textbf{explicit} $ numerical bound (so all the constants should be effective and relatively small). I would of course prefer something unconditional (on GRH).

My motivation is the following. Suppose $\ell$ is a prime dividing $p-1$. I want to find an explicit upper-bound on the number of $\textbf{primes}$ less than $x$ which are $\ell$th power modulo $p$. If $\ell$ is big (much bigger than $\log(p)$ for instance) this is not very challenging since the obvious bound $\frac{p-1}{\ell}$ becomes good.

Analytic Number Theoryby Iwaniec and Kowalski it is proved (Corollary 5.29) that $$\sum_{q\le x}\chi(q)\ll\sqrt{p} x(\log x)^{-A}$$ for any $A>0$ where the sum is over primes $q$ but this is worse than the trivial bound $x / \log x$ in the range this question is considering. $\endgroup$ – kodlu Mar 4 at 17:41