Number Theory Muzammil Tanveer
Number Theory Muzammil Tanveer
Number Theory Muzammil Tanveer
BY MUZAMMIL TANVEER
mtanveer8689@gmail.com
0316-7017457
Dedicated
To
My Honorable Teacher
Dr. Muhammad Umer Shuaib
&
My Parents
1
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 01
Integer:
ا ر اور ر ۔ ا اد
Positive Integer:
The integer in which x > 0 i.e. {1,2,3,…..}
Negative Integer:
The integer in which x < 0 i.e. {−1, −2, −3,…..}
Non-negative Integer:
The integer in which x ≥ 0 i.e. {0,1,2,3,…..}
Non-positive Integer:
The integer in which x ≤ 0 i.e. {0, −1, −2, −3,…..}
Even Integer:
An integer ‘n’ is said to be even if n = 2m where m Z
Odd Integer:
An integer ‘n’ is said to be odd if n = 2m+1 where m Z
Division Algorithm:
Let ‘a’ and ‘b’ be any two integers such that b 0 then unique integers q and r
s.t
a = qb+r ; 0 r < | |
2
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
e.g. a = 12 , b = 5 12 = (5) + 2
& a = −36 , b = −7
−36 = 6(−7) + 6
Divisibility:
Let ‘a’ and ‘b’ be any two integers with b 0 we say that b divides a if an
integer c such that
a = bc
In this case ‘b’ is called divisor or factor of ‘a’ and ‘a’ is called multiple of ‘b’
and is denoted by ba
Remark:
If there does not exist such integer ‘c’ we say be does not divide ‘a’ and is
denoted by b † a . e.g. 2†5
Remarks:
(i) Every integer a 0 divides 0 i.e a0
(ii) 1 divides every integer a i.e 1-5 -5 = -5(1)
(iii) Every integer divide itself i.e aa
(iv) If ab and bc then ac e.g. 24 and 48 then 28
(v) If ab then abx where x Z
(vi) If ab and ac the abx+cy
i.e. ab abx and ac acy then abx+cy
(vii) If ab and b 0 then | || | i.e. 2-6 |2| |−6|
Common Divisor:
Let ‘a’ and ‘b’ be any two integers at least one of them is non-zero and
integer ‘c’ is said to be common divisor of ‘a’ and ‘b’ if ca and cb.
3
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 02
(i) d a and d b
(ii) For any other common divisor (say) c of a and b the c d
Notation:
The greatest common divisor of a and b is denoted by
Remark:
(i) If a b then (a,b) = a
e.g. (2,4) = 4
and (0,0) = not exist
(ii) (a,b) = (| |, | |)
Theorem:
Let ‘a’ and ‘b’ be any two integers at least one of them is non-zero. Then g.c.d
of ‘a’ and ‘b’ exists and is unique.
S = {ma+nb ; m,n Z}
Then by Well ordering principle S contain a smallest element (say) ‘d’ where
d = ax + by ; x,y z. Now we show that g.c.d of ‘a’ and ‘b’ = (a,b) = d
da
Similarly, db
(iii) Let ‘c’ be any integer such that ca and cb. Then
cax and cby
cax+by
cd d = ax+by
Since d satisfy all conditions of definition of g.c.d. Therefore
(a,b) = d
Uniqueness:
Suppose that d1 and d 2 (if possible) are g.c.d’s of a and b.
d 2 d1
d 2 d1 …..(ii)
d1 d 2
d1 d 2 …(iii)
d1 = d 2
5
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 03
Remark:
If (a,b) = d then integer x and y such that
ax+by = d
a=9 ,b=4
9 = 2 (4) + 1
(4,9) = 1
9x+4y = 1 ax by 1
1 = 9 – 4(2)
division algorithm اورb اورa ان ا ت ے
1 = 9(1) + 4(–2)
x = 1 and y = –2 a=qb+r ; 1 r | | ۔
(–9,4) = 1
In linear combination
–9x+4y = 1
1 = –9(–1)+4(–2)
x = –1 and y = –2
6
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: (5,12) = ?
Solution: a = 12 , b = 5
12 = 2(5) + 2 ____(i)
2
Here a = 5 , b =2 12
5 = 2(2) +1 5 10
i.e. (5,12) = 1 2
12x+5y = 1
1 = 5 – 2(2)
= 5 – 24 +4(5)
= 5(5) – 24
1 = 12(–2) + 5(5)
x = –2 and y = 5
Question: (13,6) = ?
Solution: a = 13 , b = 6
13 = 2(6) + 1
13x+6y = 1
1 = 13–6(2)
1 = 13(1)+6(–2)
x = 1 and y = –2
7
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: (24,7) = ?
Solution: a = 24 , b = 7 3
24 = 3(7) + 3 _____(i) 24
7 = 2(3) +1 7 21
3
(24,7) = 1
24x+7y = 1
1 = 7 – 2(3)
= 7 – 2 (24) + 6(7)
1 = 24(–2) + 7(7)
x = –2 , y = 7
Question: (34,4) = ?
Solution: a = 34 , b = 4
آر اس وا اب اسg.c.d = zero
34 = 8(4) + 2
4 = 2(2) + 0 ۔g.c.d
(34,4) = 2
34x + 4y = 2
2 = 34 – 8(4)
2 = 34(1) + 4(–8)
x = 1 and y = –8
8
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: (76,8) = ?
Solution: a = 76 , b = 8
76 = 9(8) + 4
8 = 4(2) +0
(76,8) = 4
4 = 76 – 9(8)
4 = 76(1) + 8(– 9)
x = 1 and y = –9
Question: (59,11) = ?
Solution: a = 59 , b = 11
59 = 5(11) + 4 _______(i)
11 = 2(4) + 3 _______(ii)
4 = 1(3) + 1 _______(iii)
(59,11) = 1
1 = 4 – 3(1)
1 = 4 – 11 +2(4)
1 = –11 + 3(4)
1 = 59(3) + 11(–16)
x = 3 and y = – 16
9
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: (37,47) = ?
Solution: a = 47 and b = 37
47 = 1(37) + 10 _____(i)
37 = 3(10) +7 _____(ii)
10 = 1(7) + 3 _____(iii)
7 = 2(3) +1 _____(iv)
(37,47) = 1
47x+37y = 1
1 = 7 – 3(2)
1 = 7 – 2(10) + 2(7)
1 = 3(7) – 2(10)
1 = 3(37) –11(10)
1 = 14(37) – 11(47)
1 = 47(–11) + 37(14)
x = –11 and y = 14
10
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
256 = 1(142) + 114 ___(ii)
28 = 14(2) +0
(256 , 1166) = 2
1166x+256y = 2
2 = 114 – 4(28)
2 = –4(142) + 5(114)
2 = 5(256) –9(142)
2 = 1166(–9) + 41(256)
2 = 1166(–9) + 256(41)
x = –9 and y = 41
11
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 04
Theorem:
Let ‘a’ and ‘b’ be any two integers and ‘k’ be any integer then (ka,kb) = k(a,b)
Proof:
Let (a,b) =d
And (ka,kb) = t
kd = t
Since (a,b) = d
au + bv = d
We suppose
(ka,kb) = t
tka , tkb
tu(ka) , tv(kb)
tu(ka)+v(kb)
By definition of divisibility
u(ka)+v(kb) = tr
Put in (i)
kd = tr
t kd _____(ii)
12
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Now as (a,b) = d
kd(ka,kb)
kdt
kd t ______(iii)
kd = t
or t = kd
Corollary:
Solution:
, =d
d , =d
, =1
Theorem: If ac and bc and (a,b) = 1 then show that abc
Proof: Since ac and bc
c = ax & c = by
acu + bcv = c
a(by) u + b(ax) v = c
ab(yu+xv) = c
ab(z) = c z yu xv integer
Or c = ab(z)
Proved.
ax + by = 1
acx + bcy = c
As aa aacx
abc (given)
abcy
aacx+bcy
ac Proved
14
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 05
Common Multiple:
Let ‘a’ and ‘b’ be any two integers at least one of them is non-zero. An integer
(either positive or negative) ‘m’ is called common multiple of ‘a’ and ‘b’ if am
and b m.
Notation:
If least common multiple of ‘a’ and ‘b’ is ‘m’ we denote it as [a,b] = m
12 2 2 3
2 1
12 2 3
72 2 2 2 3 3 30 2 3 5
3 2 1 1 1
2 3 2 3 5
P1 2, P2 3 P1 2 , P2 3, P3 5
x1 3, x2 2 x1 1, x2 1, x3 1
15
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Theorem:
Let ‘a’ and ‘b’ be any two integers at least one of them is non-zero where
r r
a Pi , b Pi yi . Let M i max xi , yi then show that [a,b] = d where
xi
i 1 i 1
r
d Pi M i . Also show uniqueness of d.
i 1
Proof:
r
(i) Note that d Pi M i is positive because all Pi are prime number and
i 1
xi ti and y i ti
max xi , yi ti i
M i ti i
Mi t
P Pi i
r r
Mi ti
P P i
i 1 i 1
16
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Uniqueness:
Suppose that d1 and d 2 (if possible) are L.C.M’s of a and b
d 2 d1
d 2 d1 _____(i)
d1 d 2
d1 d 2 _____(ii)
Theorem:
Let ‘a’ and ‘b’ be any two integers at least one of them is non-zero then
(a,b) . [a,b] = ab
Proof:
a = dr , b = ds (r,s) = 1 ____(i)
and d = au+bv
Also m = [a,b]
m = at & m = bw ______(ii)
d = au+bv
md = m(au+bv)
17
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
md = mau + mbv
= bwau + atbv
md = ab (uw + tv)
ab md ______(iii)
ab drb
Also rb by (i )
d d
ab ads
sa by (i)
d d
ab ab ab
a , b ; that is a common multiple of ‘a’ and ‘b’.
d d d
ab
m or md ab _____(iv)
d
md = ab
(a,b).[a,b] = ab
Corollary:
If (a,b) = 1 then [a,b] = ab
Proof:
(a,b).[a,b] = ab
1.[a,b] = ab
[a,b] = ab
18
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
(i) [6,14] = ?
14 = 2(6) + 2
6 = 3 (2) + 0
(6,14) = 2
2 . [6,14] = 6×14
[6,14] = 42
If [a, b, c] a, b , c
(ii) [6,14,8] = ?
[6,14,8] 6,14 ,8
14 = 2(6) + 2
6 = 3 (2) + 0
(6,14) = 2
2 . [6,14] = 6×14
[6,14] = 42
Now 42 = 5(8) + 2
42 8
2 . [42,8] = 42×8 42,8 168
2
[6,14,8] = 168
19
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 06
e.g. ax + by = c
or x + βy + γz =
Theorem: Let a(0) , b(0) and ‘c’ be any integer then the equation
ax + by = c _____(i)
Proof:
d ax0 by0
dc by eq (ii)
20
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Conversely:
Suppose dc then by definition of divisibility there exist integer t such that
c = dt
Now as d = (a,b)
au + bv = d
ax0 by0 c
where x0 ut , y0 vt , c dt
x0 , y0 is solution of eq (i)
a x ' x0 b y ' y 0 0
As d = (a,b)
a = rd , b = sd where (r,s) = 1
rd x ' x0 sd y ' y0
21
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
From (v) we have
s r x ' x0
s x ' x0
x ' x0 st
x ' x0 st
b b
x' x0 t b sd s
d d
r s y ' y0
r y ' y0
y ' y0 rt
y ' y0 rt
y ' y0 rt
a a
y ' y0 t a rd r proved
d d
Now 5 = 2(2) + 1
22
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1 = 5 2(2)
Or 2(2) + 5 (1) = 1
Multiplying by 6
2(12) + 5(6) = 6
x0 12 , y0 6
b
x' x0 t
d
5
x ' 12 t
1
x ' 12 5t
a
y ' y0 t
d
2
y' 6 t
1
y ' 6 2t
To check
2x + 5y = 6
23
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Find the general solution of 47x + 37y = 15
Solution: Since (47,37) = 1 and 1 15 so, solution of the
given equation exists
37 = 3(10) + 7 _____(ii)
10 = 1(7) + 3 _____(iii)
7 = 2(3) + 1 _____(iv)
Now 1 = 7 2(3)
1 = 7 2(10) + 2(7)
1 = 3(7) 2(10)
1 = 3(37) 11(10)
1 = 14(37) 11(47)
Or 47(11) + 37 (14) = 1
47(165) + 37(210) = 15
x0 165 , y0 210
For G.S
b a
x' x0 t , y ' y0 t
d d
24
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Find the general solution of 85x + 60y = 20
Solution: Since (85 , 60) = 1 and 5 20 so, solution of the
given equation exists
60 = 2(25) + 10 _____(ii)
25 = 2(10) + 5 _____(iii)
10 = 2(5) + 0
Now 5 = 25 2(10)
= 25 2(60) + 4(25)
= 5(25) 2(60)
5 = 5(85) 7(60)
Or 85() + 60 (7) = 5
85() + 60(28) = 20
x0 20 , y0 28
For G.S
b a
x' x0 t , y ' y0 t
d d
For check t = 1
25
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Find the general solution of 34x + 7y = 2
Solution: Since (34, 7) = 1 and 1 2 so, solution of the
given equation exists
7 = 1(6) + 1 _____(ii)
Now 1 = 7 1(6)
= 7 1(34) + 4(7)
Or 34() + 7 () = 1
34() + 7() = 2
x0 2 , y0 10
For G.S
b a
x' x0 t , y ' y0 t
d d
For check t = 1
26
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 07
Theorem: Let a(0) , b(0) and ‘c’ be any integer then the equation
axby = c ___(i)
b a
x' x0 t and y ' y0 t where t Z
d d
Proof:
d ax0 by0
dc by eq (ii)
Conversely:
Suppose dc then by definition of divisibility there exist integer t such that
c = dt
Now as d = (a,b)
au + bv = d
a(ut) b(vt) = dt
27
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
ax0 by0 c
where x0 ut , y0 vt , c dt
x0 , y0 is solution of eq (i)
a x ' x0 b y ' y 0 0
As d = (a,b)
a = rd , b = sd where (r,s) = 1
rd x ' x0 sd y ' y0
s r x ' x0
s x ' x0
x ' x0 st
x ' x0 st
28
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
b b
x' x0 t b sd s
d d
Again, from eq (v)
r s y ' y0
r y ' y0
y '
y0 rt
y ' y0 rt
a a
y ' y0 t a rd r proved
d d
Now 15 = 1(8) + 7
8 = 1(7) + 1
And 1 = 8 1(7)
= 8 1[15
= 8 1(15) + 1(8)
= 2(8) 1(15)
1 = 8(2) 15(1)
× by 20 8() 15() = 20
x0 40 , y0 20
29
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
b a
For G.S x' x0 t , y ' y0 t
d d
x ' 55 , y ' 28
8(55) 15(28) = 20
Now 67 = 1(45) + 22
45 = 2(22) + 1
And 1 = 45 2(22)
= 45 2[67
= 45 2(67) + 2(45)
1 = 3(45) 2(67)
Or 67(2) 45(3) = 1
x0 262 , y0 393
b a
For G.S x' x0 t , y ' y0 t
d d
30
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: If the cost of an apple is Rs.8 and cost of mango is Rs. 15 How
many minimum (least) number of apples can bought from rupees 200.
Solution: Let x represent the number of apple and y represent the number of
mangoes. Then
8x+15y = 200
Now 15 = 1(8) + 7
8 = 1(7) + 1
And 1 = 8 1(7)
= 8 1[15
= 8 1(15) + 1(8)
1 = 2(8) 1(15)
Or 8(2) 15(1) = 1
x0 400 , y0 200
b a
For G.S x' x0 t , y ' y0 t
d d
x ' 10 , y' 8
31
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 08
13 5 2 Re mainder
2 3
13 16
5 10 5 15
3 1
R=53=2 R=51=4
Congruence:
Let ‘a’ and ‘b’ be any two integers and ‘m’ be a fixed positive integer. We say
that ‘a’ is congruent to ‘b’ modulo ‘m’ if ‘m’ divides a b and is denoted by
a b mod m ____(i)
The relation (i) is called congruence ‘m’ is called modulus value of congruence
‘b’ is called remainder/residue of the congruence. If ‘m’ does not divides a b
we say that ‘a’ is incongruent to ‘b’ modulo ‘m’ and denoted by
a b mod m
Examples:
(i) a=8 , b=5 , m=3
8 5 mod 3
32
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
(iv) a=8 , b = 6 , m=2
8 6 mod 2
Proof:
(i) Reflexive: Let ‘a’ be any integer and ‘m’ be fix (positive) integer
Since ma
ma a
a a mod m
(ii). Symmetric: Let ‘a’ and ‘b’ be any two integers and ‘m’ be a fix
(positive) integer.
Suppose a b mod m
mab = m(ba)
m b a
b a mod m
(iii) Transitive: Let ‘a’, ‘b’ and ‘c’ be any integers and ‘m’ be any fix
(positive) integer.
Suppose a b mod m
And b c mod m
33
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
m a b + b c
mac
a c mod m
Equivalence Class:
Since the relation of congruence between integer is an equivalence relation
therefore it partitions set of integers into classes these classes are called
Equivalence classes.
Example: m = 2
0 x x 0 mod 2
xx mod 2 x 0
0 0, 2 , 4,....
xx mod 2 x 1
1 1, 3, 5,....
We note that
0 1 0
And 0 1
34
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 9
Partition:
Let A = {1,2,3,4} A1 and A2 are partition of A if
(i) A1 A2 A
(ii) A1 A2
(i) m=2
0 , 1 are classes Re mainder 0,1
0 x x 0 mod 2
0 x 2 x0
0 0, 2 , 4, 6,......
1 x x 1 mod 2
1 x
2 x 1
38
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
5 x x 5 mod 7
5 x 7 x 5
5 5,12,19, 26,33...., 2, 9, 16, 23, 30...
6 x x 6 mod 7
6 x 7 x 6
6 6 ,13, 20, 27,34...., 1, 8, 15, 22, 29...
0 1 2 3 4 5 6
0 1 2 3 4 5 6
(vii) m=8
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7
0 x x 0 mod8
0 x 8 x 0
0 0, 8, 16 24,......
1 x x 1 mod8
1 x 8 x 1
1 1,9,17, 25,33...., 7, 15, 23, 31,...
2 x x 2 mod 8
2 x 8 x 2
2 2 ,10,18, 26,34...., 6, 14, 22, 30, 38...
3 x x 3 mod 8
3 x 8 x 3
3 3,11,19, 27,35...., 5, 13, 21, 29, 37...
4 x x 4 mod8
4 x 8 x 4
4 4 ,12, 20, 28,36...., 4, 12, 20, 28, 36...
5 x x 5 mod8
39
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
5 x 8 x 5
5 5,13, 21, 29,37...., 3, 11, 19, 27, 35...
6 x x 6 mod8
6 x 8 x 6
6 6 ,14, 22,30,38...., 2, 10, 18, 26, 34...
7 x x 7 mod 8
7 x 8 x 7
7 7 ,15, 23,31,39...., 1, 9, 17, 25, 33...
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
(viii) m=9
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8
0 x x 0 mod 9
0 x 9 x 0
0 0, 9 , 18 27,......
1 x x 1 mod 9
1 x 9 x 1
1 1,10,19, 28,37...., 8, 17, 26, 35,...
2 x x 2 mod 9
2 x 9 x 2
2 2 ,11, 20, 29,38...., 7, 16, 25, 34, 43...
3 x x 3 mod 9
3 x 9 x 3
3 3,12, 21,30,39...., 6, 15, 24, 33, 42...
4 x x 4 mod 9
4 x 9 x4
40
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
4 4 ,13, 22,31, 40...., 5, 14, 23, 32, 41...
5 x x 5 mod 9
5 x 9 x 5
5 5,14, 23,32, 41...., 4, 13, 22, 31, 40...
6 x x 6 mod 9
6 x 9 x 6
6 6 ,15, 24,33, 42...., 3, 12, 21, 30, 39...
7 x x 7 mod 9
7 x 9 x 7
7 7 ,16, 24,33, 42...., 2, 11, 20, 29, 38...
8 x x 8 mod 9
8 x 9 x 8
8 8,17, 26,35, 44...., 1, 10, 19, 28, 37...
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
(ix) m = 10
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9
0 x x 0 mod10
0 x 10 x 0
0 0, 10 , 20 30,......
1 x x 1 mod10
1 x 10 x 1
1 1,11, 21,31, 41...., 9, 19, 29, 39,...
2 x x 2 mod10
2 x 10 x 2
2 2 ,12, 22,32, 42...., 8, 18, 28, 38, 48...
41
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
3 x x 3 mod10
3 x 10 x 3
3 3,13, 23,33, 43...., 7, 17, 27, 37, 47...
4 x x 4 mod10
4 x 10 x 4
4 4 ,14, 24,34, 44...., 6, 16, 26, 36, 46...
5 x x 5 mod10
5 x 10 x 5
5 5,15, 25,35, 45...., 5, 15, 25, 35, 45...
6 x x 6 mod10
6 x 10 x 6
6 6 ,16, 26,36, 46...., 4, 14, 24, 34, 44...
7 x x 7 mod10
7 x 10 x 7
7 7 ,17, 27,37, 47...., 3, 13, 23, 33, 43...
8 x x 8 mod10
8 x 10 x 8
8 8,18, 28,38, 48...., 2, 12, 22, 32, 42...
9 x x 9 mod10
9 x 10 x 9
9 9 ,19, 29,39, 49...., 1, 11, 21, 31, 41...
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
42
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Theorem: Let ‘a’, ‘b’, ‘c’ and ‘d’ be any integers and ‘m’ be fixed positive
integer. If a b mod m and c d mod m . Then
(i) a c b d mod m
(ii) a c b d mod m
(iii) ac bd mod m
a b mod m , c d mod m
By definition of congruence
m abcd
m a c b d
a c b d mod m
(ii). Given
a b mod m , c d mod m
By definition of congruence
m a b c d
m abcd
m a c b d
a c b d mod m
(iii). Given
a b mod m , c d mod m
43
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
By definition of congruence
m a b c and m c d b
m ac bc , m bc bd
m ac bc bc bd
m ac bd
ac bd mod m
Proof: Given
a b mod m
By definition of congruence
m ab
m a b a n 1 a n 2b .... b n 1
m a n bn
a n b n mod m
Some formula’s a 2 b 2 a b a b , a 3 b 3 a b a 2 ab b 2
44
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 10
26 1 mod13
6 9 9
2 1 mod13
254 1 mod13
257 8 mod13
257 5 mod13 8 13 5
Remainder = 5
52 1 mod12
2 24 24
5 1 mod12
548 1 mod12
Remainder = 1
34 1 mod10
4 25 25
3 1 mod10
3100 1 mod10
45
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
3.3100 1.3 mod10
3101 3 mod10
Remainder = 3
2 2 1 mod 3
2 23 23
2 1 mod 3
2 46 1 mod 3
247 2 mod 3
Remainder = 2
Question: Find the remainder when sum of the given series is divisible by 4
1!+2!+3!+….+100!
1! 2! 3! 4! .... 100! 1! 2! 3! mod 4
Question: Find the remainder when sum of the given series is divisible by 15
1!+2!+3!+….+1000!
46
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Solution: Since 5! 0 mod15
1! 2! 3! 4! 5! 6! .... 1000! 1! 2! 3! 4! mod15
Remainder = 3
47
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 11
ax bx mod m ___ ii
. .
. .
. .
ax n 1 bx n 1 mod m ___ iv
a ax ax 2 ... ax n 1 b bx bx 2 ... bx n 1
f a f b mod m
f a a0 a1 x a2 x 2 .... an1 x n 1
m1 a b , m2 a b
Multiplying by m2
m1m2 m2 a b
m1 , m2 a b
a b mod m1 , m2
48
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Complete Residue System (CRS)
Let a1 , a2 ,...,a k be a set of integers and m be a fixed positive integer we say
that the set a1 , a2 ,...,a k forms a complete Residue system modulo m (denoted
by CRS (mod m)) if
(i) ai a j mod m i j
(ii) For any integer n there exist a unique ai such that
n ai mod m
12 13 mod 3 3†12 13
11 13 mod 3 3†11 13
25 13 mod 3 3 25 13
6 8 mod 4
6 9 mod 4
7 8 mod 4
7 9 mod 4
8 9 mod 4
49
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
(ii). 2nd condition
10 6 mod 4
6 10 mod 4
Theorem: Let A = a1 , a2 ,...,a k be a set of integers then ‘A’ forms CRS (mod
m) if k = m.
a j i mod m
Thus k m. But then a1 , a2 ,...,a k is also a CRS (mod m). Hence i
0 i m1 , unique j 1 j k such that
i a j mod m
mk
m=k
Alternate definition:
The set A = a1 , a2 ,...,a k forms a CRS (mod m) if
50
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Example: Show that the set {81,82,83,84} , m = 4 forms CRS.
Solution: (i) Observe that A contains exactly 4 elements. Condition (i)
satisfied.
(ii). 81 82 mod 4
81 83 mod 4
81 84 mod 4
82 83 mod 4
82 84 mod 4
83 84 mod 4
Exercise: Let x1 , x2 ,.... xm be a CRS (mod m) and a,b Z such that (a,m) = 1
then show that the set A ax1 b, ax2 b,....a xm b forms CRS (mod m)
A contradiction against the fact that the given set x1 , x2 ,....xm forms a CRS
(mod m). So our supposition is wrong. Thus
axi b ax j b (mod m ) i j
51
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Example: A = {81,82,83,84} , m = 4
The least residues of A (mod 4) are {1,2,3,0}
Example: A = {81,82,84,88} , m = 4
Solution: The least residues of A (mod 4) are {1,2,0,0} which are not
remainder of 4 i.e {0,1,2,3}. Hence the given set not forms CRS (mod 4).
52
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 12
(i) ai , m 1 i
(ii) ai a j mod m i j
(iii) For any integer n where (n,m) = 1 there exist a unique ai such
that
n ai mod m
1 3 mod 8
1 5 mod 8
1 7 mod 8
3 5 mod 8
3 7 mod 8
5 7 mod 8
(iii). n = 15 (15,8) = 1
And 15 7 mod 8
53
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Euler function:
Let n be a +ve integer (n 1) we define Euler function as follows
n if n 1
n The number of ve int egers less than
and co prime to n if n 1
If n = 2
(0,2) = 2 , (1,2) = 1
(2) = 1
If n = 3
(3) = 2
If n = 4
(4) = 2
If n = 5
(5) = 4
If n = 13
(13) = 12
54
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Theorem: If a1 , a2 ,...,a k is a Reduced Residue system (mod m) then
k = (m).
Proof: t1, t 2 ,..., t m be the (m) integers that are less than m and co-prime to
m. We show t1 , t 2 ,..., t m is a RRS (mod m)
Suppose ti t j (mod m) 1 ti , t j m
m ti t j ___ 1
But 1 ti , t j m
n = qm + r ; 0r<m
k m
Similarly, (m) k
k = (m)
Alternative definition:
A set a1 , a2 ,...,a k forms Reduced Residue system (mod m) if
(i) k = (m)
(ii) ai , m 1 i
(iii) ai a j mod m i j
55
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Example: Check the set forms RRS {1,3,5,7} , m = 8
Solution: (i) Since (m) = 4
(ii). 1 3 mod 8
1 5 mod 8
1 7 mod 8
3 5 mod 8
3 7 mod 8
5 7 mod 8
Then show that the set A = ax1 ,a x2 ,.....a x m forms RRS (mod m)
Solution: (i) Observe that the given set has exactly (m) elements
(ii). Since x1 , x2 ,..... x m forms RRS (modm)
So x1 , m x2 , m ...., x m , m 1
Then ax1 , m ax2 , m ...., ax m , m 1 a , m 1
(iii). Since x1 , x2 ,..... x m forms RRS (mod m)
So x1 x2 mod m
x2 x3 mod m
x m 1 x m mod m
56
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Then ax1 ax2 mod m
Since all conditions are satisfied. Hence the given set forms RRS (mod m)
Prime Number:
A positive integer n > 1 is called prime if ‘n’ has exactly two integer divisors
namely 1 and ‘n’ itself otherwise ‘n’ is called composite number.
Composite Number:
A positive number n > 1 is called composite if ‘n’ has at least three positive
divisors.
Perfect Number:
A positive integer ‘n’ is called perfect if the sum of its positive divisor is twice
of the number ‘n’.
Examples n=6
Divisor of 6 = 1,2,3,6
6 is perfect number
n = 28
divisor of 28 = 1,2,4,7,14,28
28 is perfect number.
57
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Twin Primes:
Let ‘n’ be a positive integer , if n 1 and n +1 are prime number then these
prime number are called twin primes.
n=4
Prime Triplet:
Let ‘P’ be a prime number if P+2 and P+4 are prime then the triplet (P,P+2,P+4)
is called Prime Triplet
e.g. P=3
P+2 = 5
P+4 = 7
Powerful integer:
A positive integer ‘n’ is powerful if whenever a prime ‘P’ divides ‘n’. P2 also
divides ‘n’.
e.g. n=8
P=2 , 28
P2 = 4 , 48 8 is powerful.
58
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Exercise: Let P be a prime and ‘a’ be any integer then show that either Pa or
(a,P) = 1.
(a,P) = 1
Proof: Suppose there exist an integer n > 1 which is not a product of primes.
Let ‘m’ be the smallest then ‘m’ is not a prime and hence m = ab; 1 < a , b < m.
But then by choice of ‘m’ both ‘a’ and ‘b’ are products of primes. So, ‘m’ is a
product pf primes. A contradiction, hence every integer can be decomposed as a
product of prime number.
59
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 13
Question: Let ‘m’ be a positive integer, ‘a’ and ‘b’ any integers. The Linear
congruence a x b mod m has a solution if and only if db , d = (a,m).
a x b mod m
m ax b by definition of congruence
ax b my
ax my b
a x0 b mod m ____ i
Since (a,m) = d
a = dr and m = ds where(r,s) =1
'
ds drx drx0
60
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
ds dr x ' x0
s r x ' x0
s x ' x0
x ' x0 hs
x ' x0 hs ____ iv
By Division Algorithm
h = dq +t ; 0t<d
tm m
x ' x0 mq ds m , s
d d
m
x ' x0 t.
d
a2 x b2 mod n 2
. .
. .
ar x br mod n r
61
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
can be simplified to form x c1 mod m1
x c2 mod m2
x cr mod mr
x 4 mod 5
x 5 mod 6
x 2 mod 3
3x2
62
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x 2 = 3k where k is integer
x = 2 + 3k ____(i)
x 4 mod 5
2 3k 4 mod 5
3k 4 2 mod 5
3k 2 mod 5
2k 2 mod 5
k 1 mod 5
k 4 mod 5
5k 4
k 4 5k ' put in i
x 2 3 4 5k '
x 2 12 15k '
x 5 mod 6
3k ' 3 mod 6
k ' 1 mod 6
63
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
6 k' 1
k ' 1 6k ''
x 14 15 1 6k ''
x 14 15 90k ''
x 29 90k ''
x 29 90k ''
90 x 29
x 29 mod 90
x 4 mod11
x 3 mod17
x 5 mod 6
6x5
x = 5 + 6k ____(i)
x 4 mod11
5 6k 4 mod11
64
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
6k 4 5 mod11
6k 1 mod11
6k 10 mod11
5k 10 mod11
k 2 mod11
k 9 mod11
11k 9
x 5 6 9 11k '
x 5 54 66k '
x 3 mod17
k ' 6 mod17
65
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
17 k ' 11
x 59 66 11 17 k ''
x 59 726 1122k ''
x 785 mod1122
Proof: Suppose P is prime. Let ‘a’ be an integer such that 1 a P1. Then
(a,p)=1 . Hence the congruence ax 1 mod P has a unique solution (mod P)
(say) b
ab 1 mod P
a 2 1 mod P
P a2 1 P a 1 or P a 1
Therefore, by pairing bs 1< b < P1 with cs 1< c < P1 bc 1 mod P we get
d P 1!
d P 1! 1
d1
d 1 Hence P is prime
Proof: The proof consists of two parts. First, we will construct a solution and
then show that it is unique modulo m1 , m2 ,...mk
has a unique solution say yi (yi is in fact the inverse of Mi modulo mi)
Let x a1 M i y1 a 2 M 2 y 2 .... ak M k y k
67
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
k
x ai M i yi a j M j y j
i 1
i j
k
x ai .0 a j .1 mod j
i j
x 0 aj mod j
x aj mod j 1 j k
x1 x0 0 mod m j
m j x1 x0 0
m j x1 x0 for 1 j k
m1 , m2 ,...mk x1 x0
where M m1 , m2 ,...mk
M x1 x0
x1 x0 0 Mod M
x1 x0 Mod M
Thus any two solution of linear system are congruent modulo M , so the
solution is unique modulo M.
Question: Let ‘a’ and ‘b’ be any two integers and ‘m’ be a positive integer
show that of n a nb mod m then a b mod m where gcd (m,n) = 1
m na nb by definition of congruence
68
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
m n a b
m a b
a b mod m
Question: Let ‘a’ and ‘b’ be any two integers and ‘m’ be a positive integer.
Show that if a b mod m then a n b n mod m
By definition of congruence
m ab
m a b a n 1 a n 2b .... b n 1
m a n bn
a n b n mod m
Question: Define Fermat numbers and show that any two Fermat numbers are
relatively primes.
d2
But all Fermat number are odd and therefore d cannot be 2. So, d = 1 and the
numbers Fa and Fb are relatively prime.
69
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: State and prove Unique Factorization theorem.
Statement: Every integer n > 1 can be expressed as a product of primes and
this representation is unique except for the order in which they are written.
If k+1 is prime. Then the induction is complete. If k+1 is composite. Then it can
be written as
k 1 k1 k2
For uniqueness
Therefor q1 P1 P2 P3 ,....Pj by 2
70
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer