Let
![[Graphics:Images/index_gr_1.gif]](Images/index_gr_1.gif)
be the number of positive integers less than or equal to n which don't have any common factors with n.
Example: If n = 15, then the positive integers less than or equal to n which don't have any common factors with n are 1, 2, 4, 7, 8, 11, 13, 14. So
![[Graphics:Images/index_gr_2.gif]](Images/index_gr_2.gif)
In the RSA system n = p q, so
![[Graphics:Images/index_gr_3.gif]](Images/index_gr_3.gif)
is the number of positive integers less than or equal to n which don't have p or q as a factor.
How many positive integers less than or equal to n do have p as a factor?
p, 2 p, 3 p, ..., n = q p
so there are q of them.
Similarly, there are p positive integers less than or equal to n with q as a factor.
Only one positive integer less than or equal to n has both p and q as factors, namely n = p q. So we should only count this once.
Therefore,
![[Graphics:Images/index_gr_4.gif]](Images/index_gr_4.gif)
This is private! You can't calculate it without knowing p and q.
Euler's Theorem: if x is an integer which has no common prime factors with n, then
![[Graphics:Images/index_gr_5.gif]](Images/index_gr_5.gif)
(for those who know group theory)
Multiplication modulo n means working in the group , which has
elements. Then Lagrange's Theorem implies that the order of any x divides
; thus
is the identity, which is the same as our theorem.