Professional Documents
Culture Documents
Activity:
We can verify that 25 13 (mod 6). Now:
1) Add the same integer to both sides of the congruence (mod 6). Does congruence
(mod 6) still apply? You can write your answer below.
2) Subtract the same integer from both sides of the congruence (mod 6). Does
congruence (mod 6) still apply? You can write your answer below.
3) Multiply the same integer to both sides of the congruence (mod 6). Does
congruence (mod 6) still apply? You can write your answer below.
Theorem. If a, b, c, and n are integers with n > 1, such that a b (mod n), then:
a) a + c b + c (mod n)
b) a – c b – c (mod n)
c) a c b c (mod n)
Proof. The proof of (a) will be shown here. The proofs of (b) and (c) will be left as an
exercise.
Theorem. If ac bc (mod n), and c and n are relatively prime, then a b (mod n).
Proof. Since ac bc (mod n), then n|(ac – bc). Equivalently n|c(a – b). But since n
and c are relatively prime (i.e., they do not share a common divisor), then n must
divide (a – b). This implies that a b (mod n).
c d (mod 4).
1) Add c to the left side, and d to the right side of the equation below. Does
congruence (mod 4) still apply? You can write your answer below.
Theorem. If a, b, c, d and n are integers with n > 1, such that a b (mod n) and c
d (mod n), then:
a) a + c b + d (mod n)
b) a – c b – d (mod n)
c) a c b d (mod n)
Proof. We will prove (a). The proofs of the others are left as exercises.
It is given that a b (mod n) and c d (mod n). Therefore, there exist integers r and s
such that (a – b) = nr and (c – d) = ns.
Now, consider (a + c) – (b + d). Is this divisible by n also? We will find out.
Observe that (a + c) – (b + d) = (a – b) + (c – d). [if we simplify, these are the same]
= nr + ns = n(r + s)
Fast Exponentiation
Theorem. If a, b, k, and n are integers with k > 0 and m > 1, such that a b (mod
n), then
ak bk (mod n).
Proof. It is given that a b (mod n), which means that n|(a – b). We need to
prove that n|(ak – bk).
If we factor ak – bk, we will get:
ak – bk = (a – b)(ak – 1 + ak – 2b + … + abk – 2 + bk – 1)
Thus, (a – b) is a divisor of ak – bk, or (a – b)|(ak – bk). Together with the fact
that n|(a – b), then n|(ak – bk).
Example. Compute the least positive residues of 2, 22, 24, 28, 216, … 2512
(mod 645) by applying the previous theorem (i.e., square both sides of the
congruence repeatedly).
Solution. Since we are dealing with mod 645, then the least positive residues
can be any integer from 0 to 644.
[raising to a power]
If a, b, k, and n are integers with k > 0 and m > 1, such that a b (mod n), then
ak bk (mod n).
Problem Set
1. Prove: If a is an even integer, then a2 0 (mod 4). Hint: Start with defining a
= 2k where k is an integer.
2. Prove: If a is an odd integer, then a2 1 (mod 4).
3. Prove: If a is an odd integer, then a2 1 (mod 8). Hint: This is similar to the
previous problem. You would need an additional step here, where you will use
the fact that if there are 2 consecutive integers such as k and k + 1, then one
of them must be odd and one must be even.
4. Prove: If a, b, c, d and n are integers with n > 1, such that a b (mod n) and c d
(mod n), then a – c b – d (mod n).
Answer key:
6) 3, 9, 81, 291, 245, 251, 301, 313, 157, 405
7) 67 8) 21 9) 625 10) All answers from (a) to (d) are
the same… Then use letters/variables to try to generalize into a conjecture;
11) You should notice something similar in your answers in (a) to (d). Then
use letters/variables to try to generalize into a conjecture.