Notes-on-Number-Theory
Notes-on-Number-Theory
DIVISIBILITY a key concept in number theory in which a divides b and write a|b in case b/a is
an integer. Also, a is a divisor and that b is a multiple of a. If a | b is false, we
write, a ∤ b
DIVISION ALGORITHM an effective method for producing such quotient and remainder.
Theorem 3.5: If a,b Z, with b > 0, then there exist a unique q, r Z with
a = qb + r, 0 r b
Solution:
Note that a = 23 and b = 8
Performing long division,
23/8 = quotient (q) = 2 and remainder ® = 7
Thus we have, q = 2 and r = 7
a = qb + r 2(8) + 7; 0 7 8
A positive integer e is said to be a common divisor of a and b if e|a and e|b. The greatest common
divisor of a and b is the positive integer d denoted by d satisfying (i) d | a and d | b, and (ii) if e|a and
e|b, then if e d
Example 2: Determine the common divisors and the greatest common divisors of 24 and 18
Solution:
The common divisors of 24 and 18 are 1, 2, 3, and 6
The greatest common divisor is 6
Theorem 3.8: (Euclidean Algorithm) If a, b Z+, we apply the division algorithm as follows:
a = q1b + r1 ; 0 < r1 < b
b = q2r1 + r2 ; 0 < r2 < r2
r1 = q3r2 + r3 ; 0 < r3 < r2
: : ; : :
rk-2 = qkrk-1 + rk ; 0 < rk < rk – 1
rk-1 = qk+1 rk ;
Then the last nonzero remainder rk is the greatest common divisor of a and b or gcd(a,b) = rk
NUMBER THEORY 1
DISCRETE MATHEMATICS
Solution:
Let a = 372 and b = 132, then apply the Euclidean algorithm
373 = 2(132) + 108
132 = 1(108) + 24
108 = 4(24) + 12
24 = 2(12) + 0
PRIME NUMBERS
If p Z and p > 1, we say that p is prime if and only positive divisor of p are only 1 and itself.
Solution:
a. Let n = 31. To find the prime factors of n, extract the √31
The resulting value is less than 6, so the prime we need to test are 2, 3, 5. None of these divides
31, so 31 is a prime number
b. Let n= 57, the resulting prime numbers less than √57 are 2, 3, 5, 7. Note that 3|57, thus 57 is a
composite number
NUMBER THEORY 2
DISCRETE MATHEMATICS
b. (108, 87)
108 = 1(87) + 21
87 = 4(21) + 3
21 = 7(3) + 0
The gcd of (108, 87) is 3 = d, since gcd is not equal to 1, 108 and 87 are not relatively prime
Solution:
a. Compute for the greatest common divisor of (37, 13)
37 = 2(13) + 11
13 = 1(11) + 2
11 = 5(2) + 1
2 = 2(1)
The gcd of (37, 13) = 1 = d shows that 37 and 13 are relatively prime. This also confirms that there
exist integers x and y
1 = 11 – 5(2)
= 11 – 5[13 – 1(11)]
= 11 – 5(13) + 5(11)
= 6(11) – 5(13)
= 6[37 – 2(13)] – 5(13)
= 6(37) – 12(13) – 5(13)
= 6(37) – 17(13)
Note: If the gcd is 1, then lcm is simply the product of the numbers
Example 7. Find the least common multiple of each of the following sets of numbers
a. [12, 18]
12 = 4 . 3 = 2 . 2 . 3 = 22 . 3
18 = 6 . 3 = 2 . 3 . 3 = 2 . 32
Lcm = 22 . 32 = 4 . 9 = 36
NUMBER THEORY 3
DISCRETE MATHEMATICS
b. [90, 108]
90 = 10 . 9 = 2 . 5 . 3 . 3 = 2 . 32 . 5
108 = 12 . 9 = 4 . 3 . 3 . 3 = 2 . 2 . 3 . 3 . 3 = 22 . 33
Lcm = 22 . 33 . 5
b. 7
Since 7 is a prime, thus 𝜑(7) = 7 – 1 = 6. The numbers 1, 2, 3, 4, 5 and 6; observe that they are
relatively prime with 7
c. 21
Obtain the factors of n = 21 = 3(7)
Both 3 and 7 is a prime number, apply 𝜑(𝑛) = (𝑝 − 1)(𝑞 − 1). Let p = 3 and q = 7
𝜑(21) = (3 − 1)(7 − 1) = (2)(6) = 12
d. 70
Represent 70 = (7)(10) = mn
Since 10 and 7 is relatively prime or (10,7) = 1
Applying 𝜑(𝑚𝑛) = 𝜑(𝑚)𝜑(𝑛); we have [(10),(7)] = (4)(6) = 24
Thus (70) = 24
NUMBER THEORY 4
DISCRETE MATHEMATICS
A Diophantine Equation is an equation involving a number of variables all of whose coefficients are
integers and to which we seek solutions which are integers. A linear Diophantine equation (in two
variables) is an equation of the form ax + by = c where a, b, and c are integers
After obtaining d = 1, we will test if the solutions exist if d|c. since 1|208, then solutions exist. Now we
will determine the values of x0 and y0 such that 19x0 + 7y0 = 1. We need to apply the reverse Euclidean
algorithm
1 = 5 – 2(2)
= 5 – 2[7 – 1(5)]
= 5 – 2(7) + 2(5)
= 3(5) – 2(7)
= 3[19 – 2(7)] – 2(7)
= 3(19) – 6(7) – 2(7)
= 3(19) – 8(7)
Thus, x0 = 3 and y0 = 7
MODULAR ARITHMETIC
a. 2 5 (mod 3)
Since 3 | (5 – 2), 2 5 (mod 3)
b. 2 7 (mod 3)
Since 3 ∤ (7 – 2), 2 ≢ 7 (mod 3)
NUMBER THEORY 5
DISCRETE MATHEMATICS
a. 11 (mod 8)
The least residue of 11 (mod 8) is 3
b. 4 (mod 9)
The least residue of 4 (mod 9) is 4
Solution:
NUMBER THEORY 6