Top Banner
T. Y. B. Sc. Mathematics MTH – 355(B) : Number Theory Unit - 1 Divisibility theory in integers By Dr. J. N. Chaudhari 1
61

JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Mar 10, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

T. Y. B. Sc. MathematicsMTH – 355(B) : Number Theory

Unit - 1

Divisibility theory in integersBy Dr. J. N. Chaudhari

1

Page 2: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Definition : Let a , b & a 0, Then a is said to divide b if there exists an integer c such that b = ac.Notation : i) aǀb , read as a divides b.

ii) If a does not divide b, then we write a|bNote : If aǀb, then we say that a is a divisor of b or a is a factor of b or b is a multiple of a or b is divisible by a.eg : 15 = (–5) 3 – 5ǀ15

49 = (–7) (–7) – 7ǀ49

49 = (–7) (–7) – 7ǀ49

2

Page 3: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Properties of divisibility :1) a|0 , for all a – {0}.2) a|a , for all a – {0}.3) 1|a , for all a .4) a|b a|bx , for all x .5) a|b , a|c a|b c 6) a|b , a|c a|bx cy , for all x , y . 7) a|b , b|c a|c

7) a|b , b|c a|c8) a|b , b|a a = b or a = -b.9) a|b ak|bk , for all k – {0}.10) a|b |a | |b | .

Well ordering principle : Any nonempty subset of {0} has the smallest element.

3

Page 4: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Division Algorithm : Let a , b , b > 0. Prove that there exist unique q , r such that a = bq + r where 0 ≤ r < b.Proof : Denote S = {a – xb : x , a – xb ≥ 0} {0}Then S a - (-|a|b) = a + |a|b

≥ a + |a| 1 (Note b ≥ 1) ≥ 0

a - (-|a|b) S.Hence by well ordering principle, S has the smallest element

Hence by well ordering principle, S has the smallest element say r.

r = a – qb for some q a = qb + r where r S r ≥ 0 - - - - - - - (i)

To show r < b.Suppose that r ≥ b r – b ≥ 0

4

Page 5: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Now a – (q+1)b = a – qb – b= r – b ≥ 0

r – b = a – (q+1)b S. r – b ≥ r ∵ r is the least element of S 0 ≥ bwhich is impossible ∵ b > 0.Hence r < b - - - - - - - - - - - - (ii) Hence r < b - - - - - - - - - - - - (ii) From (i) & (ii) a = qb + r where 0 ≤ r < b.Uniqueness : Suppose that q1 , q2 , r1 , r2 such that a = q1b + r1 & a = q2b + r2 where 0 ≤ r1 < b & 0 ≤ r2 < b. q1b + r1 = q2b + r2 q1b – q2b = r2 – r1 .

5

Page 6: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

(q1 – q2)b = r2 – r1 . |q1 – q2| |b| = |r2 – r1|. |q1 – q2| b = |r2 – r1| ∵ b > 0 - - - - - - - - - (iii)If r1 r2, then without loss of generality assume that r1 < r2. r2 – r1 > 0Now by (iii),

|q1 – q2| b = |r2 – r1| ≤ r2 < b |q1 – q2| < 1 |q1 – q2| < 1 |q1 – q2| = 0 q1 – q2 = 0 q1 = q2 .

But then by (iii), |r2 – r1| = 0. Hence r2 – r1 = 0. r2 = r1 . there exist unique q , r Z such that

a = bq + r where 0 ≤ r < b.6

Page 7: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Corollary : Let a , b , b 0. Prove that there exist unique q , r such that a = bq + r where 0 ≤ r < |b|. Proof : Case (i) : b > 0.By division algorithm, there exist unique q , r such that

a = bq + r where 0 ≤ r < |b| b = |b| as b > 0Case (ii) : b < 0 By division algorithm, there exist unique q΄ , r΄ such that

a = -bq΄ + r΄ where 0 ≤ r΄ < -b

a = -bq΄ + r΄ where 0 ≤ r΄ < -b

a = b(-q΄) + r΄ where 0 ≤ r΄ < |b|Take q = -q΄ , r = r΄ a = bq + r where 0 ≤ r < |b|.

7

Page 8: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Show that square of any odd integer is of the type 8k + 1.Ans : Let a be any odd integer. a = 2t + 1 for some t . a2 = (2t + 1)2

= 4t2 + 4t + 1= 4t(t + 1) + 1= 4(2k) + 1 , for some k

= 4(2k) + 1 , for some k ∵ t or t+1 is an even integer

= 8k + 1Hence square of any odd integer is of the type 8k + 1.

8

Page 9: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : For any integer a, show that Ans : Let a . a is of the type 3k or 3k+1 or 3k+2

∵ by division algorithmCase (i) a = 3k

=

2a(a 2)3

2a(a 2)3 23k(a 2)

3 =

= k(a2 + 2) .

Case (ii) a = 3k+1

9

3 3

Page 10: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Case (ii) a = 3k+1

=

=

=

3]21)1)[(3k(3k 2

3]21)k61)[(9k(3k 2

3)3k61)(9k(3k 2

)1k21)3(3k(3k 2

2a(a 2)3

=

= (3k+1)(3k2+2k+1)

10

3)1k21)3(3k(3k 2

Page 11: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Case (iii) a = 3k+2

=

=

=

3]22)2)[(3k(3k 2

3)2( 2 aa

3]24)k122)[(9k(3k 2

3)6k122)(9k(3k 2

)2k41)3(3k(3k 2 =

= (3k+1)(3k2+4k+2)

Thus for any integer a, .

11

3)2k41)3(3k(3k 2

2( 2)3

a a

Page 12: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Show that square of any integer is of the type3k or 3k + 1.

Ans : Let a be any integer. a is of the type 3t or 3t+1 or 3t+2

∵ by division algorithmCase (i) a = 3t a2 = (3t)2 = 9t2 = 3(3t) = 3k where k = 3t.

Case (ii) a = 3t+1 a2 = (3t+1)2

= 9t2 +6t + 1 = 3(3t2+2t) + 1 = 3k + 1 where k = 3t2+2t.

12

Page 13: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Case (iii) a = 3t+2 a2 = (3t+2)2

= 9t2 + 12t + 4 = 9t2 + 12t + 3 + 1 = 3(3t2 + 4t + 1) + 1 = 3k + 1 where k = 3t2+4t+1.

Hence square of any integer is of the type3k or 3k + 1. 3k or 3k + 1.

13

Page 14: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Show that cube of any integer is of the type9k or 9k + 1 or 9k + 8.

Ans : Let a be any integer. a is of the type 3t or 3t+1 or 3t+2

by division algorithmCase (i) a = 3t a3 = (3t)3 = 27t3 = 9(3t3) = 9k where k = 3t3.

Case (ii) a = 3t+1 a3 = (3t+1)3

= 27t3 + 39t2 + 33t + 1 = 9(3t3 + 3t2 + t) + 1 = 9k + 1 where k = 3t3 + 3t2 + t.

14

Page 15: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Case (iii) a = 3t+2 a3 = (3t+2)3

= 27t3 + 39t22 + 33t4 + 8 = 9(3t3 + 6t2 + 4t) + 8 = 9k + 8 where k = 3t3 + 6t2 + 4t.

Hence cube of any integer is of the type9k or 9k + 1 or 9k + 8.

Greatest common divisor : Let a , b not both zero. A positive integer d is called gcd of a & b if,i) d|a , d|bii) c|a , c|b c ≤ d.Notation : gcd of a & b is denoted by ,

gcd(a , b) or (a , b).

15

Page 16: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Theorem : Let a , b not both zero. Prove that gcd(a , b) is of the type ax + by for some x , y . Proof : Denote S = {ax + by : x , y , ax + by > 0} .We have either a 0 or b 0. aa + bb = a2 + b2 > 0. aa + bb S S Hence by well ordering principle,

Hence by well ordering principle, S has the smallest element say d.

d = ax + by S where x , y d > 0 - - - - - - - (i)

By division algorithm there exist q , r such thata = qd + r where 0 ≤ r < d - - - - - - - (ii)

16

Page 17: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

If r 0, then r = a – qd= a – q(ax + by)= a – qax – qby= a(1 – qx) + b(- qy) > 0

r S. d ≤ r ∵ d is the smallest element in S.

Which is a contradiction ∵ r < d Which is a contradiction r < d hence r = 0. a = qd ∵ by (ii) d|a.

Similarly d|b - - - - - - - - (iii) Now let c|a , c|b

a = λc , b = μc for some λ , μ .

17

Page 18: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

From (i) d = ax + by

= λcx + μcy= c(λx + μy)

cǀd c ≤ d ∵ d > 0

ie cǀa , cǀb c ≤ d - - - - - - - (iv) From (i) , (iii) & (iv)From (i) , (iii) & (iv)

gcd(a , b) = d = ax + by.

18

Page 19: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Theorem : Let a , b not both zero. Prove that T = {ax + by : x , y }

is precisely the set of all multiples of gcd(a , b). Proof : Denote d = gcd(a , b).By above theorem, d = ax0 + by0 for some x0 , y0 . Denote W = {αd : α }.Let z W z = αd for some α

z = αd for some α z = α(ax0 + by0)

= a(αx0) + b(αy0) T.

Thus W T - - - - - - - (i) Now let t T

t = ax + by for some x , y - - - - - - - - - - - (ii)19

Page 20: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

We have d = gcd(a , b) d|a , d|b a = dβ & b = dμ for some β , μ .

By (ii) , t = dβx + dμy= d(βx + μy) W.

Thus T W - - - - - - - - - - - (iii)From (i) & (iii) , T = W

From (i) & (iii) , T = W T = {ax + by : x , y }

is precisely the set of all multiples of gcd(a , b).

Relatively prime integers : Two integers a & b are said to be relatively prime if gcd(a , b) = 1

20

Page 21: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Eg : 1) gcd (-7 , 10) = 1. -7 & 10 are relatively prime integers.

2) gcd (4 , 10) = 2 1. 4 & 10 are not relatively prime integers.

Example : Let a , b . Prove that a & b are relatively prime integers if and only if there exist x , y such that ax + by = 1.Ans : Let a , b be relatively prime integers.

Ans : Let a , b be relatively prime integers. gcd (a , b) = 1. ax + by = 1 for some x , y .Conversely suppose that, ax + by = 1 for some x , y .Let d = gcd (a , b)

d|a & d|b d|ax + byd|1

21

Page 22: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

d = 1 d = 1 ∵ d = gcd (a , b) > 0 gcd (a , b) = 1

Hence a & b are relatively prime integers.

22

Page 23: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Let a , b Z. If gcd(a , b) = d, then show that

= 1

Ans : Let gcd (a , b) = d. d|a & d|b

gcd ,a bd d

d,

dba

Now d = gcd (a , b) d = ax + by for some x , y

= 1.

23

d,

d

yb

xa

dddd y

bx

add

1

gcd ,a bd d

Page 24: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Let a|c , b|c & gcd(a , b) = 1, then show that ab|c. Ans : a|c , b|c c = αa , c = βb , for some α , β - - - - (i)Now gcd(a , b) = 1 1 = ax + by for some x , y

c = c(ax + by) = cax + cby= βbax + αaby= ab(βx + αy)

ab|c.

ab|c.Euclid’s Lemma : If a|bc & gcd(a , b) = 1, then show that a|c.Proof : Let a|bc & gcd(a , b) = 1.

1 = ax + by for some x , y c = c(ax + by) - - - - - - - - - (i)

Now a|a , a|bc a|acx + bcy a|c ∵ by (i)

24

Page 25: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : For any integer a, show that gcd(2a + 1 , 9a + 4) = 1.

Ans : Let d = gcd(2a + 1 , 9a + 4) d|2a+1 , d|9a+4 d|9(2a+1) , d|2(9a+4) d|18a+9 , d|18a+8 d|2a+1 , d|9a+4 d|18a+9 – (18a+8) d|18a+9 – (18a+8) d|1 d = 1 ∵ d > 0 gcd(2a + 1 , 9a + 4) = 1.

25

Page 26: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Let a , b not both zero. Prove that gcd(a , b) = d iff i) d > 0, d|a , d|b ii) c|a , c|b c|d.

Ans : Let gcd(a , b) = d d = ax + by for some x , y - - - - - - - - (i)

i) Now d = gcd(a , b) d|a , d|bii) Now c|a , c|b c|ax + by

c|dConversely suppose that d > 0, d|a , d|b & c|a , c|b c|d.

Conversely suppose that d > 0, d|a , d|b & c|a , c|b c|d. To show d = gcd(a , b)given that d|a , d|bc|a , c|b c|d given

c ≤ d ∵ d > 0 gcd(a , b) = d.

26

Page 27: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Let a = bq + r where a , q , b , r , b 0. Show that gcd(a , b) = gcd(b , r).

Ans : Let d = gcd(a , b) d|a , d|b d|a – qb d|r ∵ a = qb + r r = a – qb

