Skip to main content

Results from Number Theory

The quantity referred to above as R(p) is usually written Ord 2 and is

                                                             p

read "the order of 2 mod p". The maximum value of Ord 2 is given by

                                                      p

Euler's phi-function, sometimes called the totient. The totient of a positive integer p is the number of integers less than p which are relatively prime to p. The totient is easy to compute from a representation of p as a product of primes:

               n      n        n
Let p = p 1 * p 2 ... p k
1 2 k

where the p are distinct primes. Then

           i
k -1 k -1 k -1
phi(p) = (p - 1) * p 1 * (p - 1) * p 2 ... (p - 1) * p k
1 1 2 2 k k

If p is prime, the totient of p is simply

     phi(p) = p-1.

If p is not prime, the totient is smaller.

If a is relatively prime to p, then Euler's generalization of Fermat's theorem states

      phi(m)
a = 1 mod p.

It is this theorem which places an upper bound Ord 2, because Ord 2 is

                                                  p              p

the smallest value such that

      Ord 2
2 p = 1 mod p

Moreover it is always true that phi(p) is divisible by Ord 2.

                                                          p