You are on page 1of 25

3.

26 Algebra and Number Theory

WORKED EXAMPLES
EXAMPLE1
From the pattern.
1.9+2 1
12.9+3 111
123.9+4 1111
1234.9+5=11111

Write down the nth row and prove the validity of the number pattern.
Solution.
From the given pattern we find the h row is 1-2-3.4-5...n-9+(n+1) [111.
=

n+1 ones

L.H.S =12:3.4...n.9+(n+1)
=91(10- +2(10-)+..+(n-1)-10+n-1+(n+1)
= (10-1)10-+2.10"..+(n-1)-10+n]+(n+1)
= 10" +210"-+3.10-+..+(n-1)-10+n-10
-(10+210 . +(n-1)-10+ n)+(n+1)
= 10" +10-+10"4+.+10-n+n+1
=
10"+10" +10"++ 10+1
= 111.! = R.H.S
(using place value)
(n+1) ones

EXAMPLE 2
Using the number pattern
-0=1
22-1=3
33-2 5
4-3 =7

Make a conjecture about rown and provethe conjecture.


Solution.
From the given number pattern, we find the nth row is

n-(n- 1? = 2n - 1.
Divisibility Theory and Canonical Decompositions 3.27

the conjecture is

n- (n 1? =2n-1 Vn20
L.H.S=-(n-12
=n-(n-2n+1)=2n-1= R.H.S
EXAMPLE 3

Given the pattern

9.9+7 88
98-9+6= 888
987.9+5= 8888

Find the formula for the nth row and prove it.

Solutdon.
Observing the pattern, we find the nth tow is

987...(10-n) 9+(8-n) =88..8, 1snS8


(n+l) eight

L.H.S 987..10-n).9+(8-n)
=
9-[9-10+8-10-2 +7.10+...+(11-n)-10
+(10-n)-1+(8-n)
=(10-1)[9-10-+8-10+7-10+..+(11-m)-10
+(10-n)-1]+(8-n)]
=9.10" +810 +7-10 +(11-n) 10 +(10-n)-10
-(9-10"+8.10 +(11-n)-10+(10-n)+(8-n)
= 9-10-(10"+10-+..+10)-(10-n)+8-n
= 10-10"-(10" +10"-l+..+10+1)-1

10 10**-1)

107+1

-9-1010+1-9
3.28 Algebra and Number Theory

10-8]-5ho-
R.H.S= 888..8
(n+1) eights
8-10" +8-10-+8-10-+...+8.10+8

=810"+10-+..10+1
10-1
-10-io-)10-1
L.H.S R.H.S

EXAMPLE 4
Observing the pattern of numbers write down the formula for the nth row and prove it.

1-8+1 9
12-8+2 98
123.8+3=987
1234-8+4 9876

Solution.
From the given number pattern, we find the nth row is
123 ..nx8+n =987... (10-n), 1Sn9
L.H.S= 123...n-8+n
=810+210+3-10+...+(n-1)i0+n-1|+n
Let S =10+2.107-+3.10 . +(n-1) 10+n 1] (1
S=n-1+(n-1).10+... +3.10- +2-10"-2+10"-
It is arithmetic
an
geometric series with the common ratio of the G.P part is 10.
Multiplying (1) by 10. We get
10S =n-10+(n-1)10+.+2.107-+10" (2)
(1)-(2)
9S=n-(10+10 +10-l +10")
=n-10 10-1 )

s0-
Divisibility Theory and Canonical Decompositions 3.29

LHS 1o"
81 -1)-*n
(0-1)-*n=o-i)+
81

R.H.S 9876.(10-n) [no. of factors = 9-(10-n) +1 =n]

9-10-+8-102+7-10- +...+(11-n)-11+(10-n)-1
Let

S=(10-n)l+(11-n)-10+.. +8-10"+9.10- (1)


This is an arithmetic geometric series with the common ratio of the G.P. part is 10.
Multiplying by 10, we get
10S =
(10-n)10+(11-n)10 +...+8-10-+9-10" (2)
(1)-(2)
-9S = (10-n)+(10+ 10+10-)-9-10"
=
(10-n)+(10+10 +. +107- +10") -10-10"

=(10-m)+10 10
=10-n+a0"-1)-10*
= 10-n+E(10"* -10-9-10*)

90-9-10-8-10+
=80-80-10 -9
(1-10)-n
S1-10)5
R.H.S o"-1)+
81

Hence L.H.S R.H.S.


3.30 Aigebra and Number Theory

3.5 PRIME AND COMPOSITE NUMBERS


An important concept based on divisibility is the concept of a prime number. Prime numbers are th
building blocks of integers as the fundamental theorem of arithmetic shows. It states that every intea
greater than I can be written uniquely as the product of prime numbers. Prime numbers have becom
ne
essential in modern cryptography.

Definition 3.4 A positive integer p> I is called a prime if its only positive factors are I and p.
Ifp> I is not a prime, then it is called a composite number (or simply composite).
Itis obvious, the integer n is composite if and only if there exists an integer a such that a
and I <a <n.
For example, 5 is prime because its only positive factors are I and 5.
But 6 is a composite number because it has 2 and 3 as factors.
Note that by definition the integer 1 is neither a prime nor a composite number.
l is just the multiplicative identity or unit.
Theorem 3.5 Every integer n 2 2 has a prime factor.

Proof We prove the theorem by strong principle of induction on n.


Ifn =2, then the statement is true. Since 2 is a prime and2 is a factor of 2.
Assume the statement is true for all integers upto k, k> 2.
To prove it a true for k+ 1.
Ifk+1 is a prime, then k + 1 is a prime factor of k + 1.
Ifk +1 is not a prime, then k+ I must be a composite number.
So, it must have a factor d, where d S k. Then by the induction hypothesis, d has a prime factorp.
Since p|d and have p|k+1. Sop is a
d|k+1,we factorof k+1.
Hence by second principle of induction the statement is true for every integer> 1.
i.e., every integer 2 2 has a prime factor.
Prime numbers were studied in ancient times for philosophical reasons.
Today prime numbers
are studied for practical use, especially in cryptography. The famous mathematician Euclid, in
centaury BC, proved that there are infinitely many primes.

Theorem 3.6 Euclid AU 2013, 20171


There are infinitely many primes.
Proof We prove by contradiction method.
Assume that there are only n primes p. P2. Pp wheren is finite.
Now consider the integer m
=P P2 *P3»..,Pnti
Since m > 1, by Theorem 3.5, m has a prime
factor p.
But none of the primes p,P 2 , P, divide m
For, if p l m and since pilP P2'." Pi"Pu
We get p m- P1, which
PhP2..Pn is not true and hence a contradiction.
Pm
So, we have a prime p which is not in the list of n primes.
Thus we have n + 1 primes p1,P2, Pn» P.
Divisibility Theory and Canonical Decompositions
3.31

Which contradicts the assumption there are only n primes.


So, our assumption of finiteness is wrong.
Hence the number of primes is infinite.
A natural question now arises is that given an integer 2 2, can we say it is prime or noe?
The next theorem enables us to answer this question.

Theorem 3.7 Every composite number n has a prime factor sVn|.

Proof Given n is a composite number.


Then there exist positive integers a and b such that n = ab, where 1 <a<n, 1 <b<n.
We will now prove a svn or b S Vn.
Suppose a> vn and b> yn
Then a-b> vn vn =n n>n,which is impossible.
either as n or bsn

asorbs[ ( a, b are integers)


We know [by Theorem 3.5] that every positive integer 2 2 has a prime factor.
Any such factor of a or b is also a factor of a x b n.
=

So, n must have a prime factor | Vn

Note From this theorem it follows that if n has no prime factor n , then n is a prime
(contrapositive statement p > q 7 q > 7p)

WORKED EXAMPLES

EXAMPLE1
Show that 101 is a prime.

Solutdon.
Given number is 101.
First we find all primes s|V101=10. The primes are 2, 3, 5, 7.
Since none of these is a factor of 101, (by the above note), we get 101 is a prime.

EXAMPLE 2
Determine whether 1601 is a prime.

Solutlon.
Given number is 1601
First we find all primes V1601= 40o.
31 and 37.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
The primes arethat
We can verify
none is a factor of 1601.
of them
Hence 1601 is a prime.
3.32 Algebra and Number Theory

EXAMPLE 3
Determine 1001 is a prime.
Solution.
Given number is 1001. To prove it is a prime.

First we find allprimes sVi001=31


The primes are 2, 3, 5, 7, 11, 13, 19, 23, 29, 31.
We find 7 | 1001. Hence 1001 is not a prime.

EXAMPLEE4
Find the smallest prime factor of 119.

Solution.
Given number is 119.
We have to find the smallest prime factor of 119.

Firstwefindallprimes s19=10
The primes are 2, 3, 5,7.
We find 7|119.
So, the smallest prime dividing 119 is 7.

Definition 3.5 Letr be a positive real number. Then mr) denote the number of primes Sx.
For example n(10) = 4 (:2,3,5,7 are the primes s 10)
r(18.75) =7 (: 2,3,5,7,11,13,17 are the primes S 18.75)
If n is a positive integer, then by using inclusion-exclusion principle we state a formula for
the number of primes Sn.
mn
Theorem 3.8 Letp.Pzs.mP, be the primes sn.Then the number of primes Sn is mn) and

rn)=n-1+z(Vn)-
ikj<k|PiPjP*