Thus d is a common divisor of b & r - - - - - - - - (i)Let c|b , c|r

Let c|b , c|r c|qb + r c|a ∵ a = qb + r

ie c|a , c|b , c ≤ gcd(a , b) c ≤ d c|b , c|r c ≤ d - - - - - - - - - (ii)

From (i) & (ii) d = gcd(b , r) .

gcd(a , b) = gcd(b , r) 27

Page 28: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Euclidean algorithm to find gcd : Let a , b , b 0.By division algoritham we have,

a = bq1 + r1 , 0 < r1 < |b| - - - - - - - - - (1)b = r1q2 + r2 , 0 < r2 < r1 - - - - - - - - - - (2) r1 = r2q3 + r3 , 0 < r3 < r2 - - - - - - - - - - (3) r2 = r3q4 + r4 , 0 < r4 < r3 - - - - - - - - - - (4)

- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - -

rn-3 = rn-2qn-1 + rn-1 , 0 < rn-1 < rn-2 - - - - - (n-1) rn-2 = rn-1qn + rn , 0 < rn < rn-1 - - - - - - - (n) rn-1 = rnqn+1 + 0 - - - - - - - - - (n+1)

Prove that gcd(a , b) = rn .

28

Page 29: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Proof : d = gcd(a , b) ∵ by eqn (1) and above theorem= gcd(b , r1) ∵ by eqn (2) = gcd(r1 , r2) ∵ by eqn (3) = gcd(r2 , r3) ∵ by eqn (4) = - - - - - - - - -= - - - - - - - - -= - - - - - - - - -= gcd(rn-1 , rn) ∵ by eqn (n) = gcd(rn-1 , rn) by eq (n) = gcd(rn , 0) ∵ by eqn (n+1) = rn

gcd(a , b) = rn .

29

Page 30: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Find gcd(71 , 289) by using Euclidean algorithm. Ans : 289 = 71 4 + 5

71 = 5 4 + 15 = 1 5 + 0

gcd(71 , 289) = 1 . Example : Find gcd(12379 , 3054) & express it in the form of

12378x + 3054yAns : (i) 12378 = 3054 4 + 162 - - - - - - - - - - (1) Ans : (i) 12378 = 3054 4 + 162 - - - - - - - - - - (1)

3054 = 162 18 + 138 - - - - - - - - - - (2) 162 = 138 1 + 24 - - - - - - - - - - - - (3) 138 = 24 5 + 18 - - - - - - - - - - - - - (4)

24 = 18 1 + 6 - - - - - - - - - - - - - - (5) 18 = 6 3 + 0

gcd(12379 , 3054) = 6 .

30

Page 31: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

(ii) From eqn (5) ,6 = 24 – 18

= 162 – 138 – (138 – 24 5)= 162 – 2 138 + 5 24= 12378 – 4 3054 – 2 (3054 – 18 162)

+ 5 (162 – 138)= 12378 – (4 + 2) 3054 + (36 + 5) 162 – 5 138 = 12378 – 63054 + 41(12378 – 43054) = 12378 – 63054 + 41(12378 – 43054)

– 5(3054 – 18 162) = (41 + 1)12378 + (– 6 – 164 – 5)3054 + 90 162= 4212378 – 1753054 + 90 (12378 – 43054) = (42 + 90)12378 + (– 175 – 360)3054 = 13212378 + (– 535)3054 = 12378 x + 3054 y where x = 132 & y = – 535

31

Page 32: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Let k & a , b not both zero. Show that gcd(ka , kb) = k gcd(a , b) .

Ans : Without loss of generality assume that b 0. By repeation of division algorithm we get,

a = bq1 + r1 , 0 < r1 < |b| b = r1q2 + r2 , 0 < r2 < r1r1 = r2q3 + r3 , 0 < r3 < r2r2 = r3q4 + r4 , 0 < r4 < r3

r2 = r3q4 + r4 , 0 < r4 < r3- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - -

rn-3 = rn-2qn-1 + rn-1 , 0 < rn-1 < rn-2rn-2 = rn-1qn + rn , 0 < rn < rn-1rn-1 = rnqn+1 + 0 gcd (a , b) = rn. - - - - - - - - - - - (i)

32

Page 33: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

By multiplying k to above equations we get, ka = kbq1 + kr1 , 0 < kr1 < k|b| kb = kr1q2 + kr2 , 0 < kr2 < kr1kr1 = kr2q3 + kr3 , 0 < kr3 < kr2kr2 = kr3q4 + kr4 , 0 < kr4 < kr3

- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - -

krn-3 = krn-2qn-1 + krn-1 , 0 < krn-1 < krn-2krn-2 = krn-1qn + krn , 0 < krn < krn-1krn-1 = krnqn+1 + 0

By Euclidean algorithm, gcd (ka , kb) = krn

= k gcd (a , b) .

33

Page 34: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Given an odd integer a, show that a2 + (a + 2)2 + (a + 4)2 + 1 is divisible by 12.

Ans : Let a be an odd integer a = 2k + 1 for some k .

Consider, a2 + (a + 2)2 + (a + 4)2 + 1

= (2k + 1)2 + (2k + 1 + 2)2 + (2k + 1 + 4)2 + 1= 4k2 + 4k + 1 + 4k2 + 12k + 9 + 4k2 + 20k + 25 + 1

= 4k + 4k + 1 + 4k + 12k + 9 + 4k + 20k + 25 + 1= 12k2 + 36k + 36= 12(k2 + 3k + 3)

12| a2 + (a + 2)2 + (a + 4)2 + 1 a2 + (a + 2)2 + (a + 4)2 + 1 is divisible by 12.

34

Page 35: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Show that 8|52n + 7 for all n ≥ 1. Ans : Proof is by induction on n.

If n = 1, then 52n + 7 = 52 + 7 = 32 = 8 4 8|521 + 7

Result is true for n = 1. Assume the result is true for n 8|52n + 7 - - - - - - - - - - - - - - (i)

Now 52(n+1) + 7 = 52n 52 + 7Now 5 + 7 = 5 5 + 7= 52n52 + 527 – 527 + 7 = 52(52n + 7) – 7(52 – 1) = 52(52n + 7) – 724 - - - - - - (ii)

By (i) & (ii), 8| 52(52n + 7) – 724 8| 52(n+1) + 7

Hence by principle of mathematical induction 8| 52(n+1) + 7 for all n ≥ 1.

35

Page 36: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Show that gcd(a , m) = 1 = gcd(b , m) gcd(ab , m) = 1

Ans : Let gcd(a , m) = 1 = gcd(b , m) 1 = ax + my & 1 = bz + mw for some x , y , z , w

Now 1 = 11 = (ax + my ) (bz + mw)= abxz + axmw + mybz + mymw= ab(xz) + m(axw + ybz + ymw)

= ab(xz) + m(axw + ybz + ymw) gcd(ab , m) = 1

Conversely suppose that gcd(ab , m) = 1 1 = abx + my for some x , z

= a(bx) + my= gcd(a , m)

gcd(a , m) = 1Similarly gcd(b , m) = 1.

36

Page 37: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : If gcd(a , b) = 1 & n , m , then show that (i) gcd(an , b) = 1

(ii) gcd(a , bn) = 1 (iii) gcd(an , bm) = 1

Ans : (i) Proof is by induction on nFor n = 2 we have

gcd(a , b) = 1 = gcd(a , b) gcd(aa , b) = 1 gcd(a2 , b) = 1

gcd(a , b) = 1 Assume the result for k

gcd(ak , b) = 1 Now gcd(ak , b) = 1 & gcd(a , b) = 1 gcd(aka , b) = 1

gcd(ak+1 , b) = 1 Hence by principle of mathematical induction

gcd(an , b) = 1 for all n . On the similar lines we have the proof of (ii) & (iii).

37

Page 38: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : If gcd(a , b) = 1, then show that gcd(a + 2b , 2a + b) = 1 or 3

Ans : Let gcd(a , b) = 1 Let d = gcd(a + 2b , 2a + b)

d|a+2b & d|2a+bd|2(a+2b) – (2a+b) d|2a+4b – 2a – b d|3bd|3b

Similarly , d|3aHence d|gcd(3a , 3b)

d|3gcd(a , b) d|3 ∵ gcd(a , b) = 1 d = 1 or d = 3 gcd(a + 2b , 2a + b) = 1 or 3

38

Page 39: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : If gcd(a , b) = 1, then show that gcd(a + b , a2 – ab + b2) = 1 or 3

Ans : Let gcd(a , b) = 1 Let d = gcd(a + b , a2 – ab + b2)

d|a+b & d| a2 – ab + b2

d|(a+b)2 – (a2 – ab + b2) d|a2 + 2ab + b2 – a2 + ab – b2

d|3abd|3abNow d|a+b , d|3ab d|3b(a+b) – 3ab d|3b2

Similarly d|3a2

Hence d|gcd(3a2 , 3b2) d|3gcd(a2 , b2) d|3 ∵ gcd(a , b) = 1 gcd(a2 , b2) = 1d = 1 or d = 3 gcd(a + b , a2 – ab + b2) = 1 or 3

39

Page 40: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Least common multiple : Let a , b – {0}. A positive integer m is called lcm of a & b if,i) a|m , b|mii) a|c , b|c m ≤ c, where c > 0.Notation : lcm of a & b is denoted by ,

lcm(a , b) or [a , b].Theorem : Let a , b . Show that

lcm(a , b) gcd(a , b) = ab.

lcm(a , b) gcd(a , b) = ab.Proof : Denote d = gcd(a , b)

d|a , d|ba = rd , b = sd for some r , s - - - - - - (i)

Denote = m

40

dab

Page 41: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

m = = = rb

and m = = = as.

Hence b|m , a|m - - - - - - - - - - - - - - (ii) Now d = gcd(a , b) d = ax + by for some x , y Now let a|c , b|c ( c > 0)

drdb

dab

dab

dasd

Now let a|c , b|c ( c > 0)

c = aα , c = bβ where α , β

Now = c = c = c = x + y

= βx + αy ∵ c = aα , c = βb

∵ α , β , x , y 41

mc

m1

abd

abbyax

bc

ac

mc

Page 42: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

m|cm ≤ c

ie a|c , b|c m ≤ c - - - - - - - - - - - - - - (iii) From (ii) & (iii) m = lcm(a , b)

= lcm(a , b)

ab = d lcm(a , b)

dab

ab = d lcm(a , b) = lcm(a , b) gcd(a , b) .

Note : Let a , b – {0} . Show that lcm(a , b) gcd(a , b) = |ab|.

42

Page 43: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Let a , b – {0} , k > 0. Show that lcm(ka , kb) = k lcm(a , b).

Ans : lcm(ka , kb) =

=

