Lectures 10 & 11: Euler's Function & Primitive Elements, Math 413 (Number Theory)

Lectures 10 & 11: Euler's Function & Primitive Elements

Number Theory, Math 413, Spring 2003


  1. Euler's φ Function
  2. Primitive Elements
  3. Carmichael's λ Function
  1. Algorithm: Proving Primality
  2. Application: Linear Congruential Generators
  3. Computational Tools
  4. Open Questions
  5. References

Readings:

1. Euler's φ Function

Recall that in a ring R the units are the invertible elements. These elements form a group - the group of units. We will examine the structure of this group for the ring ZN, denoting the group of units ZN*.

Thm: In ZN*, a is a unit iff gcd(a, N) = 1.

Defn: (The Euler φ Function) φ(N) (also called the totient function) is defined as the number of positive integers a < N such that gcd(a, N) = 1. Equivalently, φ(N) is the number of elements in the group of units mod N.

Thm: (Euler's extension to Fermat's Little Thm, circa 1760)
If gcd(a, N) = 1 then aφ(N) ≡ 1 (mod N)

proof: if gcd(a, N) = 1 then (xayaxy)
Also, gcd(a, N) = 1 and gcd(x, N) = 1 implies that gcd(xa, N) = 1
So the map [x] → [xa] permutes the elements of ZN*
Thus {ax: xZN*} is just a permutation of the elements ofZN*
So ∏xx ≡ ∏xxaaφ(N)xx
So aφ(N) ≡ 1 (mod N) as desired. ♠

Primitive Elements

Algorithm: (Finding Primitive Elements)

There is currently no deterministic method of finding primitive elements mod some prime p. It is true that if a single primitive element a is found, then others are easily generated, as ae is then primitive for any value of e which is coprime to p.

The lack of a deterministic algorithm for finding primitive elements is not of serious practical concern, as a large percentage of randomly chosen elements are primitive. Thus the simple algorithm of randomly choosing an element, checking it for primitivity and if it is not primitive trying again, is usually good enough.

Of more serious concern is the requirement to factor p-1 in order to check an element for primitivity mod p. This factoring step can prove to be a serious impediment in various algorithms which require primitive elements, such as proving the primality of p [appendix].

Another question is how many primitive elements there are modulo some prime p.

Thm: Given a cyclic group of order ω there are φ(ω) elements of the group which can generate it. (i.e. there are φ(ω) elements g such that G = ⟨g⟩.)

Corr: If p is prime then there are φ(φ(p)) primitive elements modulo p.

3. Carmichael's λ Function

Defn: (The Carmichael λ Function) λ(N) is defined as the smallest positive integer such that aλ(N) ≡ 1 (mod N) for all a in the group of units mod N. In the language of group theory we say that λ(N) is the exponent of the group of units mod N.

Thm: λ(N) | φ(N)

proof: Certainly λ(N) ≤ φ(N) from the definition of λ and Euler's extension of FLittleT
If λ does not divide φ then the division algorithm gives a value r < λ such that r = xλ + yφ
So ar

We would now like a (comparatively) simple way of computing &lamba;(N), as we have with φ(N). Not surprisingly, this will require factoring N, so for very large N this may not be practical, and a similar proof shows that computing λ(N) is equivalent to factoring N. The following theorem outlines a (conceptually) simple method for computing λ(N).

Thm:

  1. If n and n are coprime, then λ(nm) = lcm(λ(n),λ(m))
  2. If p is prime, then λ(p) = φ(p) = p-1
  3. If p is an odd prime, then λ(pn) = φ(pn) = (p-1)pn
  4. λ(2) = 1, λ(22) = 2
  5. λ(2e) = 2e-2) for e > 2

A. Algorithm: Proving Primality

Thm: If there is an element a which has order p-1 mod p then p is prime.

Algorithm: (Proving Primality)

     Factor p-1 as q1e1q2e2...qnen
     a larr; 2
     label checkPrim
     for i from 1 to n {
          if ( aφ(p)/qi ≡ 1) {
	       a larr; a + 1
	       goto checkPrim
	  }
     }
     print "p is prime as a is primitive mod p"

Note that this seemingly simple algorithm has several hidden complexities. The factorization of p-1 can be very difficult. After the factorization we trust that each of the qi is itself prime. In order to be sure of this we should apply this primality proof algorithm to each qi, so our algorithm is now recursive, with each step examining a larger number of smaller primes. At the leaf nodes of this tree of primes should be some which are known to be prime, perhaps from some precomputed table of smallish primes.

B. Application: Linear Congruential Generators

C. Computational Tools

D. Open Questions

  1. Carmichael's Conjecture: Given an integer m, there is some n &neq; m such that φ(n) = φ(m) [Guy94, B39] [ Mathworld entry]
  2. If the Multiplicity of a positive integer k is the number of integers n such that φ(n) = k, then Sierpinski conjectures that every multiplicity greater than 1 occurs. (Proved by Ford (1998)) [Guy94, B39] [ Mathworld entry]
  3. Lehmer conjectures that no composite n has n-1 divisible by φ(n). [Guy94, B37] [ Mathworld entry]
  4. Are there an infinite number of integers n such that φ(n) = φ(n+1)? More generally, for each k, are there an infinite number of integers n such that φ(n) = φ(n+k)? [Guy94, B36]
  5. Artin's Conjecture For g &neq; -1 and g not a perfect square, there are an infinite number of p prime such that g is primitive mod p. (Proven by Hooley (1967), but stronger related conjectures are open) [Guy94, F9] [Shan85, Sect 32] [Mathworld entry]

D. References

[CLO92] Ideals, Varieties & Algorithms, D. Cox, J. Little & D. O'Shea, Springer, 1992

Robert Campbell, campbell@math.umbc.edu
29 Dec, 2002