|
抄一下Brilliant wiki
Finding Primitive Roots
The proof of the theorem (part of which is presented below) is essentially non-constructive: that is, it does not give an effective way to find a primitive root when it exists. Once one primitive root $ g $ has been found, the others are easy to construct: simply take the powers $ g^a,$ where $ a$ is relatively prime to $ \phi(n)$. But finding a primitive root efficiently is a difficult computational problem in general.
There are some special cases when it is easier to find them. Here is an example:
Suppose $ p $ is a prime such that $ 2p+1 $ is also prime. (Such $ p $ are called Sophie Germain primes.) Show that if $ p \equiv 1 $ mod $4$, then $2 $ is a primitive root mod $ 2p+1 $.
The point is that the list of possible orders of elements of $ {\mathbb Z}_{2p+1}^* $ is very short: the order of $ 2 $ divides $ \phi(2p+1) = 2p $, so it is either $ 1,2,p,$ or $2p$. It can't be $ 1 $ or $ 2 $, so we only need to rule out $ p $. But $ 2^p \equiv \left( \frac2{2p+1} \right) $ mod $ 2p+1 $, where $ \left( \frac2{2p+1} \right) $ is the Legendre symbol; this is by Euler's criterion. But by the second supplement to quadratic reciprocity, $ \left( \frac2{2p+1} \right) =-1$ because $ 2p+1 \equiv 3 $ mod $ 8 $.
So the only remaining possibility is that the order of $ 2 $ mod $ 2p+1 $ is $ 2p $. $_\square $
For instance, this shows that $ 2 $ is a primitive root mod $ 83 $.
Applications
When there is a primitive root $ g$ mod $ n $, the elements of $ {\mathbb Z}_n^* $ can be written as $ 1, g, g^2, \ldots, g^{\phi(n)-1} $. Multiplying two elements corresponds to adding their exponents mod $ \phi(n). $ That is, the multiplicative arithmetic in $ {\mathbb Z}_n^* $ reduces to additive arithmetic in $ {\mathbb Z}_{\phi(n)} $.
Let $ k $ be an integer and $ p $ an odd prime number. How many nonzero $k^\text{th}$ powers are there mod $ p?$
The question certainly depends on the relationship between $ k$ and $ p$. When $ k=2,$ the answer is $ \frac{p-1}2 $ (see quadratic residues), but when $ k = p-1, $ the answer is $ 1 $ (by Fermat's little theorem).
As an illustration, take $ k = 9, p = 13 $. Then it's easy to check that $ g=2 $ is a primitive root mod $ p$. The ninth powers mod $ p $ are $ 2^0, 2^9, 2^{18}, 2^{27}, \ldots $, but we can consider the exponents mod $ 12 $ because $ 2^{12} \equiv 1 $. So we get
$$2^0, 2^9, 2^6, 2^3, 2^0, \ldots,$$
so there are four $9^\text{th}$ powers mod $ 13 $. The exponents are multiples of $ 3$, which is gcd$(9,13-1)$. There are $\frac{13-1}3 = 4$ of these.
In general, since every nonzero element of $ {\mathbb Z}_p $ can be written as $ g^a $ mod $ p $ for some integer $ x $, the equation $ x^k \equiv y $ mod $ p $ can be rewritten $ (g^a)^k \equiv g^b, $ or $ g^{ak-b} \equiv 1 $ mod $ p $. Because $ g $ is a primitive root, this happens if and only if $ (p-1)|(ak-b) $, so $ ak \equiv b $ mod $ p -1 $.
So the question becomes, "As $ a $ ranges over $ {\mathbb Z}_{p-1} $, how many values can $ ak $ mod $ p-1 $ take on?" In fact, the extended Euclidean algorithm implies that $ \big\{ak+(p-1)c : k, c \in {\mathbb Z}\big\} $ is the set of multiples of gcd$(k,p-1)$. There are exactly
$$\frac{p-1}{\text{gcd}(k,p-1)}$$
such values, so this is the answer. $_\square$
Here is another problem where it can help to write the elements of $ {\mathbb Z}_p^* $ as powers of a primitive root.
Find the smallest positive prime divisor of
$$1^{60}+2^{60} + 3^{60}+ \cdots + 33^{60}.$$
Partial Proof of the Theorem
One half of this theorem is not hard to prove: Suppose $ n = ab, $ where $ a$ and $ b$ are relatively prime and $ \ge 3 $. Suppose $ x $ is relatively prime to $ ab $. Then since $ x^{\phi(a)} \equiv 1 $ mod $ a $ and $ x^{\phi(b)} \equiv 1 $ mod $ b $, it follows that $x^{\text{lcm}\big(\phi(a),\phi(b)\big)} \equiv 1 $ mod $ ab $.
But $ \phi(a) $ and $ \phi(b) $ are both even, so their LCM is strictly less than their product. So the order of $ x $ is strictly less than $ \phi(a)\phi(b) = \phi(ab) $. So there is no primitive root mod $ ab $.
The only $ n $ that cannot be written in this way are $ 1,2,4,p^k,2p^k,$ and higher powers of $ 2 $. But for any odd $ x $,
$$x^{2^{k-2}} \equiv 1 \pmod{2^k} \ (k \ge 3),$$
which can be proved by the LTE lemma (or by induction). Since $\phi(2^k) = 2^{k-1}$, there is no primitive root mod $ 2^k $ for $ k \ge 3 $.
Some of the proof of the other direction can be found in the wiki on orders.
|
|