]> Number Theory - Generators: The General Case

Generators: The General Case

We now consider the problem of finding generators for n * for any n. Previously, we only studied generators for prime n. To generalize, we follow the most obvious strategy: first consider prime powers, then use the Chinese Remainder Theorem to generalize.

Powers of Two

First we see that 1 is a generator for 2 * and 3 is a generator for 4 *. A quick check reveals 8 * has no generator: the square of any odd number is 1 modulo 8.

Next suppose 2 k * has a generator g for some k>3 . Then for each a 8 *, we have g x=a(mod2 k) for some x. This equation still holds modulo 8 since 8 2 k. But this is a contradiction since it would imply g is a generator of 8 *.

Thus if n is a power of 2, n * has a generator if and only if n=2 or n=4 .

We can examine the behaviour of units under exponentiation modulo a power of two more closely. By induction we can show that

(1 +2 n) 2 t3 =1 +2 t2 (nn 2 +2 n 4 )

(first explicitly compute for t=4,5 before proving the inductive step).

From here we can show easily that if a=±3 (mod8 ) then the order of a is 2 t2 modulo 2 t, otherwise the order is strictly smaller.

Squares of Odd Primes

Let p be an odd prime. Let g be a generator of p *. We try to find a generator of p 2 .

Intuitively, such a generator ought to somehow depend on the generator for p *. So we consider the problem of finding the order of g+kp in p 2 for any k.

Let t be the order of g+kp in p 2 *. Then we also have (g+kp) t=g t=1 (modp), thus (p1 )t. Since tϕ(p 2 )=p(p1 ), there are two possibilities. Either t=p1 or t=p(p1 ). In the latter case, g+kp generates p 2 .

But the former case, (g+kp) p1 =1 (modp 2 ) occurs if and only if

(g+kp) p=g+kp(modp 2 ).

Considering the binomial expansion,

g pg=kp(modp 2 ).

Note p is not invertible, so we go back to first principles and find

k=(g pg)/p(modp)

(the division is an integer division). In other words, g+kp is a generator of p 2 * except for one value of k. Thus each of the ϕ(p1 ) generators of p * can be used to construct p1 generators of p 2 *.

Alternative proof: we show that at least one of g or g+p is a generator:

((g+p) p1 1 )(g p1 1 ) = (g+p) p1 g p1 = (g+pg)((g+p) p2 +(g+p) p3 g+...+g p2 )

Consider the binomial expansion gives

((g+p) p1 1 )(g p1 1 )=p((p1 )g p2 +p(...))=pg p2

Since this is nonzero, we see that g+p and g cannot both be roots of the polynomial x p1 1 , hence (at least) one of them has order p(p1 ).

Powers of Odd Primes

Let g be a generator of p 2 *. By considering the binomial expansion and inducting on r, we find that if

g t=1 +kp s(modp s+1 )

then

g tp r=1 +kp s+r(modp s+r+1 ).

Then the order of g in p 2 +r * must be ϕ(p 2 +r), hence g generates p 2 +r *.

The General Case

We first consider odd n. Write n=p 1 k 1 ...p m k m. By the Chinese Remainder Theorem we have

n *= p 1 k 1 *×...× p m k m *

Each x n * corresponds to some element (x 1 ,...,x n) of the right-hand side. Now each x i satisfies

x i ϕ(p i k i)=1 (modp i k i)

so if we take the lowest common multiple of the orders

λ(n)=lcm(ϕ(p 1 k 1 ),...,ϕ(p m k m))

we find (x 1 ,...,x n) λ=(1,...,1 ), thus x has order dividing λ(n). On the other hand, if we choose each g i to be a generator of p i k i then (g 1 ,...,g n) has order λ(n).

Hence a generator exists in n * if and only if λ(n)=ϕ(n). Now ϕ(p i) k i is even thus for λ(n)=ϕ(n) implies at most one of the p i is odd hence n is in fact a prime power.

Now suppose n=2 kq where q is odd. Again by the Chinese Remainder Theorem we have n *= 2 k *× q *. If k>2 then n * has no generator since 8 * doesn’t. If k=2 , since 4 * has order 2, the lowest common multiple of ϕ(4 ) and ϕ(q) is less than ϕ(4 q), thus no generator exists. Lastly if k=1 then if g is a generator for q then λ(n)=ϕ(n) thus a generator exists [(1 ,g) is a generator].

In summary, n * has a generator precisely when n=2 ,4 ,p k,2 p k for odd primes p and positive integers k.

Note we can tighten Euler’s Theorem in this sense: in general we can find some λ(n)<ϕ(n) such that a λ(n)=1 for all a n *, and furthermore there exists a n * with order λ(n).

From the above, we see if n=2 kp 1 k 1 ...p m k m for odd primes p i, then we can take

λ(n)=lcm(ϕ(2 k),ϕ(p 1 k 1 ),...,ϕ(p m k m))

for k2 and

λ(n)=lcm(ϕ(2 k1 ),ϕ(p 1 k 1 ),...,ϕ(p m k m))

for k>2 .