17 - Divisibility
Divisibility and Common Divisors
The division algorithm
!Screenshot 2023-10-18 at 12.43.02 AM.png
GCD
!Screenshot 2023-10-18 at 12.44.08 AM.png
In class practice
Def: A common divisor of two integers
GCD switching theorem
GCD(39, 57) = ?
57 = 1(39) + 18
39 = 2(18) + 3
18 = 6(3) + 0
Once you get to zero, the last remainder is the GCD
So the GCD is 3
17.1g
n = -256, d = 25
-256 = -11(25) + 19
GCD(1855, 2345)
2345 = 1(1855) + 490
1855 = 3(490) + 385
490 = 1(385) + 105
385 = 3(105) + 70
105 = 1(70) + 35
70 = 2(35) + 0
GCD = 35
Theorem 17.13. Fix
Sketch. Base case:
Inductive step.
Let
Assume that
HW 17
Ben Finch
E 17.1
(a) q=3, r=2
(b) q=-3, r=3
(c) q=-4, r=3
(d) q=4, r=3
(e) q=10, r=6.
(f) q=-10, r=6
(g) q=-11, r=19
(h) q=11, r=19
E 17.2
a)
Proof.
Let
Fix
By the division algorithm,
b)
Proof.
Let
Assume by way of contradiction that
Herein lies our contradiction. Thus
E 17.3
Divisors of 60: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
Divisors of 42: 1, 2, 3, 6, 7, 14, 21, 42
Common divisors: 1, 2, 3, 6
GCD: 6
E 17.4
a) GCD(60, 42)
60 = 1(42) + 18
42 = 2(18) + 6
18 = 6(3) + 0
GCD = 6
b) GCD(667,851)
851 = 1(667) + 184
667 = 3(184) + 115
184 = 1(115) + 69
115 = 1(69) + 46
69 = 1(46) + 23
46 = 2(23) + 0
GCD = 23
c) GCD(1855, 2345)
2345 = 1(1855) + 490
1855 = 3(490) + 385
490 = 1(385) + 105
385 = 3(105) + 70
105 = 1(70) + 35
70 = 2(35) + 0
GCD = 35
d) GCD(589, 437)
589 = 1(437) + 152
437 = 2(152) + 128
152 = 1(128) + 24
128 = 5(24) + 8
24 = 3(8) + 0
GCD = 8
E 17.5
Proof.
Let
Base Cases:
n = 1, GCD(
n = 2, GCD(
n =3, GCD(
Inductive Step:
Assume that for
We aim to show that GCD(
By the definition of Fibonacci numbers:
By the GCD-Switching Theorem:
GCD(a, b) = GCD(b, c) if
Hence by mathematical induction
E 17.6
Proof.
Let
Thus the GCD is 1.
E 17.7
Proof.
Let
Thus the GCD is 2.
E 17.8
(a) Proof. Suppose
If
(b) Suppose
Thus, we have proved the Division Algorithm for all integers