+(-1)
LPIP2P,J
EXAMPLE 5
Find the number of primes s 47 using Theorem 3.8.

Solutlon.
We have to find the number of primes 47.
Here n = 47, then n= y47 6 .
The primes s(V47) are 2, 3, 5.
Divisibility Theory and Canonical Decompositions 3.33

We know (Ja7)-.
m()=n-1+z(Vn)-
PP,PA
(47)= 47-1+m(V47-

46+3-(23+15+9)+(7+4+3)-1
49-47+14-1
= 15

EXAMPLE 6
Using the formula for {n) find the number of primes 100.

Solutdon.
We have to find the number of primes 100. Here n =
100, and vn =
V100 = 10.
The primes 10 are 2, 3, 5,7.

z(Vi00-4.
We know r(n) = n-1+z(Vn)-
PP P
T(100) =100-1+4-|100|

= 103-(50+33+20+14)+(16+10+7+6+4+2)-(3+1+2+0)-0
25

t h e number of primes 100 is 25.


Though the formula for un) gives the exact value of the number of primes, when n is large it is
practically impossible to find thee value of an).
The prime number theorem is one of the important results in number theory, which gives an
approximate value of {n), when n is large.
3.34 Algebra and Number Theory

Theorem 3.9 Prime number theorem

lim
r(x) 1
Ifx>0,then x

