I wish to find the number of solutions to the congruence $x^n \equiv 1 \mod p$ where $n$ is any natural number, $p$ prime. I tried using primitive roots and Fermat but I don't know where to go from here.
-
You should be able to do this using only primitive roots. – Qiaochu Yuan Dec 03 '17 at 18:24
-
1How? If $g$ is a primitive root and $g^n \equiv 1 \mod p$ then $p-1 | n$... @QiaochuYuan – Trevor Dec 03 '17 at 18:48
-
Write $x$ as a power of a primitive root. – Qiaochu Yuan Dec 03 '17 at 18:48
-
Is this reasoning acceptable: if $x≡ 1 mod p; n≠p-1$ then this is true for any power of x, i.e. $x^n ≡ 1 mod p$. That means there are infinitely many solutions for this congruence. – sirous Dec 04 '17 at 08:15
2 Answers
A zest of group theory could dispense us of any calculation : $\mathbf F_p =\mathbf Z/p\mathbf Z$ is a field because $p$ is prime, and its multiplicative group ${\mathbf F_p}^*$ is cyclic of order $p-1$. A characteristic property of a cyclic group $C_m$ of order $m$ is that for any $d\mid m$, $C_m$ admits a unique subgroup (necessarily cyclic) of order $d$. The solutions of $x^n\equiv 1$ mod $p$ form a subgroup $S$ of ${\mathbf F_p}^*$ whose order must be a common divisor of $n$ and $p-1$. If $D =gcd(n, p-1)$, the existence and uniqueness property above ensures that $S$ has order $D$.

- 14,578
Following Yuan's hint you can use primitive roots to solve the question. As $p$ is prime such a primitive root $g$ exists, which means that for every $1 \le k \le p-1$ there exists $n_0$ s.t. $g^{n_0} \equiv k \pmod p$
Now note that the equation $x^n \equiv 1 \pmod p$ has only the trivial solution when $\gcd(n,p-1) = 1$, as then we have that $\text{ord}_p(x) |n$ and $\text{ord}_p(x) \mid p-1$ by Fermat's Little Theorem, so $\text{ord}_p(x) \mid \gcd(n,p-1) = 1$, so we must have $\text{ord}_p(x) = 1$, i.e. $x \equiv 1 \pmod{p}$
Now let $\gcd(n,p-1) = d \not = 1$. Now assume that $g^k$ is a solution. Then we have that: $1 \equiv g^{kn}$, but the order of $g$ is $p-1$, so we must have $p-1 \mid kn$, i.e. $\frac{p-1}{d} \mid k$, so $k= m \cdot\frac{p-1}{d}$. From this we can conclude that the solution of equations are the numbers $1, g^{\frac{p-1}{d}}, g^{2\cdot\frac{p-1}{d}}, \dots ,g^{(d-1)\frac{p-1}{d}}$. So therefore we get that there are at exactly $d = \gcd(n,p-1)$ solutions. of $x^n \equiv 1 \pmod p$

- 35,843
-
1If $p-1 \mid kn$, why does it follow that $\frac{p-1}{d} \mid k$? I can see that $\frac{p-1}{d} \mid ks$ for some $s$, but I don't see why you must have $\gcd(\frac{p-1}{d}, s)=1$ to conclude that $\frac{p-1}{d} \mid k$. – John Smith May 19 '21 at 06:45
-