Show that the number of solutions to $x^n\equiv 1 \pmod p$ is $\gcd(n, p-1)$.
I know the argument should specifically use primitive roots (the desired one based off the stuff I've learned), but not sure how to extend it to a proof. Would appreciate help.
Suppose $g$ is a primitive root modulo $p$, then thr number of solutions to $x^n \equiv 1 \pmod{p}$ is the same as that of $g^{nk} \equiv 1 \pmod{p}$, or $nk \equiv 0 \pmod{p - 1}$, which is $\gcd(n, p - 1)$.