This means as x becomes very large r(x) approaches

In x
*It is known that 2,3 are the only consecutive integers that are primes.
Also it is known that 3, 5, 7 are the only three consecutive odd integers that are primes.
However, there are many consecutive integers that are composite members. This is given by the

next theorem.

Theorem 3.10 For every positive integer n, there are n consecutive integers that are composite

numbers.

Proof Let n be a positive integer and n 21.


To prove the existence, we have to construct suitably.
Consider the n consecutive integers
(n+1)!+2, (n +1)! +3,(n +1)! +4, .., (n+1)!+(n+1)
where n21.
Suppose k is an integer suchthat 2 SkSn+1, then k is a factor of (n + 1)!
[ (n +1)! =1-2 3 ... k...(n+ 1)
Now k|(n +1)! andk|k k|(n +1)!+k for every k.
: (n + 1)! +kis a composite number for k = 2, 3,.., (n +1).
Thus the n consecutive composite numbers are

(n+1)! +2, (n+ 1)! +3, (n+ 1)! +4, , (n+ 1)! +(+ 1)

wORKED EXAMPLES
EXAMPLE 1
Find five consecutive composite numbers. AU 2013
Solution.
Here n = 5.
We know the 5 consecutive composite integers are
(n+1)!+2,(n +1)! +3,(n + 1)!+4,(n + 1)! +5,(n + 1)! +6
Putn 5,

n+1!+2 =6!+2 = 720+2 722


(n+1)!+3 =6!+3 =720+3 723
Divisibility Theory and Canonical Decompositions 3.35

n+1)!+ 4 = 6! +4 =720+4 724

n+1)!+5 = 6!+5 = 720+5 725

(n+1)!+6 = 6! +6 = 720+6 726

the five consecutive composite numbers are

722, 723, 724, 725, 726.


EXAMPLE 2
Obtain six consecutive integers that are composite numbers. AU 2017
Solutlon.
Here n= 6.
Then the six consecutive composite numbers are
(n+1)!+2, (n+1)! +3, (n+1)!+4, (n +1)!+5, (n+1)!+6, (n+1)! +7

Put n= 6

(n+1)!+2= 7!+2 5040+2 = 5042

n+1)!+3 7!+3= 5040+3 5043

(n +1)!+4 7! +4 = 5040+4= 5044

(n+1)!+5= 7!+5 = 5040+5 = 5045

n+1)!+6=7!+6=5040 +6 5046

(n+1)!+7= 7!+7=5040 +7 5047


The six consecutive composite numbers are

5042, 5043, 5044, 5045, 5046 and 50474.

EXAMPLE 3
Find five consecutive integers < 100 that are composite numbers.

Solution.
5!= 120 > 100
Since
We consider
4!,4!+1, 4! +2, 4!+3, 4! +4,
numbers < 100.
24, 25, 26, 27, 28 are 5 consecutive composite
3.36 Algebra and Number Theory

3.6 GREATEST COMMON DIVISOR (GCD) ANDD


FUNDAMENTAL THEOREM OF ARITHMETIC
factor of two or more positive integers. In thie
divisibility concepts are used for finding
common
The
common divisor.
section, we are interested in finding greatest
integers a and b, not both zero, is the larges
The greatest common divisor (gcd) of est
two
Definition 3.6
positive integer that divides both a and b.
It is denoted by gcd (a, b) or (a, b).
For example
(12, 18)= 6, -15, 20) =5
(3,6)=3, -3,6)=3, (5,0) 5

and (12, 23) 1.


One way to find ged of two integers is to find all positive common divisions and then take the largest
common divisor.
For example, the common factors of 24 and 36 are 1, 2,3, 4, 5, 12, of which the largest is 12.
gcd (24, 36) = 12

Note Since gcd (a, -b) = gcd (-a, b) = gcd (-a, -b) =ged (a, b),
we confine our discussion of gcd to positive integers.
Now we give the symbolic definition of gcd.

Definition 3.7 A positive integer d is the gcd of integers a and b if

i) dla and d|b.


i) Ifcla and c|b, then c|d, where c is a positive integer.

Theorem 3.11 The gcd of two positive integers a and b is a linear combination of a and b.
ie., ifd=(a, b), then d= la + mb for some integers I and m. [AU 2013

Proof Let S= {xa+yb|xa+ yb >0, x, ye Z}.


Since a > 0, then a = 1a +0b e S
So, Sis non-empty set of positive integers.
Hence by well ordering principle S has a least positive integer d.
d la + mb for some integers I and m.
We shall now prove d = gcd (a, b).
Since d> 0, by division algorithm to a and d we can find integers q and r such that

a= qd+ r, 0Sr<d.

r=a-qd
=a-q (la + mb) = (1-q/)a + (-qm)b

This shows that r is a linear combination of a and b.


Ifr 0, then r> 0 and so r e S. Furtherr d.
DIVIsibility Theory and Canonical Decompositions 3.37

Hence we get a contradiction to the fact d is the least element of S.


r= 0. So, a = qd
dla
Similarly we can prove d | b.
Thus d is a common divisor of a and b.
ifcla and clb then c\la + mb
Hence d is gcd of a andb
cld.
d= (a, b)
Definition 3.8 Two positive integers a and b are relatively primeif their gcd is 1 ie (a, b) = 1.
For example the gcd (6, 25) I and 6 and 25 are
=
so relatively prime.
Corollary Two positive integers
1 and b
a are relatively prime if and only if there exist integers
a and B such that aa + Bb = 1.

Proof Ifa and b are relatively prime, then (a, b) = I.


Then, by Theorem 3.11, there exist integers a and B such that da + Bb = 1.
Conversely, let oa + Bb = 1.
To prove (a, b) = 1.
Ifd = (a, b), then dja and d|b

d oa+ Bb d|1
d=1 (as d> 0)
(a, b) = 1 > a and b are relatively prime.

Corollary 2 If alc and b|c and (a, b) = 1, then prove that ab|c.

Proof Given a c and b|c.


C=ma and c =nb for some integers m, n.
Also given (a, b) = 1 aa + Bb =F1 for some integers a and B(by cor.1)
Cac + Bbc = c

aa (nb) + Bb(ma) = c

(on + Bm)ab = c

ab|c
Note that a |bc does not mean a |b or alc
For example, 6|24 613 8.
But this does not mean that 6|3 or 6|8.

Corollary 3 Ifa and b are relatively prime and if a|be, then a|c.

Proof Given (a, b) = 1 oa +pb = I for some integers , B.


Since a | aac and a | be, we get a | Qac + Bbe
al (aa + Bb)e
al calc
3.38 Algebra and Number Theory

Theorem 3.12 Euclid's lemma


Ifp is a prime and p | ab then p |a orp | b.

Proof Given p is a prime andp | ab.


Ifp |a there is nothing to prove.
If pla, then we have to provep|b.
Sincep is a prime and pla, then (p, a) =1|
ap + pa =l for some integers o and B.
Multiply by b, then apb + ab = b

Since p | ab and p |pb we havep | opb + pab p|b(ap + Ba)

plb 1>p|b
Corollary 1 Ifp is a
prime and p | 4 *42 43. g
where a, a2, azs. , a, are positive integers,then p |4, for some i, 1siSn.

Proof We prove by first principle of induction


Let p(n) denote the statement p |a a ag... a pla, for some a,
Ifn =1,p(1) isp |a pl4; which is true. p(1) is true
Assume p(k) is true for an arbitrary k > 1.
i.., Pa1a2. ak pla, for some i, 1 Sisk.
To prove p(k + 1) is true.
1.e., to
prove pP|a a2. 4 k+1 pla, for some a; is true
Consider
p (a2. a) ag+1
Then Pla a2... a or p |ag+1, by Euclid's lemma.
Ifp la a2... a, then by induction hypothesis
pla, for some a, 1 Siak.
Thus
pla, 1siakorp|k+1
Hence Pla, 1Sisk+1 p l k + 1) is true.
Thus p(k) is true plk+ 1) is true.
Hence by first principle
of induction p(n) true for all n21.
is
We can extend the definition of
ged to more than two positive integers.
Definition 3.9 The
ged of n positive integers a, 42,
divide each a, wheren2 2. a, is the largest positive integer d tha
...,

