Criteria for Primitive Roots Modulo N

Before this, knowMultiplicative Group of Z/pZ

Read · 2 min

When is the unit group UnU_n cyclic (generated by a primitive root)?

For a positive integer nn, the number of positive integers less than or equal to nn and co-prime to nn is called the totient function φ(n)\varphi(n). For example, φ(6)=2\varphi(6)=2 and φ(7)=6\varphi(7)=6. We will not prove properties of φ(n)\varphi(n) here. We just need to know that φ(pk)=pk−1(p−1)\varphi(p^k)=p^{k-1}(p-1) for a prime pp and φ(ab)=φ(a)φ(b)\varphi(ab)=\varphi(a)\varphi(b) for co-prime a,ba,b.

The set of positive integers less than or equal to nn and co-prime to nn forms a group under the operation: multiplication (modn)\pmod n. That is, for two elements aa and bb, a∙b=ab(modp)a\bullet b=ab\pmod p. Let's denote this by UnU_n. U15={1,2,4,7,8,11,13,14}U_{15}=\{1,2,4,7,8,11,13,14\} Be sure to check that UnU_n really is a group under this operation!

We are interested in the question: For which nn, UnU_n has a generator? That is, it has an element gg so that gi(modn)g^i\pmod n produces all elements of UnU_n. In other words, does there exist a g∈Ung\in U_n so that ord(g)=φ(n)\text{ord}(g)=\varphi(n)? In fact, such a gg is called the primitive root of nn. Now, we will find out which nn has a primitive root.

Let's check some values by hand. n=2n=2 and n=4n=4 works, and so does all primes n=pn=p. What about n=2kn=2^k for k>2k>2?

We already know that, if aa is odd, then 88 divides a2−1a^2-1. Then, by the identity: x2−1=(x+1)(x−1)x^2-1=(x+1)(x-1) we get that, x2k−1−1=(x2k−2+1)⋯(x2+1)(x2−1)x^{2^{k-1}}-1=(x^{2^{k-2}}+1)\cdots(x^2+1)(x^2-1) On the right side, for odd xx, x2−1x^2-1 is divisible by 8=238=2^3 and each terms x2i+1x^{2^i}+1 is divisibly by 22. So for any odd xx, x2k−1−1x^{2^{k-1}}-1 is divisible by 2k2^k. And this shows n=2kn=2^k doesn't have any primitive root.

Let n=abn=ab where a,b>2a,b>2 and (a,b)=1(a,b)=1. Now, for any g∈Ung\in U_n, (g,a)=(g,b)=1(g,a)=(g,b)=1. Let the order of aa and bb modulo gg be dd and ee. \begin{eqnarray*} g^d & \equiv & 1\pmod a\newline g^e & \equiv & 1\pmod b \end{eqnarray*} Now, we know that for any nn with gn≡1(modm)g^n\equiv1\pmod m and ordm(g)=d\text{ord}_m(g)=d, d∣nd|n. From Euler-Fermat's theorem,

gφ(a)≡1(moda)g^{\varphi(a)} \equiv 1\pmod a gφ(b)≡1(modb)g^{\varphi(b)} \equiv 1\pmod b

Therefore, d∣φ(a),e∣φ(b)d|\varphi(a),e|\varphi(b). On the other hand, g[φ(a),φ(b)]≡1(modab)g^{[\varphi(a),\varphi(b)]}\equiv1\pmod{ab} where [a,b][a,b] is the least common multiple of aa and bb. Now, both φ(a)\varphi(a) and φ(b)\varphi(b) are even since a,b>2a,b>2. Therefore,

\begin{eqnarray*} [\varphi(a),\varphi(b)] & \leq & \dfrac{\varphi(a)\varphi(b)}2\newline & = & \dfrac{\varphi(ab)}2\newline & = & \dfrac{\varphi(n)}2 \end{eqnarray*} This gives us that for such nn, there is no gg for which ordn(g)=φ(n)\text{ord}_n(g)=\varphi(n). So at least one of aa and bb must be less than or equal to 22, and the other must be a prime power.

Summary The only nn for which nn has a primitive root are 2,4,pk,2pk2,4,p^k,2p^k for an odd prime pp. And so, UnU_n is cyclic for only those nn.

Read · 1 min

Basic Definitions in Modular Arithmetic

Order

The order of aa mod nn is the smallest positive integer pp such that ap≡1a^p\equiv1 mod nn. The order of aa mod nn is usually written ordn(a)ord_n(a).

An elementary but important result is that ordn(a)ord_n(a) exists iff gcd(a,n)=1gcd(a,n)=1

Primitive Roots

aa is defined to be a primitive root of nn iff ordn(a)=φ(n)ord_n(a)=\varphi(n), where φ\varphi denotes Euler's Totient Function.

Quadratic Residues

aa is said to be a "quadratic residue" mod nn iff ∃b\exists b s.t b2≡ab^2\equiv{a} mod nn

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems