Professional Documents
Culture Documents
Chapter 7 Section A
Chapter 7 Section A
Chapter 7 Section A
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
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).
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 1341 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
p p p p
1
k1
2
k2
3
k3
r
kr
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
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
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