We denote the gcd as


d=(4, a2, a,)
We remarked earlier that the
prime nunmbers are building blocks of integers. This means
integers are made up of prime numbers or every integer can be decomposed into tha
prime numbers.
Theorem 3.13 Fundamental theorem of arithmetic.
Every integer n (2 2) is either a prime or can be written
except for the order of the factors.
as a product of primes in only one wa
AU 2018
Divisibility Theory and Canonical Decompositions 3.39

Proof We prove by second principle of


Let p{n) denote the proposition n is
induction onn
To prove p(n) is true for all n 2 2.
a
prime or can be expressed as a product of primes.
Basis Step: Here n=2
p(2) is 2, which is a prime.
Thus p(2) is true.
Inductive Step: Assume that the proposition is true for all integers upto k, k>2.
i.., P(3), p(4), . p(k) are true.
To prove P(k + 1) is true.
i.e., to prove k + 1 is either a prime or is a product of
primes.
Ifk+1 is a prime, then we are through.
Ifk+ 1 is not a prime, then it is a composite number.
k+1=xy,where 1 <x<k+1, 1<y<k+1.
That is the integersx, y are S k.
So, by our induction hypothesis x and y are primes or product of primes.
k+l=xyis a product of two or more primes.
plk+ 1) is true.
second principle or strong principle ofinduction p{n) is true for all n22.
Thus every integer n (22) is either a prime or product of primes.
Next we prove uniqueness of the product.
Let n =p P2 P3 P, and n = qj 92 43 9 , be two factorisations ofn into product of
primes.
We shall prove r = s and every p, is some 4
1siSr, 1sjar.
We have P1 P2 P3' P,=91 92 *43* *9
Suppose r<s
Since PlP Pa P3*. P, we have pi lg42 9s*. 9, andpi is a prime

P must divide some P 1 4, as they are primes.


Divide both sides byp, we get
P2 P s P = 9192.4j-19j+14

Repeat this argument with P2» P3, Pr


Sincer<s, finally we get I = a product ofq's (the excess over r)
1.., 1=a product of primes, which is a contradiction.
.Ourassumption r<s is wrong r2s
Similarly ifs <r (arguing with q's instead ofp's)
We get a contradiction
s2r and hence r=s.

Hence the primes p. P2, P3s P, are the same as g. 9 2 , , in some order.
Thus the factorization is unique, except for the or
3.40 Algebra and Number Theory

This theorem is also known as unique factorization theorem for positive integers.
For example
2 250 2 240
240 2 3:5
5 125 2 120
250 2:5 5 25 2 60
5 2 30
These are called prime power decomposition.
Since the primes are written in increasing order, 3 15
these decompositions are called canonical decompositions. 5

Definition 3.10 Canonical decomposition


The canonical decomposition of a positive integer n is of the form n = p p22 P . P , where

P P2 Pr are distinct primes with pj P2 ...Pk and a,a2,., are positive integers.

WORKED EXAMPLES

EXAMPLE1
Find the canonical decompositions of
(i) 999
(i) 1024
(ii) 2520

Solution. 3 999 2 1024 2 2520


(i) 999 =3 3 3.37=33.37
(ii) 1024 =2 32=2-23=210
3 333 2 512 2 1260

(ii) 2520=23 33.7 3111


37
2
2
256
128 3
630
315
These are canonical decompositions.
We can use canonical decompositions
2 64 3 63
to find gcd of two positive integers. 32 25
321
EXAMPLE 2
Find the gcd of 414 and 662 using canonical decompositions.

Solution.
We have to find the gcd of 414, 662
First we find the canonical decompositions
2 414 2 662
3 207 331
414 2.3-23 3 69

662 2.331
23

gcd (414, 662) 2 =


Divisibility Theory and Canonical Decompositions 3.41

EXAMPLE 3

Find (175, 192) using canonical decompositions.


Solutlon.
2 192
We have to find (175, 192). s175
First we find the canonical decompositions 5 35 2 96
2 48
175=52.7 2 24

192=2 3 2 24
We notice that there is no common factor except 1. 2 12
26
(175, 192)=1
EXAMPLE 4

Find gcd of 168 and 180 using canonical decompositions. AU 20171

Solution. 180
2 168 2
We have to find ged of 168, 180.
First we find the canonical decompositions 2 84 2 90
2 42 45
168=2.3-7
3 21 3 15
and 180 22.32.5
gcd (168,180) =22.3 =12
EXAMPLE 5
Find the gcd of 120 and 500.

Solution. 2 120 500


