# the number of primitive roots of a modulo a fixed prime $p$ that are $\le x$

let $prim(x)=$ the number of primitive roots modulo of a fixed prime $p$ that are$\le x.$ proof $$prim(x) = \frac{{\phi \left( {p - 1} \right)}}{{p - 1}}\left( {x + O\left( {{2^m}\sqrt p \log p} \right)} \right)$$ that $m$ is the number of distinct prime divisors of $p-1.$ i know that $$prim(x) = \sum\limits_{1 \le n \le x} {\frac{{\phi \left( {p - 1} \right)}}{{p - 1}}} \sum\limits_{d|p - 1} {\frac{{\mu \left( d \right)}}{{\phi \left( d \right)}}} \sum\limits_{o\left( \chi \right) = d} {\chi \left( n \right)}$$ so that $$prim(x)=\frac{\phi \left ( p-1 \right )}{p-1}\left \{ \left \lfloor x \right \rfloor+\sum_{\begin{matrix} d|p-1\\ d>1\end{matrix}}^{ }\frac{\mu \left ( d \right )}{\phi \left ( d \right )}\sum_{o(\chi)=d}^{ }\sum_{1\leq n\leq x}^{ }\chi(n) \right \}$$ also i know $\sum\limits_{\begin{matrix} d|p-1\\ d>1\end{matrix}}^{ } {\frac{{\mu \left( d \right)}}{{\phi \left( d \right)}}} \sum\limits_{o\left( x \right) = d} {\sum\limits_{1 \le n \le x} {\chi \left( n \right)} } \le {2^{m-1}}\sqrt p \log p$ that $\chi$ is a Dirichlet character$\pmod p$ and $o(\chi)$ is the order of $\chi$.what is your idea about next steps?

• How can you use the big-$O$ notation if $p$ is fixed? – TonyK Jan 21 '17 at 15:46