]> Number Theory - Generators

Number Theory

Generators

A unit g n * is called a generator or primitive root of n * if for every a n * we have g k=a for some integer k. In other words, if we start with g, and keep multiplying by g eventually we will see every element, which explains the term “generator”.

Example: 3 is a generator of 4 * since 3 1 =3 ,3 2 =1 are the units of 4 *.

Example: 3 is a generator of 7 *. From before the powers of 3 are 3 ,2 ,6 ,4 ,5 ,1 which are the units of 7 *.

Example: 3 is not a generator of 11 * since the powers of 3 (mod5 ) are 3 ,9 ,5 ,4 ,1 which is only half of 11 *.

Theorem: Let p be a prime. Then p * contains exactly ϕ(p1 ) generators. In general, for every divisor dp1 , p * contains ϕ(d) elements of order d.

Proof: by Fermat's Theorem we know the equation x p1 1 =0 (modp) has p1 distinct solutions, namely every element of p *. Let q k be a prime power dividing p1 . Then we can factorize the above x p1 1 =(x q k1 )g(x)=0 (modp) where g(x) is some degree p1 q k polynomial. From before we know that (x q k1 ) has at most q k roots and g(x) has at most p1 q k roots, and since their product has p1 different roots, we see that there are exactly q k distinct solutions to x q k1 =0 (modp). Any solution a must have order dividing q k. Suppose such an a has order less than q k. Then its order must divide q k1 , and a is a solution of x q k1 1 =0 .

By a similar argument x q k1 1 (which is a factor of x q k1 ) has exactly q k1 distinct roots, so there must be exactly q kq k1 roots of x q k1 that are not roots of x q k1 and hence are of order q k. Recall q kq k1 =ϕ(q k).

Factorize p1 into primes: p1 =q 1 k 1 ...q n k n For each q i k i we find an element a i with order q i k i. Since the orders of each a i are coprime, [[order.xhtml][the order of their product is equal to the product of their orders]], that is a 1 ...a i has order q 1 k 1 ...q n k n=p1 and thus is a generator.

We have ϕ(q i k i) choices for each a i thus we have exactly ϕ(q 1 k 1 )...ϕ(q n k n)=ϕ(p1 ) different generators.

A similar argument proves the theorem for the divisors of p1 .

Alternative Proof: We can use a counting argument and basic facts about cyclic groups instead.

Any element a p * must have order dividing p1 (by Fermat). Then if a has order d, the solutions of x d1 =0 (modp). are precisely a,a 2 ,...,a d=1 and there are no other elements of order d since x d1 has at most d roots.

It is easy to show that a k has order d if and only if gcd(k,d)=1 , thus either there are no elements of order d or there are exactly ϕ(d) elements of order d.

Now dp1 ϕ(d)=p1 (which we can prove using multiplicative functions or cyclic groups) and if any of the ϕ(d) were replaced with 0 on the left-hand side, the equality would fail. Hence there must be exactly ϕ(d) elements of order d for each dp1 (since each one of the p1 elements of p * must have some order).

What about powers of primes, or composite numbers in general?