background image

Number Theory. Tutorial 3:

Euler’s function and Euler’s Theorem

1

Euler’s

φ-function

Definition 1. Let n be a positive integer. The number of positive integers
less than or equal to n that are relatively prime to n, is denoted by φ
(n).
This function is called Euler’s φ-function or Euler’s totient function.

Let us denote

Z

n

{012, . . . , n−1and by Z

n

the set of those nonzero

numbers from Z

n

that are relatively prime to n. Then φ(n) is the number of

elements of Z

n

, i.e., φ(n) = |Z

n

|.

Example 1. Let n = 20. Then Z

20

{137911131719} and φ(20) = 8.

Lemma 1. If n p

k

, where p is prime, then φ(n) = p

k

−p

k−1

p

k



1
p



.

Proof. It is easy to list all integers that are less than or equal to p

k

and

not relatively prime to p

k

. They are p, 2p, 3p, . . . , p

k−1

· p. We have exactly

p

k−1

of them. Therefore p

k

− p

k−1

nonzero integers from Z

n

will be relatively

prime to n. Hence φ(n) = p

k

− p

k−1

.

An important consequence of the Chinese remainder theorem is that the

function φ(n) is multiplicative in the following sense:

Theorem 1. Let m and n be any two relatively prime positive integers. Then

φ(mn) = φ(m)φ(n).

Proof. Let Z

m

{r

1

, r

2

, . . . , r

φ(m)

and Z

n

{s

1

, s

2

, . . . , s

φ(n)

}. By the

Chinese remainder theorem there exists a unique positive integer N

ij

such

that 0 ≤ N

ij

< mn and

r

i

N

ij

(mod m),

s

j

N

ij

(mod n),

1

background image

that is N

ij

has remainder r

i

on dividing by m, and remainder s

j

on dividing

by n, in particular for some integers and b

N

ij

am r

i

,

N

ij

bn s

j

.

(1)

As in Tutorial 2, in the proof of the Euclidean algorithm, we notice that
gcd (N

ij

, m) = gcd (m, r

i

) = 1 and gcd (N

ij

, n) = gcd (n, s

j

) = 1, that is N

ij

is relatively prime to and also relatively prime to n. Since and are
relatively prime, N

ij

is relatively prime to mn, hence N

ij

∈ Z

mn

. Clearly,

different pairs (i, j6= (k, l) yield different numbers, that is N

ij

6N

kl

for

(i, j6= (k, l).

Suppose now that a number N 6N

ij

for all and j. Then

(mod m),

(mod n),

where either does not belong to Z

m

or does not belong to Z

n

. Assuming

the former, we get gcd (r, m1. But then gcd (N, m) = gcd (m, r1 and
does not belong to Z

mn

. It shows that the numbers N

ij

and only they

form Z

mn

. But there are exactly φ(m)φ(n) of the numbers N

ij

, exactly as

many as the pairs (r

i

, s

j

). Therefore φ(mn) = φ(m)φ(n).

Theorem 2. Let n be a positive integer with the prime factorisation

p

α

1

1

p

α

2

2

. . . p

α

r

r

,

where p

i

are distinct primes and α

i

are positive integers. Then

φ(n) = n



1

p

1

 

1

p

2



. . .



1

p

r



.

Proof. We use Lemma 1 and Theorem 1 to compute φ(n):

φ(n) = φ (p

α

1

1

φ (p

α

2

2

. . . φ (p

α

r

r

)

p

α

1

1



1

p

1



p

α

2

2



1

p

2



. . . p

α

r

r



1

p

r



n



1

p

1

 

1

p

2



. . .



1

p

r



.

Example 2. φ(264) = φ(2

3

· · 11) = 264

1

2



2

3



10

11



= 80.

2

background image

2

Congruences. Euler’s Theorem

If and are intgers we write a ≡ b (mod m) and say that is congruent

to if and have the same remainder on dividing by m. For example,
41 ≡ 80 (mod 1)3, 41 ≡ −37 (mod 1)3, 41 6≡ 7 (mod 1)3.

Lemma 2. Let a and b be two integers and m is a positive integer. Then

(a) a ≡ b (mod mif and only if a − b is divisible by m;

(b) If a ≡ b (mod mand c ≡ d (mod m), then a c ≡ b (mod m);
(c) If a ≡ b 
(mod mand c ≡ d (mod m), then ac ≡ bd (mod m);
(d) If a ≡ b 
(mod mand n is a positive integer, then a

n

≡ b

n

(mod m);

(e) If ac ≡ bc (mod mand c is relatively prime to m, then a ≡ b (mod m).

Proof. (a) By the division algorithm

q

1

r

1

≤ r

1

< m, and q

2

r

2

≤ r

2

< m.

Thus a − b = (q

1

− q

2

)+ (r

1

− r

2

), where −m < r

1

− r

2

< m. We see that

a − b is divisible by if and only if r

1

− r

2

is divisible by but this can

happen if and only if r

1

− r

2

= 0, i.e., r

1

r

2

.

(b) is an exercise.
(c) If a ≡ b (mod m) and c ≡ d (mod m), then m|(a − b) and m|(c − d),

i.e., a − b im and c − d jm for some integers i, j. Then

ac −bd = (ac−bc) + (bc−bd) = (a−b)b(c −d) = icmjbm = (icjb)m,

whence ac ≡ bd (mod m);

(d) Follows immediately from (c)
(e) Suppose that ac ≡ bc (mod m) and gcd (c, m) = 1. Then there exist

integers u, v such that cu mv = 1 or cu ≡ 1 (mod m). Then by (c)

a ≡ acu ≡ bcu ≡ b (mod m).

and a ≡ b (mod m) as required.

The property in Lemma 2 (e) is called the cancellation property.

Theorem 3 (Fermat’s Little Theorem). Let p be a prime. If an integer
a is not divisible by p, then a

p−1

≡ 1 (mod p). Also a

p

≡ a (mod pfor all a.

3

background image

Proof. Let a, be relatively prime to p. Consider the numbers a, 2a, ...,
(p − 1)a. All of them have different remainders on dividing by p. Indeed,

suppose that for some 1 ≤ i < j ≤ p−1 we have ia ≡ ja (mod p). Then

by the cancellation property can be cancelled and i ≡ j (mod p), which is

impossible. Therefore these remainders are 1, 2, ..., p − 1 and

a · 2a · · · · · (p − 1)a ≡ (p − 1)! (mod p),

which is

(p − 1)! · a

p−1

≡ (p − 1)! (mod p).

Since (p − 1)! is relatively prime to p, by the cancellation property a

p−1

1 (mod p). When is relatively prime to p, the last statement follows from
the first one. If is a multiple of the last statement is also clear.

Theorem 4 (Euler’s Theorem). ) Let n be a positive integer. Then

a

φ(n)

≡ 1 (mod n)

for all a relatively prime to n.

Proof. Let Z

n

{z

1

, z

2

, . . . , z

φ(n)

}. Consider the numbers z

1

az

2

a, ..., z

φ(n)

a.

Both z

i

and are relatively prime to n, therefore z

i

is also relatively prime

to n. Suppose that r

i

z

i

(mod n), i.e., r

i

is the remainder on dividing

z

i

by n. Since gcd (z

i

a, n) = gcd (r

i

, n), yielding r

i

∈ Z

n

. These remainders

are all different. Indeed, suppose that r

i

r

j

for some 1 ≤ i < j ≤ n.

Then z

i

a ≡ z

j

(mod n). By the cancellation property can be cancelled

and we get z

i

≡ z

j

(mod n), which is impossible. Therefore the remainders

r

1

, r

2

, ..., r

φ(n)

coincide with z

1

, z

2

, . . . , z

φ(n)

, apart from the order in which

they are listed. Thus

z

1

a · z

2

a · . . . · z

φ(n)

a ≡ r

1

· r

2

· . . . · r

φ(n)

≡ z

1

· z

2

· . . . · z

φ(n)

(mod n),

which is

Z · a

φ(n)

≡ Z (mod n),

where z

1

·z

2

·. . .·z

φ(n)

. Since is relatively prime to it can be cancelled

and we get a

φ(n)

≡ 1 (mod n).

Copyright: MathOlymp.com Ltd 2001. All rights reserved.

4