Example 14.
The residue classes modulo 6 are
[0]
,
[1]
,
[2]
,
[3]
,
[4]
,
[5]
.
Of these, the only ones that are units are [1] and [5], so
ϕ
(6) = 2.
Example 15.
Proceeding as in the last example, you can start making a table
of values of the function
ϕ
:
m
ϕ
(
m
)
1
1
2
1
3
2
4
2
5
4
6
2
7
6
8
4
9
6
10
4
11
10
12
4
13
12
14
6
15
8
.
.
.
.
.
.
On of our ﬁrst problems will be ﬁguring out how to compute
ϕ
(
m
) eFciently,
without resorting to listing all of the residue classes modulo
m
, and deciding (by
computing gcds) which ones are units (there’s nothing wrong with the method,
except that it’s much more time consuming than necessary).
In order to motivate this problem, and to see why we might want to be able
to compute
ϕ
(
m
), here is a theorem due to Euler. Notice that this theorem is
a direct generalization of Theorem 2.6, since
ϕ
(
p
) =
p

1 if
p
is prime.
Theorem 3.1.
Let
m >
0
be an integer, and let
a
be a unit modulo
m
(i.e.,
suppose that
gcd(
a, m
) = 1
). Then
a
ϕ
(
m
)
≡
1 (mod
m
)
.
Proof sketch.
The proof of this is almost exactly the same as the proof of The
orem 2.6. We let
b
1
, ..., b
ϕ
(
m
)
be a list of integers representing the
ϕ
(
m
) di±erent residue classes of units
modulo
m
(so, let
b
i
∈
Z
be coprime for each 1
≤
i
≤
ϕ
(
m
), and suppose that
b
i
±≡
b
j
(mod
m
), unless
i
=
j
). Then show that the integers
ab
1
, ....
, ab
ϕ
(
m
)
23