# Lecture11 - Lecture 11: Phi function, Euler's formula,...

This preview shows pages 1–3. Sign up to view the full content.

Lecture 11: Phi function, Euler's formula, Probabilistic Primality Testing Euler Phi Function First, let’s define the Euler φ (phi) function: φ (n) = the number of integers in the set {1, 2, . .., n-1} that are relatively prime to n. φ (p) = p –1 , for all prime numbers φ (pq) = (p-1)(q-1), where p and q are distinct primes. Here is a derivation of that result: We want to count all values in the set {1, 2, 3, . .., pq –1} that are relatively prime to pq. Instead, we could count all value in the set NOT relatively prime to pq. We can list these values: p, 2p, 3p, . .. , (q-1)p q, 2q, 3q, . .. (p-1)q Note that each of these values are distinct. To notice this, see that no number of the first row is divisible by q and no number on the second row is divisible by p. This ensures that there are no repeats on both rows. since p and q are relatively prime, in order for q to be a factor of a number on the first row, it would have to divide evenly into either 1, 2, 3, . .. q- 1. But clearly, it does not. The same argument will show that none of the values on the second row are divisible by p. Finally, we can count the number of values on this list. It’s (q-1) + (p-1) = p + q – 2. Now, in order to find φ (pq), we must subtract this value from pq –1 . So, we find: φ (pq) = (pq – 1) – (p + q – 2) = pq – p – q +1 = (p – 1)(q – 1). Here is a different proof of the general formula for deriving φ (n) given n’s prime factorization than the one shown in class. It is based upon the same ideas as the one given in class, but does so by proving the actual formula, instead of proving that φ (mn) = φ (m) φ (n), if m and n are relatively prime. As you'll see, all the key steps in that proof are included below in the inductive step. Now, we will look and prove the general formula for φ (n) given n’s prime factorization. Let n = = r i e i i p 1 , where each p i is a distinct prime number. Then, we have that φ (n) = = - - r i e i e i i i p p 1 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
With a little bit of algebra, we can rewrite this as φ (n) = n = - r i i p 1 ) 1 1 ( . There are several ways to prove this. Here is one method: We can use induction on r, the number of distinct prime factors of n. Base case r =1. n = p e . The integers in the range [1, p e – 1] that are NOT relatively prime to n are p, 2p, 3p, . .., p e - p. There are p e-1 – 1 of these. Thus, we find that φ (n) = (p e – 1) – (p e-1 – 1) = p e – p e-1 , proving the base case. Inductive hypothesis: Assume for an arbitrary value of r=k where n = = k i e i i p 1 that φ (n) = = - - k i e i e i i i p p 1 1 ) ( Now, under this hypothesis, we must prove for r = k+1 the following: for n’ = + = 1 1 k i e i i p that φ (n’) = + = - - 1 1 1 ) ( k i e i e i i i p p φ (n’) = φ (n* 1 1 + + k e k p ). In order to calculate this value, we could try to count the number of values in the set Z
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 07/14/2011.

### Page1 / 8

Lecture11 - Lecture 11: Phi function, Euler's formula,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online