6.2: GCD, LCM and Prime factorization
( \newcommand{\kernel}{\mathrm{null}\,}\)
We have already discussed GCD and LCM in Chapter 4. This section will explore another method for finding GCD and LCM using prime factorization. In this method, we must first find the given integers' prime factorization.
Example
Determine
Solution
Example
Determine
Solution
Example
Find
Solution
Since
Example
Find
Solution
Since
Another use of Prime factorization is as follows:
Euler's totient function
For
Euler's totient function has numerous applications in number theory, cryptography, and other branches of mathematics. It plays a vital role in RSA encryption, where it is used to compute the encryption and decryption keys.
Determine the value
|
Number of |
||
|
|
|
Set of |
|
1 |
1 |
{1} |
|
2 |
1 |
{1} |
|
3 |
2 |
{1,2} |
|
4 |
2 |
{1,3} |
|
5 |
4 |
{1,2,3,4} |
|
6 |
2 |
{1,5} |
|
7 |
6 |
{1,2,3,4,5,6} |
|
8 |
4 |
{1,3,5,7} |
|
9 |
6 |
{1,2,4,5,7,8} |
|
10 |
4 |
{1,3,7,9} |
|
11 |
10 |
{1,2,3, … ,8,9,10} |
|
12 |
4 |
{1,5,7,11} |
|
13 |
12 |
{1,2,3, … ,10,11,12} |
|
14 |
6 |
{1,3,5,9,11,13} |
|
15 |
8 |
{1,2,4,7,8,11,13,14} |
|
16 |
8 |
{1,3,5,7,9,11,13,15} |
|
17 |
16 |
{1,2,3, … ,14,15,16} |
|
18 |
6 |
{1,5,7,11,13,17} |
|
19 |
18 |
{1,2,3, … ,16,17,18} |
|
20 |
8 |
{1,3,7,9,11,13,17,19} |
|
21 |
12 |
{1,2,4,5,8,10,11,13,16,17,19,20} |
|
22 |
10 |
{1,3,5,7,9,13,15,17,19,21} |
|
23 |
22 |
{1,2,3, … ,20,21,22} |
|
24 |
8 |
{1,5,7,11,13,17,19,23} |
|
25 |
20 |
{1,2,3,4,6,7,8,9,11,12,13,14,16,17,18,19,21,22,23,24} |
|
26 |
12 |
{1,3,5,7,9,11,15,17,19,21,23,25} |
|
27 |
18 |
{1,2,4,5,7,8,10,11,13,14,16,17,19,20,22,23,25,26} |
|
28 |
12 |
{1,3,5,9,11,13,15,17,19,23,25,27} |
|
29 |
28 |
{1,2,3, … ,26,27,28} |
|
30 |
8 |
{1,7,11,13,17,19,23,29} |
The following results will help us find Euler's totient function
Wilson's Theorem
Let
- Proof:
-
Consider the product
. Now, let's pair each number from to with its modular inverse modulo .We know that for every
such that , there exists a unique such that . Moreover, these pairs will be distinct because if and for , then and , implying , which contradicts the distinctness of the pairs.Thus, we can pair each
with such that the product of these pairs is congruent to . Therefore, . Adding to both sides gives , which means is divisible by .
Fermat's Little Theorem
For any prime number
Euler's Theorem
If
1. If
2. If
3. If
4.
Find
Solution
Since


