0% found this document useful (0 votes)
63 views

Number Theory and Graph Theory: by A. Satyanarayana Reddy

The document discusses congruences and their properties. It defines congruence modulo n as two integers a and b being congruent if n divides their difference. Some key properties of congruences are presented, including that congruence is transitive and properties are preserved under addition, multiplication, and powers. Fermat's Little Theorem is also introduced, stating that if p is prime and p does not divide a, then a^p-1 is congruent to 1 modulo p.

Uploaded by

Akansha Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Number Theory and Graph Theory: by A. Satyanarayana Reddy

The document discusses congruences and their properties. It defines congruence modulo n as two integers a and b being congruent if n divides their difference. Some key properties of congruences are presented, including that congruence is transitive and properties are preserved under addition, multiplication, and powers. Fermat's Little Theorem is also introduced, stating that if p is prime and p does not divide a, then a^p-1 is congruent to 1 modulo p.

Uploaded by

Akansha Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1

Number Theory and Graph Theory

Chapter 2

Prime numbers and congruences.

By

A. Satyanarayana Reddy

Department of Mathematics
Shiv Nadar University
Uttar Pradesh, India

E-mail: [email protected]
2

Module-4: Introduction to Congruences

Objectives

• Introduction to Congruence and its properties.

• System of residues.

• Applications of congruences in divisibility.

• Fermat Little Theorem.

Definition 1. Let n be a positive integer and a, b ∈ Z. Then a and b are said to be congruent modulo
n or a is said to be congruent to b modulo n, denoted a ≡ b (mod n), if n divides a − b. That is,
there exists k ∈ Z such that a − b = kn.

• Since 1 divides every integer. So any two integers are congruent modulo 1.

• Two integers are congruent modulo 2 if and only if either both are even or both are odd.

• Let a ∈ Z, n ∈ N. Then, by division algorithm we have a = nq + r, where 0 ≤ r < n. In other


words, a ≡ r (mod n). Since r ∈ {0, 1, 2, . . . , n − 1}, every integer is congruent to exactly
one of the element from the set {0, 1, 2, . . . , n − 1}. This set is called the set of least residues
modulo n.

• Fix a positive integer m and let b1 , b2 , . . . , bm be any collection of m integers that are congruent
to 0, 1, 2, . . . , m − 1 is some order. Then, the set {b1 , b2 , . . . , bm } is called a complete system
of residues modulo m. It is easy to see that set of least residues is also a complete system of
residues. And the set of complete system of residues is not unique. In fact, it is easy to see
that any set of m integers is complete system of residues if and only if no two of them are
congruent modulo m.
3

Theorem 2. Let m > 1 be a fixed positive integer and let a, b, c ∈ Z. Then, the following hold:

1. a ≡ a (mod m).

2. If a ≡ b (mod m), then b ≡ a (mod m).

3. If a ≡ b (mod m) and b ≡ c (mod m), then a ≡ c (mod m).

4. If a ≡ b (mod m) and c ≡ d (mod m), then a ± c ≡ b ± d (mod m) and ac ≡ bd (mod m).

5. If a ≡ b (mod m), then a + c ≡ b + c (mod m) and ac ≡ bc (mod m) for any c ∈ Z.

6. If a ≡ b (mod m), then an ≡ bn (mod m) for any positive integer n.

m
7. If ac ≡ bc (mod m), then a ≡ b (mod d ), where d = gcd(c, m).

8. If a ≡ b (mod m), and k|m then a ≡ b (mod k).

9. If a ≡ b (mod m) and c ∈ N, then ca ≡ cb (mod cm).

a b m
10. If a ≡ b (mod m) and the integers a, b, m are all divisible by d > 0, then d ≡ d (mod d ).

Proof. Proof of Part 1: Since m|0 = a − a, a ≡ a (mod m).


Proof of Part 2: Since a ≡ b (mod m), so m | a−b. Hence, a−b = mq. Thus, m | m(−q) = b−a.
Hence, b ≡ a (mod m).
Proof of Part 3: If a ≡ b (mod m) and b ≡ c (mod m) then m | a − b and m | b − c. Hence, by
the linearity property m | a − c = (a − b) + (b − c) and thus a ≡ c (mod m).
Proof of Part 4: Since a − c = a + (−c), it suffices to prove only the “+ case.” By assumption,
m | a − b and m | c − d. Therefore, by linearity, m | (a + c) − (b + d) = (a − b) + (c − d) and
m|c(a − b) + b(c − d) = ac − bd. Hence

a+c ≡ b+d (mod m) and ac ≡ bd (mod m).

Proof of Part 5: Since a ≡ b (mod m), m | a−b. Thus, m | c(a−b) and m | (a+c−c−b) = a−b.
Hence, a + c ≡ b + c (mod m) and ac ≡ bc (mod m).
4

Proof of Part 6: We prove an ≡ bn (mod m) by induction on n.


If n = 1, the result is true by the assumption that a ≡ b (mod m).
Assume that the result holds for n = k. That is, ak ≡ bk (mod m). We also have a ≡ b (mod m).
Thus, aak ≡ bbk (mod m) or equivalently, ak+1 ≡ bk+1 (mod m). Hence, by the Principle of
Mathematical Induction (PMI), the result holds for all n ∈ N.
Proof of Part 7: As ac ≡ bc (mod m), we get m | ac − bd = c(a − b). Thus, c(a − b) = mk, for
some k ∈ Z. Since, (c, m) = d, c = dk1 and m = dk2 , for some k1 , k2 ∈ Z. Thus, dk1 (a − b) = dk2
or k2 |a − b as gcd(k1 , k2 ) = 1.
Thus, a ≡ b (mod k2 = md ).
Proof of Part 8, 9 and 10 are left for the readers.

Definition 3. Let m ∈ N be a given. For each a ∈ Z, the residue class (or the congruence class or
equivalence class) of a modulo m, denoted [a] or [a]m , is defined as

[a] = {x ∈ Z|x ≡ a (mod m)}.

Thus, the set {[0], [1], [2], . . . , [m − 1]}, denoted Zm , has some nice properties.
m
Theorem 4. Let p(x) = ∑ ck xk be a polynomial function of x with integral coefficients ck . If a ≡ b
k=0
(mod n), then p(a) ≡ p(b) (mod n).

Proof. Since, a ≡ b (mod n), we have seen that ak ≡ bk (mod n) and hence, ck ak ≡ ck bk (mod n),
for k = 0, 1, 2, . . . , m. Adding these m + 1 congruences, we get
m m
p(a) = ∑ ck ak ≡ ∑ ck bk = p(b) (mod n).
k=0 k=0

If p(x) is a polynomial with integral coefficients, we say that a is a solution of the congruence
p(x) ≡ 0 (mod n) if p(a) ≡ 0 (mod n).

Corollary 5. If a is a solution of p(x) ≡ 0 (mod n) and a ≡ b (mod n), then b is also a solution
of p(x) ≡ 0 (mod n).
5

Theorem 6. Let M = am 10m +am−1 10m−1 +· · ·+10a1 +a0 be the decimal expansion of the positive
integer M, 0 ≤ ak < 10, and let S = a0 + a1 + · · · + am . Then, 9|M if and only if 9|S.
m
Proof. Let p(x) = ∑ ak xk . Then p(10) = M and p(1) = S. But, 10 ≡ 1 (mod 9) and hence
k=0
p(10) ≡ p(1) (mod 9). Thus, we have M ≡ S (mod 9).

Theorem 7. Let M = am 10m +am−1 10m−1 +· · ·+10a1 +a0 be the decimal expansion of the positive
integer M, 0 ≤ ak < 10, and let T = a0 − a1 + · · · + (−1)m am . Then, 11|M if and only if 11|T .
m
Proof. Let p(x) = ∑ ak xk . Then p(10) = M and p(−1) = T . As 10 ≡ −1 (mod 11), we get
k=0
p(10) ≡ p(−1) (mod 11) and hence, M ≡ T (mod 11).

Fermat’s Little Theorem

It is easy to see that

14 ≡ 1 (mod 5); 24 ≡ 1 (mod 5); 34 ≡ 1 (mod 5); 44 ≡ 1 (mod 5)

54 ≡ 0 (mod 5)

64 ≡ 1 (mod 5); 74 ≡ 1 (mod 5); 84 ≡ 1 (mod 5); 94 ≡ 1 (mod 5)

104 ≡ 0 (mod 5)

Theorem 8. [Fermat’s Little Theorem] Let p be a prime and suppose that p - a. Then a p−1 ≡ 1
(mod p).

Proof. We begin by considering the first p − 1 positive multiples of a. That is, consider the integers

a, 2a, 3a, . . . , (p − 1)a.

• None of these numbers is congruent to another modulo p.


Let ra ≡ sa (mod p) for 1 ≤ r < s ≤ p − 1. As p - a, a can be canceled to give r ≡ s (mod p),
which is impossible as 0 < s − r < p.
6

• Similarly, it is easy to check that none of these numbers is congruent to zero modulo p.

Hence, {a (mod p), 2a (mod p), . . . , (p − 1)a (mod p)} = {1, 2, . . . , p − 1}. Therefore,

a · 2a · · · (p − 1)a ≡ 1 · 2 · · · (p − 1) (mod p).

Or equivalently,
a p−1 (p − 1)! ≡ (p − 1)! (mod p).

Since, gcd(p, (p − 1)!) = 1, using Theorem 2.thm:procon:7, we have a p−1 ≡ 1 (mod p).

Corollary 9. If p is prime, then a p ≡ a (mod p) for any integer a.

Proof. If p|a, then p|a p − a and hence the result is true.


If p - a, then using theorem 8, a p−1 ≡ 1 (mod p). Now, multiplying both sides by a, we get a p ≡ a
(mod p).

Alternate proof: The result is clearly true for p = 2 as both a and a2 have the same parity. Let
p be an odd prime, then a p and a have same sign. Thus, it is sufficient to prove the result for positive
integers. So, let us fix a prime p and prove the result using induction on a. If a = 1, then clearly
a p ≡ a (mod p) holds.
Assume the result holds for a, i.e., a p ≡ a (mod p). We need to prove that (a + 1) p ≡ (a + 1)
(mod p).
pp!
We first observe that since p is a prime p | k = for k = 1, 2, . . . , p − 1. Hence,
k!(p − k)!
(a + 1) p ≡ a p + 1 (mod p). But, by induction hypothesis, a p ≡ a (mod p). Hence, we get
(a + 1) p ≡ a p + 1 ≡ (a + 1) (mod p).

You might also like