We have to find ged of 120 and 500. 2 60 250
First we find the canonical decompositions
2 30 125
120 2 3.5 3 15 25
and 500 2 5
gcd (120, 500) =22.5 = 20

with smaller index.


Notice that we choose the common factors
More generally,

Ifa=p P P andb=pp.P
of and b, then a
are the canonical decompositions

pmin(a,PM).min(a,. nia(4 B3)min(B,)


Ba) P3
gcd(a, b) =
2
3.42 Algebra and Number Theory

EXAMPLE 6
Use recursion to evaluate
(12, 36, 60, 108).
Solution.
We have to evaluate gcd (12, 36, 60, 108).
We isolate each term from the right and find ged of the inner groups as below

(12,36,60,108) = ((12,36,60), 108)

=(12,36)60),108)
Now (12, 36) = 12 [: 12 is a factor of 36]

Then ((12, 36), 60) = (12, 60) = 12 [" 12 is a factor of 60)

(C(12, 36), 60), 108) = (12, 108) = 12 [: 12 is a factor of 108


(12, 36, 60, 108) = 12

EXAMPLE7
Use recursion to evaluate (18, 30, 60, 75, 132). [AU 2017]
Solution.
We have to evaluate ged (18, 30, 60, 75, 132). 2 18,30
We isolate each term from the right and then find the gcd of inner
groups.
39,15
3,5-No common
(18,36,60,75,132) =(18,36,60,75),132) factor
- (18,30,60),75).132)
36,75
-(18,30).60).75).132) 2,25-No common
factor
Now (18,30)=2 3=6
(18, 30), 60) = (6, 60) = 6
(:6 is a factor of 60]
(18, 30), 60), 75) = (6, 75) = 3

(18, 30, 60, 75, 132) = (3, 132)

3 [:3 is a factor of 132]

EXAMPLE 8
Use recursion to evaluate (12, 18, 28, 38, 44).

Solution.
We have to evaluate gcd(12, 18, 28, 38, 44).
3.43
Divisibility Theory and Canonical Decompositions

We isolate each term from the right and then find the ged ofinner groups 2 12, 18
as below
3 6,9
(12,18, 28, 38, 44) = ((12,18,28,38).44) 2,3 No factor
(12.18,28).38).44 2 6,28
(12,18),28).38).44) 3, 14 No factor

Now (12, 18) =2 3 =6


(12,18),28) = (6,28)
2
[:2 is a factor of 38]
(12,18),28).38)= (2,38) = 2

2 [:2 is a factor of 44]


(12, 18, 28, 38, 44) (2, 44)
= =

EXAMPLE 9
Using recursion evaluate (15, 24, 28, 45).

Solution.
We have to evaluate ged (15, 24, 28, 45). 3 15,24
We isolate each term from the right and then find the gcd of inner No factor
5,8
groups as below
(15, 24, 28, 45) = (15, 24, 28), 45)

= ((15, 24), 28), 45)

(15, 24) =3
Now

((15, 24), 28) =


(3, 28) = 1

((15, 24), 28), 45) =


(1, 45) = 1

(15, 24, 28, 48) = 1

EXAMPLE 10
Find the ged of a =2.33.5.7.112
and b=2.3.53.11

Solutlon.
Given a= 22 3.52.7.112
and b= 2.3 5.11
(a,b)=2 3.5.11=29,700
(choosing minimum of powers of common factors)
3.44 Algebra and Number Theory

EXAMPLE 11
Find the gcd of 92928 and 123552.
Solution.
We have to find the gcd of
2 92928 2 123552
92928 and 123552. 2 46464
First we find their canonical decompositions 2 61776
2 23232 2 30888
92928 2 3.11 2 11616 2 15444
123552 23 3 11-13 2 5808 2 7722
thegcd(92928,123552)= 2.3.11 2 2904 3861
= 1056 2 1452 1287
Aliter: We can find gcd as below taking both the numbers 2 726 3 429
2 92928, 123552 3 363 11 143
2 46464, 61776 11 121 13
11
2 23232, 30888
11616, 15444
2 5808, 7722
3 2904, 3861
11968,1287
88, 117 No factor
ged (92928,123552) =25 3 11 =1056.

3.7 THE GCD AND THE EUCLIDEAN ALGORITHM


Theorem 3.11 gives us a powerful theoretical tool for gcd of two positive integers a and b as a linear
combination of a and b. But it does not provide us with a practical method of finding gcd of a and b.
Euclidean algorithm, which is repeated application of division algorithm, gives us an efficient
method of finding gcd of two positive integers.
The next theorem gives the basis for Euclidean algorithm.

Theorem 3.14 Let a and b be two positive integers such that

a=qb +r, 0Sr<b.


Then the ged (a, b) = the gcd (b, r)

Proof Given a and b are positive integers such that