kb) , gcd(ka|| kakb

b) , kgcd(a||kk ab

=

= k lcm(a , b)

43

b) , gcd(a||k ab

Page 44: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Find lcm(3054 , 12378).

Ans : We know that gcd(3054 , 12378) = 6.By above theorem,

lcm(3054 , 12378) = 12378) , gcd(3054 12378 3054

12378 3054=

= 509 12378

= 6300402

44

6 12378 3054

Page 45: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Let a , b – {0} and a|c , b|c . Show that lcm(a , b)|c.

Ans : Denote lcm(a , b) = t > 0 and a|c , b|c . By division algorithm,

c = qt + r where 0 ≤ r < t - - - - - (i) Suppose that r 0.

0 < r < t - - - - - (ii) By (i), r = c – qt

By (i), r = c – qt Now lcm(a , b) = t a|t , b|t

a|c – qt , b|c – qt ∵ a|c , b|c a|r , b|r lcm(a , b) ≤ r t ≤ r

Which is a contradiction to (ii). Hence r = 0. t|m lcm(a , b)|m

45

Page 46: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Diophantine equations : A linear equation of the type ax + by = c is called Diophantine equation, where a , b (not both zero) , c . Solution of Diophantine equation : A pair (x0 , y0) of integers such that ax0 + by0 = c is called a solution of Diophantine equation ax + by = c.Theorem : (i) Prove that a Diophantine equation ax + by = c has a solution iff d|c where d = gcd(a , b)

has a solution iff d|c where d = gcd(a , b) (ii) If (x0 , y0) is a solution of ax + by = c , then any other solution (x΄ , y΄) of ax + by = c is given by

x΄ = x0 + t , y΄ = y0 – t

where t & d = gcd(a , b).

46

db

da

Page 47: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Proof : (i) Let d = gcd(a , b) Assume that ax + by = c has a solution say (x0 , y0).

ax0 + by0 = c Now d = gcd(a , b) d|a , d|b

d| ax0 + by0 d|c

Conversely suppose that d|c c = dt c = dt

Now d = gcd(a , b) ar + bs = d for some r , s (ar + bs)t = dt a(rt) + b(st) = c ∵ dt = c ax0 + by0 = c where x0 = rt , y0 = st ax + by = c has a solution (x0 , y0).

47

Page 48: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

(ii) Let (x0 , y0) be a solution of ax + by = c and (x΄ , y΄) be any other solution of ax + by = c

ax0 + by0 = c and ax΄ + by΄ = c ax0 + by0 = ax΄ + by΄ ax΄ - ax0 = by0 - by΄ a(x΄ - x0) = b(y0 - y΄)

Divide by d where d = gcd(a , b)

a b (x΄ - x0) = (y0 - y΄) - - - - - - - - - - - - - (i)

(x΄ - x0)

(x΄ - x0) ∵ gcd ( , ) = 1

48

da

db

db

da

db

db

da

Page 49: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

x΄ - x0 = t

x΄ = x0 + t

Also by (i ) (y0 – y΄)

(y0 – y΄) ∵ gcd ( , ) = 1

db

db

da

db

da

da

db (y0 – y΄) gcd ( , ) = 1

y0 – y΄ = t

y΄ = y0 - tThus any other solution of ax + by = c is given by

x΄ = x0 + t , y΄ = y0 - t where t .49d

adb

d

da

da

d d

Page 50: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Determine the solutions in the integer of56x + 72y = 40.

Ans : 72 = 561 + 16 - - - - - - - - - - (i) 56 = 163 + 8 - - - - - - - - - - (ii)

16 = 82 + 0 gcd(72 , 56) = 8 & 8|40 56x + 72y = 40 has solutions.

By (ii) , 8 = 56 – 16 3By (ii) , 8 = 56 – 16 3= 56 – (72 – 56) 3 = 56 – 723 + 563 = 4 56 + (- 3)72

Multiply by 5 8 5 = 5 4 56 + 5 (- 3)72

= 20 56 + (- 15)72 It is of the type ax0 + by0 = c

50

Page 51: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

x = x0 = 20 , y = y0 = - 15 is a solution of 56x + 72y = 40. All other solutions of 56x + 72y = 40 are given by

x΄ = x0 + t , y΄ = y0 – t

where d = gcd(a , b) = gcd(56 , 72) = 8.

ie x΄ = 20 + t = 20 + 9t

da

db

872ie x΄ = 20 + t = 20 + 9t

and y΄ = - 15 - t = -15 -7t , for all t .

51

8

856

Page 52: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Determine the solutions in the integer of221x + 35y = 11.

Ans : 221 = 356 + 11 - - - - - - - - - - (i) 35 = 113 + 2 - - - - - - - - - - (ii)

11 = 52 + 1 - - - - - - - - - - (iii) 2 = 12 + 0

gcd(221 , 35) = 1 & 1|11 221x + 35y = 11 has solutions. 221x + 35y = 11 has solutions.

By (iii) , 1 = 3 – 2 1= (35 – 11 3) – (11 – 32) = 35 – 11 4 + 32 = 35 – 4(221 – 356) + (35 – 113)2 = 27 35 – 4 221 – 6 11= 27 35 – 4 221 – 6 (221 – 356)= (– 10) 221 + 63 35

52

Page 53: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

111 = (-10)11221 + 631135 (by multiplying by 11) 11 = (-110) 221 + 69335 It is of the type ax0 + by0 = c

x = x0 = -110 , y = y0 = 693 is a solution of 221x + 35y = 11.All other solutions of 221x + 35y = 11 are given by

x΄ = x0 + t , y΄ = y0 – t db

da

where d = gcd(a , b) = gcd(221 , 35) = 1.

ie x΄ = -110 + t = -110 + 35t

and y΄ = 693 - t = 693 - 221t , for all t .

53

135

1221

Page 54: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Determine the solution in positive integers of18x + 5y = 48.

Ans : 18 = 53 + 3 - - - - - - - - - - (i) 5 = 31 + 2 - - - - - - - - - - (ii)

3 = 21 + 1 - - - - - - - - - - (iii) 2 = 12 + 0

gcd(18 , 5) = 1 & 1|48 18x + 5y = 48 has solutions. 18x + 5y = 48 has solutions.

By (iii) , 1 = 3 – 2 1= 18 – (5 3) – (5 – 3) = 18 – 45 + 3 = 18 – 45 + (18 – 53) = 2 18 – 75

1 48 = 48 2 18 – 7 48 5 (by multiplying by 48) 48 = 96 18 – 336 5

54

Page 55: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

It is of the type ax0 + by0 = c x = x0 = 96 , y = y0 = – 336 is a solution of 18x + 5y = 48.All other solutions of 18x + 5y = 48 are given by

x΄ = x0 + t , y΄ = y0 – t

where d = gcd(a , b) = gcd(18 , 5) = 1.

db

da

5ie x΄ = 96 + t = 96 + 5t

and y΄ = – 336 - t = – 336 – 18t , for all t .

In order to find positive solutions we take t = - 19 Hence positive solution is

x΄ = 96 + 5(-19) = 1 , y΄ = – 336 – 18(-19) = 655

15

118

Page 56: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : Determine all solutions in positive integers of54x + 21y = 906.

Ans : 54 = 212 + 12 - - - - - - - - - - (i) 21 = 121 + 9 - - - - - - - - - - (ii)

12 = 91 + 3 - - - - - - - - - - (iii) 9 = 33 + 0

gcd(54 , 21) = 3 & 3|906 54x + 21y = 906 has solutions. 54x + 21y = 906 has solutions.

By (iii) , 3 = 12 – 9 1= 54 – (21 2) – (21 – 12) = 54 – 321 + 12 = 54 – 321 + 54 – (212) = 2 54 – 521

Multiply by 302 3023 = 230254 – 530221

56

Page 57: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

906 = 604 54 + (– 1510)21 It is of the type ax0 + by0 = c x = x0 = 604 , y = y0 = – 1510

is a solution of 54x + 21y = 906.All other solutions of 54x + 21y = 906 are given by

x΄ = x0 + t , y΄ = y0 – t db

da

where d = gcd(a , b) = gcd(54 , 21) = 3.

ie x΄ = 604 + t = 604 + 7t

and y΄ = – 1510 - t = – 1510 – 18t , for all t .

57

321

354

Page 58: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

In order to find positive solutions we take (i) t = - 84

Hence positive solution is x΄ = 96 + 7(-84) = 16 , y΄ = – 1510 – 18(-84) = 2.

(ii) t = - 85Hence positive solution is x΄ = 96 + 7(-85) = 9 , y΄ = – 1510 – 18(-85) = 20.

(iii) t = - 86 (iii) t = - 86 Hence positive solution is x΄ = 96 + 7(-86) = 2 , y΄ = – 1510 – 18(-86) = 38.

58

Page 59: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

Example : A costumer bought a dozen pieces of fruits apples & oranges for $ 1.32. If an apple costs 3 cents more than orange and more apple than oranges were purchased. How many pieces of each kind were bought. Also find cost of apples and oranges.Ans : Let x be the number of apples and y be the number of oranges. Let z represent the cost in cent’s of an orange .

x + y = 12 and x + y = 12 and (z + 3)x + zy = 132

zx + 3x + zy = 132 z(x + y) + 3x = 132 12z + 3x = 132 4z + x = 44

It is of the type x + 4z = 44Which is a Diophantine equation of the type ax + bz = c.

59

Page 60: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

gcd(1 , 4) = 1 and 1 = (-3)1 + 14 44 = 44(-3) + 444 44 = -1321 + 444 x0 = -132 & z0 = 44

Other solutions are

x΄ = x0 + t , z΄ = z0 – t db

da

where d = gcd(a , b) = gcd(1 , 4) = 1.

ie x΄ = -132 + t = -132 + 4t

and z΄ = 44 - t = 44 – t , for all t .

60

14

11

Page 61: JNC TYBSc Number Theory · 2017-10-05 · Æ u o W> U X / ( P ~ U A U Z v Z } Á Z A í v W> P ~ U A X. Æ u o W> n U n P ~ U A í U Z v Z } Á Z n X ]] n

But given that 6 < x ≤ 12 ie 6 < -132 + 4t ≤ 12t = 35 , 36Case (i) : t = 35

x΄ = 8 , z΄ = 9 Thus x = 8 , y = 4

cost of each apple is (z΄ + 3)= 9 + 3 = 12 cost of all apples = 8 12 = 96 cost of all apples = 8 12 = 96Also cost of each orange is z΄ = 9 cost of all oranges = 4 9 = 36Case (ii) : t = 36

x΄ = 12 , z΄ = 8 Thus x = 12 , y = 0

cost of each apple is (z΄ + 3) = 8 + 3 = 11 cost of all apples = 11 12 = 132.

61