Chapter 7 Section A

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Chapter 7: Euler’s Generalization of Fermat’s Theorem 1

Chapter 7: Euler’s Generalization of Fermat’s Theorem

SECTION A Euler’s Totient Function

By the end of this section you will be able to


 evaluate Euler’s totient function for prime numbers
 evaluate Euler’s totient function for any positive integer greater than 1
 prove properties of Euler’s totient function

We can actually extend Fermat’s Theorem which is confined to prime moduli to arbitrary
moduli. First we define Euler’s phi or totient function.
A1 Definition of Euler’s Totient Function
We define this function for positive integers. Before we can write down the definition you
need to know what is meant by cardinality.
Cardinality, Card, of a set is the number of elements in the set. For example
Card 2, 4, 5  3
Card 2, 4, 5, 7  4
Card 2, 4, 6, 8, 10, 12, 14, 16, 18, 20  10
Euler’s Totient Function (7.1).
Let n be a positive integer. The Euler totient function   n  is defined as
  n   Card a gcd  a, n   1 and 1  a  n 
What does this mathematical notation mean in everyday English language?
Well gcd  a, n   1 implies that a and n are relatively prime which means that they have
no factor in common apart from 1. Card a  
gcd  a, n   1 and 1  a  n counts the
number of integers between 1 and n which are relatively prime to n.
Example 1
Find
(a)   6  (b)  10  (c)   5  (d)  11 (e)  17 
Solution
(a) We have
  6   Card a gcd  a, 6   1 and 1  a  6
 Card 1, 5  2
(b) Similarly we have
 10   Card a gcd  a, 10   1 and 1  a  10 
 Card 1, 3, 7, 9  4
(c) Evaluating Euler’s function gives
  5   Card a gcd  a, 5   1 and 1  a  5
 Card 1, 2, 3, 4  4
(d) Using this procedure we have
Chapter 7: Euler’s Generalization of Fermat’s Theorem 2

 11  Card a gcd  a, 11  1 and 1  a  11 


 Card 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  10
(e) Evaluating  17   16 .

A2 Properties of Euler’s Totient Function for primes


What do you notice about your last three results?
Each of the last three values for n have been prime and Euler’s totient function for these
has been 1 less than n. We can write this as a general result.
Proposition (7.2).
If p is prime then   p   p  1 .
Proof.
All the integers 1, 2, 3, 4, … , p  1 with the exception of p are relatively prime to prime p.
Hence

  p   Card a gcd  a, p   1 and 1  a  p 
 Card 1, 2, 3, 4,  , p  1  p  1

Proposition (7.3).
For n  1
  n   n  1  n is prime
How do we prove this result?
Since we have  we have to prove the result both ways.
Proof.
   . Assume   n   n  1 . We have
  n   Card a 
gcd  a, n   1 and 1  a  n  n  1 (*)
All the elements in this set are positive integers less than or equal to n. Reference (*) means
that there are n  1 positive integers which are relatively prime to n. This means that
a  1, 2, 3,  , n  1 and for these a’s
gcd  a, n   1
None of these a  1, 2, 3,  , n  1 have a common factor greater than 1 with n. Hence n
must be prime.
   . Proposition (7.2).

Can we use this as a test for prime?


Not a very practical way of finding if a large number is prime because you are carrying out
trial division.
We also have another proposition concerning primes.
Proposition (7.4).
If p is prime and k is positive integer then
  p k   p k  p k 1
The proof of this is pretty challenging.
Chapter 7: Euler’s Generalization of Fermat’s Theorem 3

Proof.
We know that gcd  a, p k   1 provided prime p does not divide into a.
The only divisors of p k are
S   p, p 2 , p 3 , p 4 , p 5 ,  , p k 1 p
in the first p k integers 1, 2, 3, 4,  , p k  .
This means that the number of divisors into p k is the Cardinality of this set S:
Card S   Card  p, p 2 , p 3 , p 4 , p 5 ,  , p k 1 p  p k 1
Applying the definition of Euler’s totient function (7.1) to p k :
Let n be a positive integer. The Euler totient function   n  is defined as
  n   Card a gcd  a, n   1 and 1  a  n 
We have

  p k   Card a gcd  a, p k   1 and 1  a  p k 
All the integers below p k are relatively prime to p k apart from the ones in the set S.
Hence the number in the set a  gcd  a, p k   1 and 1  a  p k  is exactly
p k  p k 1
This is our required result.

Note that the proof in the book is incorrect. Multiples of p cannot be divisors of p k . For
example 2  7  14 does not divide into 73  343 .

Example 2
Find (a)  134  (b)   510  (c)  121
Solution
In each case we apply the above Proposition (7.4):
  p k   p k  p k 1
(a) Applying this formula with p  13 and k  4 we have
 134   134  1341  134  133  26364
(b) Similarly applying the above formula with p  5 and k  10 :
  510   510  59  7812500
(c) How do we find  121 ?
Note that 121  112 . Hence we have
 121   112   112  111  121  11  110
This means that there are 110 numbers which are relatively prime to 121. Don’t need to
find them.
What are the limitations of this formula   p k   p k  p k 1 ?
Chapter 7: Euler’s Generalization of Fermat’s Theorem 4

You can find Euler’s totient function for prime powers. We would like a formula for   n 
where n is any positive integer greater than 1.
A3 Euler’s Totient Function for n>1
First we state that Euler’s totient function is multiplicative. What does this mean?
A multiplicative function f satisfies:
f  mn   f  m  f  n 
For example if f is the square root function then we have
mn  m n
This means that the square root function is multiplicative. Another example of a
multiplicative function is the determinant of a matrix:
det  AB   det  A  det  B 
However there are many functions which are not multiplicative such as the trigonometric
functions. For example
cos  xy   cos  x  cos  y  [Not Equal]
Another example is the derivative. We have
d du dv
 uv   [Not Equal]
dx dx dx
where u and v are functions of x. [You need to use the product rule for this.]

Proposition (7.5).
Euler’s totient function  is multiplicative which means that
  mn     m    n 
Proof.
See the book by David Burton ‘Elementary Number Theory’ Page 133.
How can we use this result to find  of any positive integer greater than 1?
We use the Fundamental Theorem of Arithmetic which says:
Every positive integer greater than 1 can be written as a product of primes uniquely apart
from the order.
Examples are
5  5, 10  2  5, 24  23  3, 100  22  52 , 
We use this theorem along with  being multiplicative to prove the following result:
Proposition (7.6).
Let n  1 be a positive integer with its prime decomposition as
n  p1k1 p2 k2 p3k3 p4 k4  pr kr
Then   n  is given by
  n    p1k  p1k 1  p2 k  p2 k 1   p3k  p3k 1   p4 k  p4 k 1   pr k  pr k 1 
1 1 2 2 3 3 4 4 r r

This looks like a tedious formula. Unless you have a lot of primes in your n you will find
this straightforward to apply but first we must prove this. How?
Applying the Fundamental Theorem of Arithmetic and the above Proposition (7.5).
Proof.
We are given that n  p1k1 p2 k2 p3k3 p4 k4  pr kr so we have
  n     p1k p2 k p3k p4 k  pr k
1 2 3 4 r

Applying the above proposition (7.5):
Chapter 7: Euler’s Generalization of Fermat’s Theorem 5

Euler’s totient function  is multiplicative which means that


  mn     m    n 
 
to   n    p1k1 p2 k2 p3k3 p4 k4  pr kr gives
 n    p p p p  p 
1
k1
2
k2
3
k3
4
k4
r
kr

   p    p    p    p 
1
k1
2
k2
3
k3
r
kr

How do we find   p1k1  ?


Apply Proposition (7.4) which claims:
If p is prime and k is positive integer then
  p k   p k  p k 1
Therefore we have
  p1k1    p2 k2   pr kr    p1k1  p1k1 1  p2 k2  p2 k2 1   pr kr  pr kr 1 
This completes our proof.

There is a slightly easier way to write this result.
Proposition (7.7).
The above result for n  p1k1 p2 k2 p3k3 p4 k4  pr kr can be written as
 1  1   1 
  n   n 1   1   1  
 p1   p2   pr 
Proof.
Exercise for the student.
It is much easier if we use this result (7.7) to find   n  rather than (7.6).

Example 3
Find (a)  100  (b)  101 (c)  144  (d)   2010 
Solution
In each case we apply the above Proposition (7.7).
(a) We first decompose 100 into its primes:
100  102   2  5   2252
2

Applying Proposition (7.7) with p1  2, p2  5 and n  100 :


 1  1 
 100   100  1   1  
2
 5
 
 1  4 
 100      40
 2  5 
What does this answer of 40 mean?
There are 40 positive integers which are relatively prime to 100. Again we do not need to
locate them.
(b) 101 is a prime number. How do we find Euler’s totient function of this?
Use Proposition (7.2) which says:
If p is prime then   p   p  1
Chapter 7: Euler’s Generalization of Fermat’s Theorem 6

Hence  101  101  1  100 . This means there are 100 positive integers which are
relatively prime to 101. The answer is much larger than the 40 positive integers which are
relatively prime to 100. See graph at the bottom of this page.
(c) Similarly writing the prime decomposition of 144 gives
144  122   223  2432
2

Applying Proposition (7.7) with p1  2, p2  3 and n  144 :


 1  1 
 144   144  1   1  
  2 3
 1  2 
 144      48
 2  3 
(d) What is the prime decomposition of 2010?
2010  20110
  67  3   5  2   2  3 5  67 
Hence applying Proposition (7.7) to this we have
 1  1  1  1 
  2010   2010 1   1   1   1  
 2   3   5   67 
 1   2   4   66 
 2010          528
 2   3   5   67 

The graph below is from the following url:


http://mathworld.wolfram.com/TotientFunction.html
Shows   n  against n. Note that this is not a continuous function because   n  can only
1
be evaluated for positive integers greater than 1. You cannot find    ,    ,   e  etc.
2

Fig 1
As n gets larger we might have expected   n  to get larger as well. This is clearly false as
you can see from the graph. An example of this is   59   58 but   60   16 .
You might have noticed that all your results in Example 3 are even numbers. This is no
coincidence but we have the following general result:
Chapter 7: Euler’s Generalization of Fermat’s Theorem 7

Proposition (7.8). For n  2 ,   n  is an even integer.


Proof.
By Proposition (7.7):
 1  1   1 
  n   n 1   1   1  
 p1   p2   pr 
Let the prime decomposition of n be written as n  p1k1 p2 k2 p3k3 p4 k4  pr kr . Then
 1  1   1 
  n   n 1    1   1  
 p1   p2   pr 
 1  1   1 
 p1k1 p2 k2  pr kr 1   1   1  
 p1   p2   pr 
 p 1   p 1   p 1 
 p1k1  1  p2 k2  2  pr kr  r 
 p1   p2   pr 
 p1k1 1  p1  1 p2 k2 1  p2  1 pr kr  pr  1
If the only prime in n is p1  2 then we have   n   2k1 1  2  1 which is even because of
2k1 1 .
If we have any distinct primes from 2 in n then
  n   p1k1 1  p1  1 p2 k2 1  p2  1 pr kr  pr  1
is even because one of the primes must be odd and an odd number take away 1 gives you
an even number.
In either case we have our required result.

Attempt Problems 7.2 on page 135.


Questions 1-5, 7-8, 10 and 13
SUMMARY
Euler’s totient function   n  for a positive integer n  1 is defined as
  n   Card a gcd  a, n   1 and 1  a  n 
We can find   n  by using the following formula:
 1  1   1 
  n   n 1   1   1  
 p1   p2   pr 

You might also like