0% found this document useful (0 votes)
2 views10 pages

eulers totient function

The document explains how to find the greatest common divisor (GCD) of two numbers using the Euclidean algorithm, which involves repeated division and replacement until the remainder is zero. It also describes an alternative method using prime factorization to determine the GCD. Additionally, it defines composite numbers and contrasts them with prime numbers, emphasizing that composite numbers have more than two divisors.

Uploaded by

Sairam Nemmoju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views10 pages

eulers totient function

The document explains how to find the greatest common divisor (GCD) of two numbers using the Euclidean algorithm, which involves repeated division and replacement until the remainder is zero. It also describes an alternative method using prime factorization to determine the GCD. Additionally, it defines composite numbers and contrasts them with prime numbers, emphasizing that composite numbers have more than two divisors.

Uploaded by

Sairam Nemmoju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

To find the greatest common divisor (GCD) of two numbers, you can use several methods, but

the most efficient one is the Euclidean algorithm. Here's how you can do it step by step:

Steps for the Euclidean Algorithm:

1. Start with two numbers: Let’s say the two numbers are aa and bb, where a≥ba \geq b.

2. Divide aa by bb: Find the remainder when aa is divided by bb, which we will call rr.
a=b×q+ra = b \times q + r where qq is the quotient and rr is the remainder. This means
r=amod br = a \mod b.

3. Replace aa with bb and bb with rr: Now, set a=ba = b and b=rb = r.

4. Repeat the process until r=0r = 0. When the remainder is zero, the divisor (the last non-
zero remainder) will be the GCD of the original two numbers.

Example:

Let’s find the GCD of 48 and 18.

1. Start with a=48a = 48 and b=18b = 18.

2. Divide 48 by 18: 48÷18=2(quotient)and48−(18×2)=48−36=12(remainder).48 \div 18 = 2


\quad \text{(quotient)} \quad \text{and} \quad 48 - (18 \times 2) = 48 - 36 = 12 \quad
\text{(remainder)}. So, the remainder is 12.

3. Replace aa with 18 and bb with 12: Now, a=18a = 18 and b=12b = 12.

4. Divide 18 by 12: 18÷12=1(quotient)and18−(12×1)=18−12=6(remainder).18 \div 12 = 1


\quad \text{(quotient)} \quad \text{and} \quad 18 - (12 \times 1) = 18 - 12 = 6 \quad
\text{(remainder)}.

5. Replace aa with 12 and bb with 6: Now, a=12a = 12 and b=6b = 6.

6. Divide 12 by 6: 12÷6=2(quotient)and12−(6×2)=12−12=0(remainder).12 \div 6 = 2 \quad


\text{(quotient)} \quad \text{and} \quad 12 - (6 \times 2) = 12 - 12 = 0 \quad
\text{(remainder)}.

7. The remainder is now 0, so the GCD of 48 and 18 is 6.

Alternative Method: Prime Factorization

You can also find the GCD by finding the prime factorization of both numbers, and then taking
the product of the lowest powers of all common prime factors.

For example, to find the GCD of 48 and 18:


• Prime factorization of 48: 48=24×348 = 2^4 \times 3

• Prime factorization of 18: 18=2×3218 = 2 \times 3^2

The common prime factors are 2 and 3, and the lowest powers are 212^1 and 313^1. Therefore,
the GCD is:

21×31=62^1 \times 3^1 = 6

Conclusion:

Using the Euclidean algorithm is usually the quickest method, especially for larger numbers. The
GCD of two numbers is the largest number that divides both of them without leaving a
remainder.

Composite numbers are positive integers greater than 1 that have more than two distinct
positive divisors. In other words, a composite number can be divided evenly by numbers other
than 1 and itself.

Examples of Composite Numbers:

• 4 (divisors: 1, 2, 4)

• 6 (divisors: 1, 2, 3, 6)

• 8 (divisors: 1, 2, 4, 8)

• 9 (divisors: 1, 3, 9)

• 12 (divisors: 1, 2, 3, 4, 6, 12)

Key Characteristics:

• More than two divisors: A composite number has at least one divisor other than 1 and
itself.

• Not prime: Every composite number is not prime, because a prime number has exactly
two distinct positive divisors: 1 and itself.

Contrast with Prime Numbers:

• Prime numbers: Have exactly two distinct positive divisors: 1 and the number itself.
Example: 2, 3, 5, 7, 11.

• Composite numbers: Have more than two divisors. Example: 4, 6, 8, 9, 10.

1 is not a composite number. It is neither prime nor composite because it only has one divisor
(itself).

You might also like