You are on page 1of 11

Theory of Congruences

Definition
Let n be a fixed positive integer. Two integers a and b are said to be
congruent modulo n, symbolized

a ≡ b(mod n)

if n divides the difference a − b; that is, provided that a − b = kn for


some integer k.

Illustration:

3 ≡ 24(mod 7) since 3 − 24 = (−3)7


−31 ≡ 11(mod 7) since − 31 − 11 = (−6)7
−15 ≡ −64(mod 7) since − 15 − (−64) = 7(7)

Math 106 Number Theory 1 / 11


Given an integer a, let q and r be its quotient and remainder upon
division by n, so that

a = qn + r 0 ≤ r < n.

There are n choices for r, we see that every integer is congruent


modulo n to exactly one of the values 0, 1, 2, · · · , n − 1; in particular,

a ≡ 0(mod n)

if and only if n|a. The set of n integers 0, 1, 2, · · · , n − 1 is called the


set of least nonnegative residues modulo n.

Math 106 Number Theory 2 / 11


Remark:
Any n integers form a complete set of residues modulo n if and only if
no two of the integers are congruent modulo n.

The integers a1 , a2 , · · · , an can be congruent modulo n to


0, 1, 2, · · · , n − 1, in some order. For instance,

−12, −4, 11, 13, 22, 82, 91

constitute a complete set of residues modulo 7; here, we have all


modulo 7

−12 ≡ 2(mod 7) 22 ≡ 1(mod 7)


−4 ≡ 3(mod 7) 82 ≡ 5(mod 7)
11 ≡ 4(mod 7) 91 ≡ 0(mod 7)
13 ≡ 6(mod 7)

Math 106 Number Theory 3 / 11


Theorem
For arbitrary integers a and b, a ≡ b(mod n) if and only if a and b
leave the same nonnegative remainder when divided by n.

Proof: Since a ≡ b(mod n), so a = b + kn for some integer k. By


Division Algorithm, b = qn + r, where 0 ≤ r < n. Thus,

a = b + kn = (qn + r) + kn
= (q + k)n + r

which indicates that a has the same remainder as b. That is,


0 0
a = nk + r where k = q + k.
Conversely, suppose

a = q1 n + r and
b = q2 n + r.

with 0 ≤ r < n Then a − b = (q1 n + r) − (q2 n + r) = (q1 − q2 )n. It


follows that n|(a − b). Therefore, a ≡ b(mod n).
Math 106 Number Theory 4 / 11
Theorem
Let n > 1 be fixed and a, b, c, d be arbitrary integers. Then the
following properties hold:

(a) a ≡ a(mod n).


(b) If a ≡ b(mod n), then b ≡ a(mod n).
(c) If a ≡ b(mod n) and b ≡ c(mod n), then
a ≡ c(mod n).
(d) If a ≡ b(mod n) and c ≡ d(mod n), then
a + c ≡ (b + d)(mod n) and ac ≡ bd(mod n).
(e) If a ≡ b(mod n), then a + c ≡ (b + c)(mod n) and
ac ≡ bc(mod n).
(f) If a ≡ b(mod n), then ak ≡ bk (mod n) for any positive
integer k.

Math 106 Number Theory 5 / 11


Theorem
 n
If ca ≡ cb(mod n), then a ≡ b mod , where d = gcd(c, n).
d
Proof: Since ca ≡ cb(mod n),

c(a − b) = ca − cb = kn

for some integer k. Since gcd(c, n) = d, there exist relatively prime


integers r and s satisfying c = dr, n = ds. So,

dr(a − b) = k(ds)
r(a − b) = ks

Hence, s|r(a − b). Since gcd(c, n) = d, this implies that


gcd( dc , nd ) = gcd(r, s) = 1. By Euclid’s lemma, s|a − b. It follows that
a ≡ b(mod s); in other words, a ≡ b(mod nd ).

Math 106 Number Theory 6 / 11


Corollary
If ca ≡ cb(mod n) and gcd(c, n) = 1, then a ≡ b(mod n).

Corollary
If ca ≡ cb(mod p) and p6 | c, where p is a prime number, then
a ≡ b(mod p).

Math 106 Number Theory 7 / 11


Find the remainders when 250 and 4165 are divided by 7.

Solution:

Math 106 Number Theory 8 / 11


What is the remainder when the following sum is divided by 4?

15 + 25 + 35 + · · · + 995 + 1005

Math 106 Number Theory 9 / 11


Prove that the integer 53103 + 10353 is divisible by 39.

Prove that the integer 111333 + 333111 is divisible by 7.

Math 106 Number Theory 10 / 11


For n ≥ 1, use congruence theory to establish each of the following
divisibility statements:
(a) 7 | 52n + 3(25n−2 )
(b) 13 | 3n+2 + 42n+1
(c) 43 | 6n+2 + 72n+1
(d) 27 | 25n+1 + 5n+2

Math 106 Number Theory 11 / 11

You might also like