a=qb +r, 0 Sr<b. (1)
a-qb=
Let d= gcd (a, b) and d' = ged (b, r).

To prove d d'.
Divisibility Theory and Canonical
Decompositions 3.45
Since d gcd (a, b), d|a and
d|b^d\a- qb
dr.
|bb
Thus d| and d \r and so d |
an
gcd
(b, r) =»d|d'.
Sinced' =gcd (6, r), d'|b and d'|r.
(0) d'a
Thusd' | a and d'|b and so d' | gcd (a, b) =»d' |d
Hence d= d' ^ gcd (a, b) = gcd (b, r)
The gcd (b, r) means the gcd of the divisor and remainder.

3.7.1 The Euclidean Algorithm


Suppose a and b are positive integers witha2b.
Ifa = b, then (a, b) = (a, a) = a.
So, assume a b. >

Then by successive aplication of division algorithm. we get


a= qb+ 0Sn<b
b= 42 +2 0sh
0s
432 +

n-2 n'n-1 t 0<rn-1


n-1 9n+1 +0
and
remainders terminate with remainder 0.
Where b>i>h>... 20. The sequence of
By Theorem 3.12,
gcd (a, b) =ged (b, r,)gcd
(,r) =...
=gcd( r ) = r ,
remainder in the sequence of divisions.
is the last
non-zero
Thus (a, b) =r,, where r

EXAMPLE 1
Euclidean algorithm.
Find the gecd (414, 662) using
414 662 248) 414
Solution. 662 > 414. 414 248
662). Here
we have to find the gcd (414, we get
166
successively,
algorithm
248
division
APplying
662 = 1(414) + 248
2 41
414 1(248)+166
248 1(166)+82 166) 248 82 166 2) 82
166 164 8
166 2(82)+|2 2
82
82 = 41(2)+0

2.
remainder is
ne last non-zero 2
ged (662, 414)
=

the
3.46 Algebra and Number Theory

EXAMPLE 2
AU 2018
Euclidean algorithm.
Find the ged (2076, 1776) using
1 5
Solution.
1776 2076 300) 1776
Here 2076> 1776.
get: 1776 1500
Applying division algorithm successively
we

300 276
2076 1(1776) +300
1776 5(300)+276
300 1(276) + 24 11
24) 276 276 300
276 11(24)+|12 276
24
24 2(12)+0 34 24
The last nonzero remainder is 12 24
the ged (2076, 1776) = 12 10
.

EXAMPLE 3
[AU 2017
Apply Euclidean algorithm to compute (3076, 1976).

Solution.
We have find the ged of 3076 and 1976.
Here 3076 > 1976.
Applying the division algorithm successively, we get
1976 3076 1100) 1976 876) 1100
3076 11976) +1100
1976 1(1100) +876
1976 1100 876
1100 876 224
1100 1(876) +224
10 1
876 3(224)+204
224 1(204) + 20 224 876 20) 204 204 224
672 200 204
204=10(20)+4 204 4 20
20 5(4)+0
The last nonzero remainder is 4
the gcd (3076, 1976) =4

EXAMPLE 4

Apply Euclidean algorithm to express the ged of 1976 and 1776 as a linear combination of them.
[AU 20171

Solution.
We have to find the gcd of 1976 and 1776. Here 1976 > 1776.
Applying division algorithm successively, we get

1976 1(1776) +200


3.47
Divisibility Theory and Canonical Decompositions

1776 8(200) +176 8


200 1(176)+ 24 1776) 1976 200 1776
1776 1600
176 7(24)+8 200 176
24 3(8) +0

The last nonzero remainder is 8.


176) 200 8) 24
gcd (1976, 1776) = 8
176 24
Using the above equations in reverse order and substituting for 24
remainder each time, we get the linear combination of 1976 and 1776.

(1976, 1776) = 8

= 176-7(24)

= 176-7[200- 1(176)]

8 (176)-7(200)

8 [1776 -8(200)] 7(200)


8(1776)-71 (200)
8 (1776)-71 [1976-1(1776)]
79(1776) -71 (1976)
79(1776)+(-71) (1976)
. the gcd is a linear combination of the numbers 1776 and 1976.
EXAMPLE 5
Use the Euclidean algorithm to express the gcd of 4076 and 1024 as a linear combination of
them.

Solutdon.
We have to find the gcd of 4076 and 1024. Here 4076 >1024. 3
By applying division algorithm successively, we get 1024) 4076 1004 1024
4076 3(1024)+1004 3072 1004
1024 =1(1004) + 20 1004 20
1004=50(20) +4
20 5(4)+0 50
The last nonzero remainder 20 1004
is
4. 4 20
the gcd (4076, 1024) = 4 100 20
Using the above equations in reverse order.
3.48 Algebra and Number Theory

