Show that if $p$ is prime and $p = 2q + 1$, where $q$ is an odd prime and $a$ is a positive integer with $1 < a< p -1$, then $p - a^2$ is a primitive root modulo $p$.
I'm struggling with this one. I know the order of the primitive root has to be $2q$. I also know there are $q-1$ of them. I know $(p-a^2)^{2q} \equiv 1 \pmod{p} \Rightarrow (-a^2)^{2q} \equiv a^{4q} \equiv 1 \pmod{p}$ I know this works for all $a$ via fermats little theorem, but I dont know how to show thats actually the order. Any help or hints would be greatly appreciated
Let $m=2q$ be the order of the unit group modulo $p$. A unit $g$ is a primitive root if and only if $g^{m/r}\not\equiv1\pmod{p}$ for every prime divisor $r$ of $m$.
Here $r\in\{2,q\}$, so you need to have $g^q\not\equiv1\pmod{p}$, in fact $g^q\equiv-1\pmod{p}$, and $g^2\not\equiv1\pmod{p}$. The latter is easy because $p$ is prime and therefore the only solutions to $g^2\equiv 1\pmod{p}$ are $\pm1\pmod{p}$ both of which are excluded by hypothesis.
As for $g^q$ with $g = p - a^2 \equiv -a^2\pmod{p}$, we get $g^q \equiv (-a^2)^q = -a^{2q} \equiv -1\pmod{p}$, where we use the facts that $q$ is odd and that $a^m\equiv1\pmod{p}$.