remainders each time, we get


Substituting successively for
(4076, 1024) 4 =

= 1004-50(20)

= 1004- 50 [1024 1(1004)]


= 51(1004) - 50(1024)

= 51 [4076-3(1024)]-50(1024)

=51 (4076) -

203(1024)
= 51 (4076) + (-203) (1024)

linear combination ofthe numbers 1024 and 4076.


the gcd is a
Theorem 3.15 There are infinitely many primes of the form 4n+3. [AU 2018
Proof We prove by contradiction method.
Suppose there are only finite number of primes of the form 4n +3, say

Po P1 P2P where Po=3 andp, is the largest prime.


Consider the positive integer

m=4P1 P2 P t
Clearly m >PA and is ofthe form 4n +3 (Here n=P1 P2.. Pe
If m is a prime, then m is a prime larger, than the largest prime p
which is a contradiction.
Ifm is not a prime, then m is a composite number.
Clearly m is an odd number.
So, every factor of m is of the form 4n + 1 or 4n +3.
Suppose every factor is ofthe form 4n+1, then their product will be ofthe form 4n+ 1.
m will be of the form 4n + 1. :(4+1(4m+1) = 16m+4(1+m)+1 = 4[4/m+l+m]+1
Since m is of the form 4n +3, at least one of the factors of m, say p, is of the form 4n +3.
fp=Po =3, then 3 m and 3 |3 3m-3

314P1P2.Pk 314 or 3 some p; [by Euclid's lemma)


But both are impossible and hence a contradiction.
If p= p for some p, then
p|m and pl P\P2.P
Pm-PP2 P p|3, a contradiction
Therefore in both the cases, we get a contradiction.
This means our assumption of finiteness is
wrong.
Hence there are infinitely many
primes of the form 4n+3.
Note Similarly we can prove there are infinitely many primes of the form 4n + 1.
Divisibility Theory and Canonical Decompositions 3.49
EXAMPLE 6

For any positive integer n, Prove that 8n + 3 and 5n +2 are relatively prime.
Soluton.
Toprove (8n + 3, 5n +2) 1 =

When n =1, 8n +3= 11 and


5n +2 7

gcd (11, 7) =1
Hence it is true when n =
1
Forn2 2, we have 8n +3>
Sn +2. By division algorithm, 1
8n+3 1 (5n+2)+(3n +1), 0< 3n+1<5n+2 Sn+2 8n +3
Sn+2 1 (3n+1)+(2n+1), 0< 2n+1< 3n+1 5n +3
3n + 1
3n+1 1 (2n+1)+n
2n+1 2(n) +|
n=1n+0 1
the last nonzero 3n+2) Sn +2
remainder is 1. 3n +1
gcd (8n+3, 5n 2n+1
+2)=1 Vn22
So, 8n+ 3 and 5n +2 are relatively prime for any positive integer.
EXAMPLE 7
Prove that (a, a -

b) =1 if and only if (a, b) =1.


AU 20171
Solution.
Let (a, b) = 1.
Then there exist integers l and m such that
la + mb=1

la+ma + mb-ma= 1|
(adding ma and substracting ma)
(1+m)a m(a -b) =1
(+m)a + (-m) (a -b) =1

(a, a -b)=1
Conversely, let (a, a - b) = 1. To prove (a, b) = 1.
Then there exist integers a and B such that aa + Ba - b) = 1

au + a-Bb = 1

(a+B)a +(-B)b = 1

(a, b) = 1

Note Similarly, we can prove that if (a, b) = 4, then (a, a -b) =d.
3.50 Algebra and Number Theory
EXAMPLE8
If the square of an integer is odd, then prove that the integer is odd.

Solution.
Let n be an integer such that 2 is odd.
To prove n is odd.
Suppose n is not odd, then n is even.

n = 2m for some integer m.

n2 4m22(2m),
which is even and hence a contradiction.
n is odd.
Similarly, we can prove that ifn' is even, then n is even.

EXAMPLE 9
If (a, b) = 1, then prove that (a",6)=1.

Solution.
Given (a, b) = 1.
To prove (a", b) = 1.
Suppose (a7, b>) # 1, then a and b have a common factor and hence have a prime factor p.

pla andp |1
Pla a andp |b -b

Plaand p|b (:pis a prime and p | ab ®p|a orp | b).

p the greatest common divisor of a and b


P (a, b) =p|1,
which is not possible and hence a contradiction.
(a, b) = 1.

EXAMPLE 10
Ifa and b are positive integers such that bja and bla + 2, prove that b = 1 or 2.

Solution.
Given blaand b|a+2
b|la + ma +2) for all integers /, m.

b1+ma+ 2m for all, m.


In particular, it is true for /=-1, m =1.
bloa+2 b12

You might also like