Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Number theory
1. Number Theory
Bule Hora university
Department Mathematics
By Abdulsamad Engida
Email:abdulsemede@gmail.com
November 8, 2018
( By Abdulsamad.E) Number Theory November 8, 2018 1 / 7
2. PROPERTIES OF INTEGERS
Introduction
For many people, numbers seem to be the essence of mathematics.
Number theory,is primarily concerned with the properties of one particular type of
number, the ’whole numbers’ or integers.
Integers are the building blocks of the theory of numbers
Here we introduce basic operations on integers , algebraic definitions, Well ordering
principle Proof by induction
divisibility and the division algorithm. (Gcd) and LCM
number theory deals with the properties of different sets of numbers
every positive integer has a unique base b expansion.
( By Abdulsamad.E) Number Theory November 8, 2018 1 / 7
3. Objectives of the chapter
At the end of this chapter,student will be able to:
Define set of integers.
State the order and the well ordering axioms on the set of integers prove related theorems.
State the principle of mathematical induction and prove related assertions.
Identify the system of integers as a well ordered integral domain and conversely.
Prove elementary divisibility properties in Z.
Compute greatest common divisor and least common multiple for given finite number of
non-zero integers.
State Euclidean algorithm and apply to find greatest common divisor of a finite number of
non-zero integers.
Define a prime number and express a positive composite integer as product of positive
prime numbers.
Express an integer in different bases.
( By Abdulsamad.E) Number Theory November 8, 2018 2 / 7
4. Algebraic Structure of Integers
Activity
I. Match the following terms with their definition stated below.
A. Number
B. Natural number
C. Integer number
D. Negative number
E. Rational number
1 A unit of an abstract mathematical system subject to the laws of arithmetic.
2 A natural number, a negative of a natural number,or zero.
3 The number zero and any number obtained by repeatedly adding one to it.
4 An integer or the quotient of two integers(division by zero excluded)
5 A value less than zero,with a sign opposite to its positive counterpart.
( By Abdulsamad.E) Number Theory November 8, 2018 3 / 7
5. The theory of numbers is concerned with properties of the integers and more particularly
with the positive integers 1, 2, 3, · · ·
The origin of this misnomer harks back to the early Greeks for whom the word number
meant positive integer, and nothing else.
The natural numbers have been known to us for so long that the mathematician Leopold
Kronecker once remarked, ”God created the natural numbers, and all the rest is the work
of man”.
Far from being a gift from Heaven, number theory has had a long and sometimes painful
evolution, a story that is told in the ensuing pages.
student using this module is familiar with basic definitions in group and ring theory and at
least has an exposure to some models
We assume that the system of integers is a none empty set Z, with two binary
operations: the first called addition and denoted by ” + ” and
the second is called multiplication and denoted by ”.” satisfying the following four axioms.
( By Abdulsamad.E) Number Theory November 8, 2018 4 / 7
6. Axiom 1: (Z, +) is an abelian group.
Axiom 2:(Z, +, .) is an integral domain, that is a commutative ring with unity having no
zero divisor.
Definition
0 denotes the additive identity while 1 denotes the multiplicative identity.
Definition
The binary operation subtraction denoted by ” − ” is define on Z as follow,
x − y = x + (−y),for each x, y ∈ Z.
Axiom 3: Order Axiom Z has a non-empty subset, denoted by P, such
1 P is closed under ” + ” and ”.”
2 For each x ∈ Z, exactly one of the three conditions x ∈ P, or − x ∈ P, or x = 0 holds.
Definition
A ring R satisfying axiom 1, 2 and 3 is called an ordered integral domain. The sub set P whose
existence guaranteed by the order axiom is called the set of positive elements of R.
We denote the set of positive elements of Z, by N.
Definition
If R is an ordered integral domain with P as the set of positive elements of R, We can introduce order( By Abdulsamad.E) Number Theory November 8, 2018 5 / 7
7. Consider the set of rational numbers, Q , and the set of real numbers, R , under addition and
multiplication of real numbers, both are ordered integral domains with P respectively denoting
Q+ = x ∈ Q : x > 0 and R+ = x ∈ R : x > 0.
Definition
If S is a non empty sub set of Z, then α ∈ S is a least element of S if and only if α ≤ x ,for all
x ∈ S.
Axiom 4: Well Ordering Axiom
Every non empty subset of P has a least element.
Remark
The above four axioms precisely describe the ring of integers up to isomorphism. Well
Ordering Axiom plays a critical role in the proofs here and in subsequent chapters; we will use
it to show that the set of positive integers has what is known as the Archimedean property.
Before that, let us deduce some important results about set of integers.
Theorem
Show that 1 is the least element of N, that is 1 is the smallest positive integers.
( By Abdulsamad.E) Number Theory November 8, 2018 6 / 7
8. Proof
We went to show that ∀x ∈ N, 1 ≤ x
We now that 1 = 1 ∗ 1 = 12 is a positive element of Z. Hence 1 ∈ N. By Well Ordering
Axiom, N has a least element, say α We will show that α = 1. suppose α = 1, then
α < 1.l(why?) hence, 1 − α, α ∈ N. But N is closed under multiplication, then
(1 − α) α = α − α2 ∈ N. It follows that α2 < α and α2 ∈ N, as N is closed under
multiplication. This contradicts the assumption that α is the least element of N. Hence α = 1
is the least element of N.
Activity:
1 Explain why the following holds true.
1 −1 < 0
2 0 = −0
3 0 = N
4 a − 1 < a, ∀a ∈ Z
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
9. Theorem
Show that if a ∈ Z, there is no integer between a and a + 1.
Proof
Let a ∈ Z, ∃b ∈ Z such that a < b < a + 1
⇒ a + 1 − b = a + 1 − a + a − b = (a + 1 − a) − (b − a) ∈ N
⇒ b − a < a + 1 − a = 1
but b − a ∈ N which contradicts to 1 is the smallest positive number thus there is no integer
between a and a + 1
Theorem (Archimedean property)
If a and b are any positive integers, then there exists a positive integer n such that na > b.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
10. Proof
Assume that the statement of the theorem is not true, so that for some a and b, na < b for
every positive integer n. Then the set S = {b − na : n ∈ N} consists entirely of positive
integers. By the Well Ordering Axiom, S will possess a least element, say, β, that is
β = b − ma, m ∈ N. Notice that b − (m + 1)a ∈ S, because S contains all integers of this
form. Furthermore, we have b − (m + 1)a = (b − ma) − a < b − ma , contrary to the choice
of β = b − ma as the smallest integer in S. This contradiction arose out of our original
assumption that the Archimedean property did not hold; hence,this property is proven true.
Note We define the notation 1 + 1 = 2, 2 + 1 = 3, 3 + 1 = 4, 4 + 1 = 5, 6 + 1 = 7, 7 + 1 = 8
and 8 + 1 = 9.We shall later see that every integer, and in fact every real number, can be
expressed essentially using the different ten symbols 0, 1, 2, · · · , 9 known as base ten
numeration.
Theorem
In the set of integers, N = 1, 2, 3, · · ·
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
11. Proof
Since 1 ∈ N , as N is closed under addition, we have 1, 1 + 1, 1 + 1 + 1, · · · ⊆ N Using the
above notation, 1, 2, 3, · · · ⊆ N. It remains to show that N ⊆ 1, 2, 3, · · · suppose
N ⊆ 1, 2, 3, · · · . Then S = {x ∈ N : x /∈ {1, 2, 3, · · · }} is a non-empty subset of N . It follows
that by Well Ordering Axiom S has a least element, say θ. As 1 /∈ S, we conclude that θ > 1.
As θ − 1 ∈ N and θ − 1 < θ, we have θ − 1 /∈ S. Hence θ − 1 ∈ {1, 2, 3, · · · }. But then,
θ = (θ − 1) + 1 ∈ {1, 2, 3, · · · }. This is a contradiction as S ∩ 1, 2, 3, · · · = ∅. Hence
N ⊆ 1, 2, 3, · · ·. Therefore, N = {1, 2, 3, · · · }
Corollary
The set of integers Z, is given by
Z = {· · · , −3, −2, −1, 0, 1, 2, 3, · · · }
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
12. Proof
we know that N = {1, 2, 3, · · · } ⊆ Z and 0 ∈ Z, since (Z, +) is a group,
· · · , −3, −2, −1 ∈ Z. (why?) Hence, {· · · , −3, −2, −1, 0, 1, 2, 3, · · · } ⊆ Z. Conversely, if
x ∈ Z, by order axiom ,either x ∈ N or−x ∈ N or x = N. Using Theorem(7), it follows that
x ∈ {· · · , −3, −2, −1, 0, 1, 2, 3, · · · }.
Hence, {· · · , −3, −2, −1, 0, 1, 2, 3, · · · } ⊂ Z.
Therefore, Z = {· · · , −3, −2, −1, 0, 1, 2, 3, · · · }
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
13. Exercise
Algebraic Structure
1 If R is a ring, show that for every r, s ∈ R
1 r0 = 0r = 0.
2 (−r)s = −(rs)
3 (−r)(−s) = rs
2 If R is a ring with unity and has at least two elements, then 0 = 1.
3 Prove that any ordered integral domain has at least two elements.
4 conclude from 2 and 3 that in any integral domain 0 = 1.
5 Let R be an ordered integral domain and P be the set of positive elements of R.
1 Show that for any x ∈ R{0} , x2
is a positive element.
2 Show that {1, 1 + 1, 1 + 1 + 1, . . . } ⊆ P.
3 Conclude from 5(b) that every ordered integral domain is infinite.
6 Show that for each x, y, z, w ∈ Z the following holds.
1 x > y ⇐⇒ x + z > y + z
2 x > y y > z =⇒x > z
3 x > y z > 0 =⇒xz > yz
4 x > y z < 0 =⇒xz < yz
5 x > y z > w =⇒x + z > y + w
7 Construct an ordered integral domain where 1 is the least positive element.( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
14. Mathematical Induction
One of the most powerful techniques in proving assertions or solving problems that involves
integers is the Principle of Mathematical Induction (PMI). In this section, we formulate
two equivalent versions mathematical induction. With the Well Ordering Axiom available, one
can derive the First Principle of Mathematical Induction, which provides a basis for a method
of proof called mathematical induction. Loosely speaking, the First Principle of Mathematical
Induction asserts that if a set of positive integers has two specific properties, then it is the set
of all positive integers. To be less cryptic, we state this principle in Theorem(0.5).
Theorem (First Principle of mathematical Induction)
Let S be a set of positive integers with the following properties:
1 The integer 1 belongs to S.
2 Whenever the integer k is in S, the next integer k + 1 also must be in S.
Then S is the set of all positive integers. That is S = N.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
15. Proof
Let T be the set of all positive integers not in S, and assume that T is nonempty. The Well
Ordering Axiom tells us that T possesses a least element, which we denote by a. Because 1 is
in S, certainly a > 1, and so 0 < a − 1 < a. The choice of a as the smallest positive integer in
T implies that a − 1 is not a member of T, or equivalently that a − 1 belongs to S. By
hypothesis, S must also contain (a − 1) + 1 = a, which contradicts the fact that a lies in T.
We conclude that the set T is empty and in consequence that S contains all the positive
integers.
Here is a typical formula that can be established by mathematical induction:
1 + 2 + 3 + · · · + n =
n (n + 1)
2
(1)
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
16. Proof
In anticipation of using Theorem(0.5), let S denote the set of all positive integers n for which
Equation(1) is true. We observe that when n = 1, the formula becomes 1 =
1 (1 + 1)
2
= 1.
This means that 1 is in S. Next, assume that k belongs to S (where k is a fixed but
unspecified integer) so that
1 + 2 + 3 + · · · + k =
k (k + 1)
2
(2)
To obtain the sum of the first k + 1 , we merely add the next one, (k + 1)2
, to both sides of
Equation (2) . This gives
1 + 2 + 3 + · · · + k + k + 1 =
k (k + 1)
2
+ k + 1
=
k (k + 1) + 2 (k + 1)
2
=
(k + 1) (k + 2)
2
=
(k + 1) (k + 1 + 1)
2
(3)
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
17. After some algebraic manipulation, the right-hand side becomes equation(3) and Which is
precisely the right-hand member of Equation(2), when n = k + 1. Our reasoning shows that
the set S contains the integer k + 1 whenever it contains the integer k. By Theorem (0.5)
(First Principle of mathematical Induction), S must be all the positive integers; that is, the
given formula is true for n ≥ 1.
Although mathematical induction provides a standard technique for attempting to prove a
statement about the positive integers, one disadvantage is that it gives no aid in formulating
such statements. Of course, if we can make an ”educated guess” at a property that we believe
might hold in general, then its validity can often be tested by the induction principle.
We should inject a word of caution at this point, to wit, that one must be careful to establish
both conditions of Theorem(0.5) before drawing any conclusions; nothing is sufficient alone.
The proof of condition (a) is usually called the basis for the induction, and the proof of (b) is
called the induction step. The assumptions made in carrying out the induction step are known
as the induction hypotheses. The induction situation has been likened to an infinite row of
dominoes all standing on edge and arranged in such a way that when one falls it knocks down
the next in line. If either no domino is pushed over (that is, there is no basis for the induction)
or if the spacing is too large (that is, the induction step fails), then the complete line will not
fall. The validity of the induction step does not necessarily depend on the truth of the
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
18. statement that one is endeavoring to prove.
Let us look at the false formula.
1 + 3 + 5 + · · · + (2n − 1) = n2
+ 3 (4)
Assume that this holds for n = k in other words, 1 + 3 + 5 + · · · + (2k − 1) = k2 + 3
Knowing this, we then obtain
1 + 3 + 5 + · · · + (2k − 1) + 2k + 1 = k2 + 3 + 2k + 1
Which is precisely the form that Equation(4) should take when n = k + 1. Thus, if
Equation(4) holds for a given integer, then it also holds for the succeeding integer. It is not
possible; however, to find a value of n for which the formula is true. There is a variant of the
induction principle that is often used when Theorem 1.2.1 alone seems ineffective. As with the
first version, this Second Principle of Mathematical Induction gives two conditions that
guarantee a certain set of positive integers actually consists of all positive integers.
Theorem (Second Principle of mathematical Induction)
Let S be a set of positive integers with the following properties:
1 The integer 1 belongs to S.
2 If k is a positive integer such that 1, 2, · · · , k belong to S, then k + 1 must also be in S.
Then S is the set of all positive integers. That is S = N
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
19. Proof
let T represent the set of positive integers not in S. Assuming that T is nonempty, we choose
n to be the smallest integer in T. Then n > 1, by supposition (a). The minimal nature of n
allows us to conclude that none of the integers 1, 2, · · · , n − 1 lies in T, or, if we prefer a
positive assertion, 1, 2, · · · , n − 1 all belong to S. Property (b) then puts n = (n − 1) + 1 in S,
which is an obvious contradiction. We conclude that the set T is empty and in consequence
that S contains all the positive integers.
Remark (The First Principle of Mathematical Induction)
is used more often than the Second; however, there are occasions when the Second is favored
and you should be familiar with both versions. It sometimes happens that in attempting to
show that k + 1 is a member of S, we require proof of the fact that not only k, but all positive
integers that precede k, lie in S. Our formulation of these induction principles has been for the
case in which the induction begins with 1. Each form can be generalized to start with any
positive integer n0. In this circumstance, the conclusion reads as “Then S is the set of all
positive integers ≥ n0”.
Mathematical induction is often used as a method of definition as well as a method of
proof.For example, a common way of introducing the symbol n! (pronounced “n factorial”) is
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
20. by means of the inductive definition
1 1! = 1
2 n! = n (n − 1)
This pair of conditions provides a rule whereby the meaning of n! is specified for each positive
integer n. Thus, by (a), 1! = 1; (a) and (b) yield 2! = 2.1! = 2.1 While by (b), again,
3! = 3.2! = 3.2.1 Continuing in this manner, using condition (b) repeatedly, the numbers
1!, 2!, 3!, ..., n! are defined in succession up to any chosen n.
Definition
For each positive integer n, n! = n.(n − 1) · · · 3.2.1.
Remark
Induction enters in showing that n!, as a function on the positive integers, exists and is unique;
however, we shall make no attempt to give the argument. It will be convenient to extend the
definition of n! to the case in which n = 0 by stipulating that 0! = 1.
To illustrate a proof that requires the Second Principle of Mathematical Induction, consider
the so-called Lucas sequence: 1, 3, 4, 7, 11, 18, 29, 47, 76, · · · Except for the first two terms,
each term of this sequence is the sum of the preceding two, so that the sequence may be
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
21. defined inductively by
a1 = 1
a2 = 3
...
an = a(n−1) + a(n−2) ∀n ≥ 3
We argue that the inequality, an <
7
4
n
holds for every positive integer n. The argument
used is interesting because in the inductive step, it is necessary to know the truth of this
inequality for two successive values of n to establish its truth for the following value. First of
all, for n = 1 and 2, we have a1 <
7
4
1
=
7
4
and a2 <
7
4
2
=
49
16
Whence the inequality in
question holds in these two cases. This provides a basis for the induction. For the induction
step, choose an integer k ≥ 3 and assume that the inequality is valid for n = 1, 2, ..., k − 1.
Then, in particular,
ak−1 <
7
4
k−1
and ak−2 <
7
4
k−2
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
22. By the way in which the Lucas sequence is formed, it follows that
ak = a(k−1) + a(k−2) <
7
4
k−1
+
7
4
k−2
=
7
4
k−2
7
4
+ 1
=
7
4
k−2
11
4
<
7
4
k−2
7
4
2
=
7
4
k
Because the inequality is true for n = k, whenever it is true for the integers 1, 2, · · · , k − 1,
we conclude by the second induction principle that an =
7
4
n
, ∀n ≥ 1. Among other things,
this example suggests that if objects are defined inductively, then mathematical induction is an
important tool for establishing the properties of these objects. We can use the following
Extended Principle of mathematical Induction to show that a given statement is true for all
natural Extended Principle of mathematical Induction. If conditions (a) and (b) hold that is; a
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
23. statement is true for a natural number j If the statement is true for some natural number
k ≥ j, then it is also true for the next natural number k + 1. then the statement is true for all
natural numbers ≥ j. Principle of Mathematical Induction
1 The sum of prime number before n is n2
(1 + 3 + 5 + · · · + (2n − 1) = n2
1 p(n) : 1 + 3 + 5 + · · · + (2n − 1) = n2
p(1): is true (1 = 1)
2 let assume that p(k) is true
Now we went to prove that p(k + 1)is true
1 + 3 + 5 + · · · + (2k − 1) + (2k + 1) = [1 + 3 + 5 + · · · + (2k − 1] + (2k + 1)
= k2
+ (2k + 1) from (ii)
= k2
+ 2k + 1 = (k + 1)2
∴ p(k+1) is true. Hence p(n) is true for all natural number n
2 12 + 22 + · · · + n2= n(n+1)(2n+1)
6 ,n ≥ 1
1 For n = 1, 12
= 1(1+1)(2+1)
6 ⇒ 1 = 1
2 Assume 12
+ 22
+ · · · + k2
= k(k+1)(2k+1)
6
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
24. ⇒ 12
+ 22
+ · · · + k2
+ (k + 1)2
= k(k+1)(2k+1)
6 + (k + 1)2
=
(k + 1)[(k + 1) + 1][2(k + 1) + 1]
6
3 n + 10 ≤ 2n, ∀n ∈ N, n ≥ 4
1 n = 4, 14 ≤ 16
2 let k + 10 ≤ 2k
(*)
⇒ (k + 1) + 10 = (k + 10) + 1 ≤ 2k
+ 1 from (*)
≤ 2k
+ 2k
, (1<2k
)
= 2.2k
= 2k + 1
4 2n <n!, n ≥ 4
For n = 4, 24 <4! ⇒ 16<24)
Let 2k<k! (*) k ≥ 4
⇒ 2k + 1 = 2k .2<2k(k + 1). . .(2<(k + 1). . .(k ≥ 4)
<k!(k + 1) from(*)
= (k + 1)! since (k! = 1x2x3x · · · xk)
5 8n − 3n divisors of 5
1 n = 1 ⇒ 8 − 3 = 5. 5 divisors of 5.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
25. 2 Let 8k
− 3k
divisors of 5 (*)
Now we went to show 8k+1
− 3k+1
is divisors of 5 .
8k+1
− 3k+1
= 8k.8 − 3k+1
= 8k
(5 + 3) − 3k+1
= 5(8k
) + 3(8k
) − 3K+1
= 5(8k) + 3(8k
− 3k
)
= 5(8k
) + 3(8k
− 3k
)
from * 8k
− 3k
is divisors of 5
= 5(8k
+ 3m) = 5p (p = 8k
+ 3m)
⇒ 8k+1
− 3k+1
divisors of 5.
∴ by the principle of mathematical induction, 8n
− 3n
is divisors of 5 (∀n ∈ N)
6 ∀n ≥ 5, 2k − 4>n if n = 5 ⇒ 6>5 Let 2k − 4>k, k>5
⇒ 2(k + 1) − 4 = 2k + 2 − 4 = 2k − 4 + 2>k + 2>k + 1(1<2) therefore ∀n ≥ 5, 2n − 4>n
7 ∀n ≥ 2, n2>n If n = 2 ⇒ 4>2 Let k2>k. ⇒ (k + 1)2 = k2 + 2k + 1>k + 1 + 2k>k + 1
therefore ∀n ≥ 2, n2>n
8 13 + 23 + 33 + · · · + n3 = n2(n+1)2
4
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
28. Exercise
Mathematical Induction
1 Prove, by Mathematical Induction, that n(n + 1)(n + 2)(n + 3) is divisible by 24, for all
natural numbers n.
2 If r = 1, show that for any positive integer n, a + ar + ar2 + · · · + arn =
ar(n+1)−1
r − 1
.
3 Use the Second Principle of Mathematical Induction to establish that for all n ≥ 1,
an−1 = (a − 1)(a(n−1) + a(n−2) + a(n−3) + · · · + a + 1)
Hint: a(n+1) − 1 = (a + 1)(an−1) − a(a(n−1)−1)]
4 Prove that the cube of any integer can be written as the difference of two squares.
Hint:Notice that n3 = (13 + 23 + · · · + n3) − (13 + 23 + · · · + (n − 1)3]
5 Prove that n! > n2 for every integer n ≥ 4, whereas n! > n3 for every integer n ≥ 6.
6 Establish Bernoulli inequality: If 1 + a > 0, then (1 + a)n ≥ 1 + na for all n ≥ 1.
7 Show that the number of diagonals in a convex polygon of n sides is
1
2
n(n − 3).
Hint:Begin by showing the result is true when n = 4
8 Show that the sum of the interior angles of a convex polygon of n sides equals (n − 2)1800
9 Show that the formula 2 + 4 + 6 + · · · + 2n = n2 + n + 2 obeys Condition (b) of the
Principle of Mathematical Induction but is false for any choice of n ∈ N.What do you
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
29. Divisibility of integers
We start with a number of fairly elementary results and techniques, mainly about greatest
common divisors. You have probably met some of this material, though it may not have been
treated as formally as here. There are several good reasons for giving very precise definitions
and proofs, even when there is general agreement about the validity of the mathematics
involved. The first is that ’general agreement’ is not the same as convincing proof: it is not
unknown for majority opinion to be seriously mistaken about some point. A second reason is
that, if we know exactly what assumptions are required in order to deduce certain conclusions,
then we may be able to deduce similar conclusions in other areas where the same assumptions
hold true. Our starting-point is the division algorithm, which is as follows:
We have been exposed to relationships between integers for several pages and, as yet, not a
single divisibility property has been derived. It is time to remedy this situation. One theorem,
the Division Algorithm, acts as the foundation stone upon which our whole development rests.
The result is familiar to most of us; roughly, it asserts that an integer a can be ”divided” by a
positive integer b in such a way that the remainder is smaller than is b. The exact statement
of this fact is Theorem 0.7.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
30. Theorem (Division Algorithm)
Given integers a and b,with b > 0, there exist unique integers q and r satisfying
a = qb + r, 0 ≤ r < b. The integers q and r are called, respectively, the quotient and
remainder in the division of a by b.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
31. Proof
We begin by proving that the set S = a − xb|x ∈ Z; a − xb ≥ 0 is nonempty. To do this, it
suffices to exhibit a value of x making a − xb non negative. Because the integer b ≥ 1, we
have |a|b ≥ |a|, and so a − (−|a|)b = a + |a|b ≥ a + |a| ≥ 0 For the choice x = −|a|, then,
a − xb lies in S. This paves the way for an application of the Well-Ordering axiom, from which
we infer that the set S contains a smallest integer; call it r. By the definition of S, there exists
an integer q satisfying
r = a − qb, 0 ≤ r
Suppose that r < b. If this is not true the case, then r ≥ b and
a − (q + 1)b = (a − qb) − b = r − b ≥ 0
The implication is that the integer a − (q + 1)b has the proper form to belong to the set S.
But a − (q + 1)b = r − b < r, leading to a contradiction of the choice of r as the smallest
member of S. Hence,r < b.
The second phase of proof is showing uniqueness of q and r.
Suppose that a has two types of representation
a = qb + r where, 0 ≤ r < b, (5)
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
32. a = q b + r where 0 ≤ r < b (6)
Then subtract equation(5) from (6) r − r = b(q − q ) since the product of absolute value is
equal with absolute product |r − r| = b|q − q | Upon adding the two inequalities in equation
(5) and (6) −b < −r ≤ 0 and 0 ≤ r < b, we obtain −b < r − r < b or, in equivalent terms,
|r − r| < b. Thus, b|q − q | < b, which yields 0 ≤ |q − q | < 1 Because |q − q | is a non
negative integer, the only possibility is that |q − q | = 0, whence q = q this, in turn, gives
r = r ending the proof.
A more general version of the Division Algorithm is obtained on replacing the restriction that b
must be positive by the simple requirement that b = 0
Corollary
If a and b are integers, with b = 0, then there exist unique integers q and r such that
a = qb + r, 0 ≤ r < |b|
Proof
It is enough to consider the case in which Cb is negative. Then |b| > 0, and Theorem
(0.7)produces unique integers q and r for which a = q |b| + r, 0 ≤ r < |b|. Noting that
|b| = −b, we may take q = −q to arrive at a = qb + r,with 0 ≤ r < |b|.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
33. To illustrate the division Algorithm when b < 0, let us take b = −7. Then, for the choices of
a = 1, −2, 61, and − 59 we obtain the expressions
1 = 0(−7) + 1
−2 = 1(−7) + 5
61 = (−8)(−7) + 5
−59 = 9(−7) + 4
We wish to focus on the applications of the Division Algorithm, and not so much on the
algorithm itself. As a first illustration, note that with b = 2 the possible remainders are r = 0
and r = 1. When r = 0, the integer a has the form a = 2q and is called even; when r = 1, the
integer a has the form a = 2q + 1 and is called odd. Now a2 is either of the form 2q2 = 4k or
(2q + 1)2 = 4(q2 + q) + 1 = 4k + 1 + (2q)2. The point to be made is that the square of an
integer leaves the remainder 0 or 1 upon division by 4. We propose to show that the
expression
a(a2 + 2)
3
is an integer for all a ≤ 1 According to the Division Algorithm, every a is
of the form 3q, 3q + 1, or 3q + 2. Assume the first of these cases. Then
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
34. a(a2 + 2)
3
= q(9q2 + 2) , which is clearly an integer. Similarly, if a = 3q + 1, then
(3q + 1)(3q + 1)2 + 2)
3
= (3q + 1)(3q2
+ 2q + 1)
and
a(a2 + 2)
3
is an integer in this instance also. Finally, for a = 3q + 2, we obtain
(3q + 2)(3q + 2)2 + 2)
3
= (3q + 2)(3q2
+ 4q + 2)
an integer once more. Consequently, our result is established in all cases.
The Greatest Common Divisor special significance is the case in which the remainder in the
Division Algorithm turns out to be zero. Let us look into this situation now.
Definition
An integer b is said to be divisible by an integer a = 0, in symbols a|b, if there exists some
integer c such that b = ac. We write a b to indicate that b is not divisible by a.
Thus,for example,−12 is divisible by 4, because −12 = 4(−3). However, 10 is not divisible by
3; for there is no integer c that makes the statement 10 = 3c true. There is other language for
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
35. expressing the divisibility relation a | b. We could say that a is a divisor ofb, that a is a factor
of b, or that b is a multiple of a. Notice that in Definition (0.7) there is a restriction on the
divisor a: Whenever the notation a|b is employed, it is understood that a is different from zero.
If a is a divisor of b, then b is also divisible by −a (indeed, b = ac implies that
b = (−a)(−c)), so that the divisors of an integer always occur in pairs. To find all the divisors
of a given integer, it is sufficient to obtain the positive divisors and then adjoin to them the
corresponding negative integers. For this reason, we shall usually limit ourselves to a
consideration of positive divisors. It will be helpful to list some immediate consequences of
Definition (0.7) (Although not stated, divisors are assumed to be nonzero.)
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
36. Theorem
For integers a, b, c, the following hold:
1 a | 0, 1 | a, a | a.
2 a | 1 if and only if a = ±1.
3 If a | b and c | d, then ac | bd.
4 If a | b and b | c, then a | c.
5 a | b and b | a if and only if a = ±b.
6 If a | b and b = 0, then |a |≤ |b| .
7 If a | b and a | c, then a | (bx + cy), ∀x, y ∈ Z
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
37. Proof
We shall prove assertions (f) and (g), leaving the other parts as an exercise. If a | b, then
there exists an integer c such that b = ac; also, b | 0 implies that c | 0. Upon taking absolute
values, we get |b| = |ac| = |a||b|. Because c = 0, it follows that |c| ≥ 1, whence
|b| = |ac| = |a||b| ≥ |a|. As regards (g), the relations a | b and a | c ensure that b = ar and
c = as for suitable integers r and s. But then whatever the choice of x and
y, bx + cy = arx + asy = a(rx + sy) Because rx + sy is an integer, this says that a | (bx + cy),
as desired
It is worth pointing out that property (g) of Theorem(0.8) extends by induction to sums of
more than two terms. That is, if a | bk for k = 1, 2, · · · , n, then a | (b1x1 + b2x2 + · · · + bnxn)
for all integers x1, x2, · · · , xn. The few details needed for the proof are so straightforward that
we omit them as exercise. If a and b are arbitrary integers, then an integer d is said to be a
common divisor of a and b if both d | a and d | b. Because 1 is a divisor of every integer, 1 is
a common divisor of a and b; hence, their set of positive common divisors is nonempty. Now
every integer divides zero, so that if a = b = 0, then every integer serves as a common divisor
of a and b. In this instance, the set of positive common divisors of a and b is infinite.
However, when at least one of a or b is different from zero, there are only a finite number of
positive common divisors. Among these, there is a largest one, called the greatest common
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
38. divisor of a and b. We frame this as Definition(0.8)
Definition
Let a and b be given integers, with at least one of them different from zero. The greatest
common divisor of a and b, denoted by gcd(a, b), is the positive integer d satisfying the
following:
1 d | a and d | b.
2 If c | a and c | b,then c ≤ d.
gcd(a, b) = max {d : d | a and d | b}
Warning: We define the gcd(0, 0) = 0 instead of infinity. The positive divisors of −18 are
1, 2, 3, 6, 9, 18, whereas those of 28 are 1, 2, 4, 7, 14, 28; hence, the positive common divisors of
−18 and 28 are 1 and 2. Because 2 is the largest of these integers, it follows that
gcd(−18, 28) = 2. In the same way, we can show that
gcd(−9, 9) = 9, gcd(12, 19) = 1, gcd(−4, −36) = 4 Greatest common divisors of (a, b) can
be represented as a linear combination of a and b. By a linear combination of a and b, we
mean an expression of the form ax + by, where x and y are integers. This is illustrated by:
gcd (−18, 28) = 2 = −18.3 + 28.2 and gcd (−9, 9) = 9 = −9.1 + 9.2
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
39. From this we can deduce the theorem
Theorem
Given integers a and b, not both of which are zero, there exist integers x and y such that
gcd(a, b) = ax + by .
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
40. Proof
Consider the set S of all positive linear combinations of a and b:
S = au + bv; au + bv > 0; u, v ∈ Z
irst that S is not empty. For example, if a = 0,then the integer |a| = au + b.0 lies in S, where
we choose u = 1 or u = −1 according as a is positive or negative. By virtue of the
Well-Ordering Axiom, S must contain a smallest element d. Thus, from the very definition of
S, there exist integers x and y for which d = ax + by > 0. We claim that d = gcd (a, b).
Using the Division Algorithm, we can obtain integers q and r such that
a = qd + r, where 0 ≤ qr < d.
Then r can be written in the form
r = a − qd = a − q (ax + by) = a(1 − qx) + b(−qy)
Were r is positive, then this representation would imply that r is a member of S, contradicting
the fact that d is the least integer in S(recall that r < d. Therefore, r = 0, and so a = qd, or
equivalently d|a. By similar reasoning, d|b, the effect of which is to make d a common divisor
of a and b.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
41. Now if c is an arbitrary positive common divisor of the integers a and b, then part (g) of
Theorem(0.8) allows us to conclude that c | (ax + by); that is, c | d. By part (f) of the same
theorem, c = |c |≤ |d| = d, so that d is greater than every positive common divisor of a and
b. Piecing the bits of information together, we see that d = gcd(a, b).
Corollary
If a and b are given integers, not both zero, then the set T = ax + by | x, y ∈ Z is precisely
the set of all multiples of d = gcd(a, b).
Proof
Because d | a and d | b, we know that d | (ax + by) for all integers x, y. Thus, every member
of T is a multiple of d.
Conversely, d may be written as d = ax0 + by0 for suitable integers x0 and y0, so that any
multiple nd of d is of the form nd = n(ax0 + by0) = a(nx0) + b(ny0).
Hence, nd is a linear combination of a and b, and, by definition, lies in T
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
42. Definition
Two integers a and b, not both of which are zero, are said to be relatively prime whenever
gcd(a, b) = 1.
Relative prime number is happen when the greatest common divisors of a number is −1 and 1.
For example: gcd(−5, −7) = gcd(2, 9) = gcd(27, 19) = 1. Those pair of numbers are
relatively prime numbers.
Theorem
Let a and b be integers, not both zero. Then a and b are relatively prime if and only if there
exist integers x and y such that 1 = ax + by
Proof
If a and b are relatively prime so that gcd(a, b) = 1, then Theorem(0.9) guarantees the
existence of integers x and y satisfying 1 = ax + by. As for the converse, suppose that
1 = ax + by for some choice of x and y, and thatd = gcd(a, b). Because d | a and d | b,
Theorem(0.8) yields d | (ax + by), or d | 1. In as much as d is a positive integer, this last
divisibility condition forces d to equal 1 ( part (b) of Theorem(0.8) plays a role here), and the
desired conclusion follows.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
43. Corollary
If gcd(a, b) = d, then gcd( a
d , b
d ) = 1.
Proof
Before starting with the proof proper, we should observe that although a
d and b
d have the
appearance of fractions, in fact, they are integers because d is a divisor of both a and b. Now,
knowing that gcd(a, b) = d, It is possible to find integers x and y such that d = ax + by.
Upon dividing each side of this equation by d, we obtain the expression, 1 = (a
d )x + (b
d )y ,
Because a
d and b
d are integers, an appeal to Theorem(0.10) is legitimate. The conclusion is
that a
d and b
d are relatively prime.
For an illustration of the corollary(0.7), let us observe that
gcd(−18, 28) = 2 and gcd(−18
2 , 28
2 ) = gcd(−9, 14) = 1 as it should be.
Corollary
If a | c and b | c, with gcd(a, b) = 1, then ab | c.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
44. Proof
As a | c and b | c, there exists integers r and s such that c = ar = bs. Now the relation
gcd(a, b) = 1 allows us to write 1 = ax + by for some choice of integers x and y. Multiplying
the last equation by c, it appears that
c = c.1 = c(ax + by) = acx + bcy
If the appropriate substitutions are now made on the right-hand side, then
c = a(bs)x + b(ar)y = ab(sx + ry)
or, as a divisibility statement, ab | c.
Theorem (Euclid’s lemma)
If a | bc, with gcd(a, b) = 1,then a | c.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
45. Proof
We start again from Theorem(0.10), writing 1 = ax + by, where x and y are integers.
Multiplication of this equation by c produces
c = 1.c = (ax + by)c = acx + bcy
Because a | ac and a | bc, it follows that a | (acx + bcy), which can be recast as a | c.
Remark
If a and b are not relatively prime, then the conclusion of Euclid’s lemma may fail to hold.
Here is a specific example: 12 | 9.8 , but 12 9 and 12 8.
Theorem
Let a,b be integers, not both zero. For a positive integerd,
d = gcd(a, b) if and only if d | a and d | b. If c | a and c | b,then c | d.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
46. Proof
To begin, suppose that d = gcd(a, b). Certainly, d | a and d | b, so that (a) holds. In light of
Theorem(0.10), d is expressible as d = ax + by for some integers x, y. Thus, if c | a and c | b,
then c | (ax + by), or rather c | d. In short, condition (b) holds. Conversely, let d be any
positive integer satisfying the stated conditions. Given any common divisor c of a and b, we
have c | d from hypothesis (b). By part (f) of Theorem(0.8) , we have c ≤ |c| ≤ |d| = d, and
consequently d is the greatest common divisor of a andb.
The greatest common divisor of two integers can,be found by listing all their positive divisors
and choosing the largest one common to each;but this is cumbersome for large numbers. A
more efficient process,involving repeated application of the division algorithm,is given in the
seventh Book of the Elements. Although there is historical evidence that this method predates
Euclid, today it is referred to as the Euclidean algorithm.
The Euclidean algorithm may be described as follows:Let a and b be two integers whose
greatest common divisor is desired. Because gcd(|a|, |b|) = gcd(a, b), there is no harm in
assuming that a ≥ b > 0. The first step is to apply the division algorithm to a and b to get
a = q1b + r1, 0 ≤ r1 < b
If it happens that r1 = 0 , then b|a and gcd(a, b) = b. When r1 = 0 divide b by r1 to produce
integers q2 and r2 satisfying
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
47. b = q2r1 + r2, 0 ≤ r2 < r1
If r2 = 0, then we stop; otherwise, proceed as before to obtain
r1 = q3r2 + r3, 0 ≤ r3 < r2
This division process continues until some zero remainder appears, say, at the (n + 1)th stage
where rn−1 is divided by rn(a zero remainder occurs sooner or later because the decreasing
sequence b > r1 > r2 > · · · ≥ 0 cannot contain more than b integers). The result is the
following system of equations:
a = q1b + r1, 0 ≤ r1 < b
b = q2r1 + r2, 0 ≤ r2 < r1
r1 = q3r2 + r3, 0 ≤ r3 < r2
...
r(n−2) = qnr(n−1) + rn, 0 ≤ rn < r(n−1)
r(n−1) = q(n+1)rn + 0
We argue that rn, the last nonzero remainder that appears in this manner, is equal to
gcd(a, b). Our proof is based on the lemma below.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
48. Lemma
If a = qb + r, then gcd(a, b) = gcd(b, r).
Proof
If d = gcd(a, b), then the relations d|a and d | b together imply that d | (a − qb), or d | r.
Thus, d is a common divisor of both b and r. On the other hand, if c is an arbitrary common
divisor of b and r, then c | (qb + r), whence c | a. This makes c a common divisor of a and b,
so that c ≤ d. It now follows from the definition of gcd(b, r) that d = gcd(b, r).
Using the result of this lemma, we simply understand that from the system of equation we
obtain
gcd(a, b) = gcd(b, r1) = · · · = gcd(rn−1, rn) = gcd(rn, 0) = rn as requested.
In the theorem(0.10)asserts that gcd(a, b) can be expressed as linear combination of
ax + by, but the proof of the theorem gives no hint as to how to determine the integers x and
y. For this, we fall back on the Euclidean Algorithm. Starting with the next-to-last equation
arising from the algorithm, we write
rn = rn−2 − qnrn−1
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
49. Now solve the preceding equation in the algorithm for r(n−1) and substitute to obtain
rn = r(n−2) − qn(rn−3 − qn−1rn−2)
= (1 + qnqn−1)rn−2 + (−qn)rn−3
This represents rn as a linear combination of rn−2 and rn−3. continuing backward through the
system of equations, we successively eliminate the remainders
rn−1, rn−2, · · · , r2, r1 until a stage is reached where rn = gcd(a, b) is expressed as a
linear combination of a and b. Let us see how the Euclidean algorithm works in a concrete
case by calculating, say, gcd(12378, 3054). The appropriate applications of the division
algorithm produce the equations
12378 = 4.3054 + 162
305.14 = 18.162 + 138
162 = 1.138 + 24
138 = 5.24 + 18
24 = 1.18 + 6
18 = 3.6 + 0
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
50. Our previous discussion tells us that the last nonzero remainder appearing in these equations,
namely, the integer 6, is the greatest common divisor of 12378 and 3054;
6 = gcd(12378, 3054) to represent 6 as a linear combination of the integers 12378 and 3054,
we start with the next-to-last of the displayed equations and successively eliminate the
remainders 18, 24, 138, and 162;
6 = 24 − 18
= 24 − (138 − 5.24)
= 6.24 − 138
= 6(162 − 138) − 138
= 6.162 − 7.138
= 6.162 − 7(3054 − 18.162)
= 132.162 − 7.3054
= 132(12378 − 4.3054) − 7.3054
= 132.12378 + (−535)3054
Thus, we have 6 = gcd(12378, 3054) = 12378x + 3054y
where, x = 132 and y = −535. Note that this is not the only way to express the integer 6
as a linear combination of 12378 and 3054; among other possibilities, we could add and
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
51. subtract 3054.12378 to get
6 = (132 + 3054)12378 + (−535 − 12378)3054
= 3186.12378 + (−12913)3054
The French mathematician Gabriel Lame (1795-1870) proved that the number of steps
required in the Euclidean Algorithm is at most five times the number of digits in the smaller
integer. In Example 3, the smaller integer (namely, 3054) has four digits, so that the total
number of divisions cannot be greater than 20; in actuality only six divisions were needed.
Another observation of interest is that for each n > 0, it is possible to find integers an and bn
such that exactly n divisions are required to compute gcd(an, bn) by the Euclidean Algorithm.
The number of steps in the Euclidean algorithm usually can be reduced by selecting
remainders rk+1 such that rk+1 < rk
2 , that is, by working with least absolute remainders in
the divisions. Thus, repeating Example(3) , it is more efficient to write
12378 = 4.3054 + 162
3054 = 19.162 − 24
162 = 7.24 − 6
24 = (−4)(−6) + 0
As evidenced by this set of equations,this scheme is to produce the negative of the value of the
greatest common divisor of two integers (the last nonzero remainder being −6), rather than
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
52. the greatest common divisor itself. An important consequence of the Euclidean algorithm is
the following theorem.
Theorem
If k > 0, then gcd(ka, kb) = kgcd(a, b).
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
53. Proof
If each of the equations appearing in the Euclidean algorithm for a and b is multiplied by k, we
obtain
ka = q1(bk) + r1k, 0 ≤ r1k < bk
bk = q2(r1k) + r2k, 0 ≤ r2k < r1k
r1k = q3(r2k) + r3k, 0 ≤ r3k < r2k
...
r(n−2)k = qn(r(n−1)k) + rnk, 0 ≤ rnk < r(n−1)k
r(n−1)k = q(n+1)(rnk) + 0
But this is clearly the Euclidean algorithm applied to the integers ak and bk, so that their
greatest common divisor is the last nonzero remainder rnk that is,
gcd(ka, kb) = rnk = kgcd(a, b) as stated in the theorem.
Corollary
For any integer k = 0, gcd(ka, kb) = |k|gcd(a, b).
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
54. Proof
It suffices to consider the case in which k < 0. Then −k = |k| > 0 and, by Theorem 3
gcd(ak, bk) = gcd(−ak, −bk)
= gcd(a|k|, b|k|)
= |k|gcd(a, b)
(7)
An alternate proof of Theorem 3 runs very quickly as follows: gcd(ak, bk) is the smallest
positive integer of the form (ak)x + (bk)y, which, in turn, equal to k times the smallest
positive integer of the form ax + by; the latter value is equal to kgcd(a, b). By way of
illustrating Theorem 3, we see that
gcd(12, 30) = 3gcd(4, 10) = 3.2gcd(2, 5) = 6.1 = 6
Before moving on to other matters, let us observe that the notion of greatest common divisor
can be extended to more than two integers in an obvious way. In the case of three integers,
a, b, c, not all zero, gcd(a, b, c) is defined to be the positive integer d having the following
properties:
d is a divisor of each of a, b, c.
If e divides the integers a, b, c, then e ≤ d.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
55. For example gcd(39, 42, 54) = 3, gcd(49, 210, 350) = 7 and gcd(6, 10, 15) = 1
Exercise
Greatest Common divisors and its application
1 Use Euclid’s algorithm to find Greatest Common divisors
1 2261, 1275
2 190, 78
3 169, 13
4 (128, 442)
2 Find the Greatest Common divisors of 256,342,578,1000 and 3472.
3 Find (63; 217; 350; 728; 7077; 9100) using euclidean algorithm. (63; 217; 350; 728; (7077;
9100))
There is a concept analogous to that of the greatest common divisor of two integers, known as
their least common multiple; but we shall not have much occasion to make use of it. An
integer c is said to be a common multiple of two nonzero integers a and b whenever a|c and
b|c. Evidently, zero is a common multiple of a and b. To see there exist common multiples
that are not trivial, just note that the products ab and −(ab) are both common multiples of a
and b, and one of these is positive. By the Well-Ordering Axiom, the set of positive common
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
56. multiples of a and b must contain a smallest integer; we call it the least common multiple of a
and b. For the record, here is the official definition.
Definition
The least common multiple of two nonzero integers a and b, denoted by lcm(a, b), is the
positive integer m satisfying the following:
1 a|m and b|m.
2 If a|c and b|c,with c > 0,then m ≤ c.
As an example, the positive least common multiples of the integers −10 and 24 are 120, since
common multiples of 10 : 10, 20, 30, · · · and multiples of 24 : 24, 48, 72, 96, 120, · · · hence
lcm(−10, 24) = 120.
The following remark is clear from our discussion: Given nonzero integers a and b, lcm(a, b)
always exists and lcm(a, b) ≤ |ab|. The relation between greatest common divisors and least
common multiples is stated by the following theorem
Theorem
For positive integers a and b, gcd(a, b)lcm(a, b) = ab
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
57. Proof
To begin, put d = gcd(a, b) and write a = dr, b = ds for integers r and s. If m = ab/d, then
m = as = rb, the effect of which is to make m a (positive) common multiple of a and b. Now
let c be any positive integer that is a common multiple of a and b; say, for definiteness,
c = au = bv. As we know, there exist integers x and y satisfying d = ax + by. In
consequence,
c
m
=
cd
ab
=
c(ax + by)
ab
= (
c
b
)x + (
c
a
)y = vx + uy
This equation states that m|c, allowing us to conclude that m ≤ c. Thus, in accordance with
Definition0.10,m = lcm(a, b); that is,
lcm(a, b) =
ab
d
=
ab
gcd(a, b)
For any choice of positive integers a and b,lcm(a, b) = ab if and only if gcd(a, b) = 1.
For example gcd(3054, 12378) = 6;
lcm(3054, 12378) =
3054 ∗ 12378
6
= 6300402
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
58. Definition
An integer p > 1 is called a prime number, or simply a prime, if its only positive divisors are 1
and p. An integer greater than 1 that is not a prime is termed composite.
Among the first ten positive integers, 2, 3, 5, 7 are primes and 4, 6, 8, 9, 10 are composite
numbers. Note that the integer 2 is the only even prime, and according to our definition the
integer 1 plays a special role, being neither prime nor composite. In the rest of this module,
the letters p and q will be reserved, so as far as possible, for primes.
Theorem
If p is a prime and p | ab, then p | a or p | b
Proof
If p | a, then we need go no further, so let us assume that p a. Because the only positive
divisors of p are 1 and p itself, this implies that gcd(p, a) = 1.
(In general, gcd(p, a) = p or gcd(p, a) = 1 according as p|a or p a.) Hence, citing Euclid’s
lemma, we get p | b. This theorem easily extends to products of more than two terms.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
59. Corollary
If p is a prime and p|a1a2 · · · an, then p|ak for some k, where 1 ≤ k ≤ n.
Proof
We proceed by induction on n, the number of factors. When n = 1, the stated conclusion
obviously holds; whereas when n = 2, the result is the content of Theorem0.15 Suppose, as
the induction hypothesis, that n > 2 and that whenever p divides a product of less than n
factors, it divides at least one of the factors. Now let p|a1a2 · · · an. From Theorem0.15, either
p|an or p|a1a2 · · · a(n−1). If p|an, then we are through. As regards the case where
p|a1a2 · · · a(n−1), the induction hypothesis ensures that p|ak for some choice k, where
1 ≤ k ≤ n − 1. In any event, p divides one of the integers a1, a2, · · · , an
Corollary
If p, q1, q2, · · · , qn are all primes and p | q1q2 · · · qn, then p = qk for some k, where
1 ≤ k ≤ n.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
60. Proof
By virtue of Corollary0.7, we know that p | ak for some k, with 1 ≤ k ≤ n. Being a prime, qk
is not divisible by any positive integer other than 1 or qk itself. Because p > 1, we are forced
to conclude that p = qk
With this preparation out of the way, we arrive at one of the cornerstones of our development,
the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
Every positive integer n > 1 can be expressed as a product of primes; this representation is
unique, apart from the order in which the factors occur.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
61. Proof
If n is a prime; in the former case,there is nothing more to prove. If n is composite, then there
exists an integer d satisfying d | n and 1 < d < n. Among all such integers d, choose p1 to be
the smallest (this is possible by the Well Ordering Axiom). Then p1 must be a prime number.
Otherwise it too would have a divisor q with 1 < q < p, but then q | p1 and p1 | n imply that
q | n, which contradicts the choice of p1 as the smallest positive divisor, not equal to 1,of n.
We therefore may write n = p1n1, where p1 is prime and 1 < n1 < n. If n1 happens to be a
prime,then we have our representation. In the contrary case, the argument is repeated to
produce a second prime number p2 such that n1 = p2n2, that is, n = p1p2n2 1 < n2 < n1
If n2 is a prime, then it is not necessary to go further. Otherwise, write
n2 = p3n3, with p3 a prime: n = p1p2p3n3 1 < n3 < n2
The decreasing sequence n > n1 > n2 > · · · > 1 cannot continue indefinitely, so that after a
finite number of steps nk−1 is a prime, call it,nk. This leads to the prime factorization
n = p1p2 · · · pk
The second part of the proof is the uniqueness of the prime factorization, let us suppose that
the integer n can be represented as a product of primes in two ways; say,
n = p1p2 · · · pr = q1q2 · · · qs r ≤ s where the pi and qj are all primes, written in increasing
magnitude so that
p1 ≤ p2 ≤ · · · ≤ pr , q1 ≤ q2 ≤ · · · ≤ qs
Because p1 | q1q2 · · · qs ,Corollary(0.8) of Theorem (0.15) p1 = qk for some k but then
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
62. Corollary
Any positive integer n > 1 can be written uniquely in a canonical form n = pk1
1 pk2
2 · · · pkr
r
where, for i = 1, 2, · · · , r, each ki is a positive integer and each pi is a prime,with
p1 < p2 < · · · < pr .
To illustrate, the canonical form of the integer 720 = 243251
The Fundamental Theorem of Arithmetic could be used to find the greatest common divisor
and the least common multiple of two or more integers. Let a1a2a3 · · · an be natural numbers.
Using the Fundamental Theorem of Arithmetic,
a1 = pα11
1 pα12
2 · · · pα1k
r
a2 = pα21
1 pα22
2 · · · pα2k
r
...
an = pαn1
1 pαn2
2 · · · pαnk
r
(8)
with positive primes p1 < p2 < · · · < pk and non negative integers αij
where, 1 ≤ i ≤ n and 1 ≤ i ≤ k. For each j = 1, 2, 3 · · · k, put
αj = min{αij : i = 1, 2, · · · , n} and
βj = max{αij : i = 1, 2, · · · , n} then
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
63. gcd(a1, a2, a3, · · · , an) = pα1
1 pα2
2 · · · pαk
k
lcm(a1, a2, a3, · · · , an) = pβ1
1 pβ2
2 · · · pβk
k
Example find the gcd and lcm of the 1029, 1911, 9177. Solution
gcd(1029, 1911, 9177) = 31.71.130.190.230 = 21 and
lcm(1029, 1911, 9177) = 31.73.131.191.231 = 5, 845, 749
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
64. Exercise
Divisibility of Integers and Applications
1 For each pair of numbers, express m in the form m = bq + r, with integers q and r,
0 ≤ r < |b|.
1 37, b = 8
2 m = 342, b = −33
3 m = 495, b = 65
4 m = −936, b = −107
2 Show that the square of every odd integer is of the form 8k + 1.
3 Show that the product of any three consecutive integers is divisible by 6.
4 Show that if a and b are integers and a | b , then ak | bk for every positive integer k.
5 Show that if a and b are positive integers and a | b, a ≤ b.
6 Prove each of the followings.
1 The sum of two odd integers is even.
2 The product of two integers is odd.
3 If (a, 12) = 1,then a = 12q + r with q, r ∈ Z and r = 1, 5, 7or11.
4 Any two consecutive integers are relatively prime.
5 For any integer x, show that (x, x + 2) =
1 if x is odd
2 if x is even
7 Show that 2n2+11 is prime for all integers n with 0 ≤ n ≤ 10, but it is composite
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
65. Numbers with different bases
Activity
For problem 1-6, match the solution with their problem.
1 1110011 + 11001 (binary addition)
2 1010101 + 10101 (binary addition)
3 1111111 + 11111 (binary addition)
4 1111111-111 (binary subtraction)
5 1100111-111 (binary subtraction)
6 1010110-101 (binary subtraction)
A. 10001100 ;
B. 10011110 ;
C. 1101010 ;
D. 1100000 ;
E. 1010001 ;
F. 1111000 ;
Division Algorithm is one of the most important theorems in elementary number theory. In the
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
66. previous section, it was essential in both showing the existence of greatest common divisors for
integers a and b , not all zero, and to find the greatest common divisors. Here we indicate
how every integer can be expressed in any base b, where b is a positive integer greater than 1.
Theorem (Bases Theorem)
Given an integer b > 1, any positive integer N can be written uniquely in terms of powers of b
as
N = ambm + am−1bm−1 + · · · + a2b2 + a1b + a0 Where the coefficients ak can take on the b
different values 0, 1, 2, · · · , b − 1.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
67. Proof
For the Division Algorithm yields integers q1 and a0 satisfying
N = q1b + a0 0 ≤ a0 < b if q1 > b we can divide again
q1 = q2b + a1 0 ≤ a1 < b as soon as qn > b continue the procesess
q2 = q3b + a2 0 ≤ a2 < b
...
qn = qn−1b + an 0 ≤ an < b
(9)
Now substitute for q1, q2, · · · qn in the earlier equation turn by turn to get
N = q1b + a0
= q2b2
+ a1b + a0
= q3b3
+ a2b2
+ a1b + a0
...
= qnbn
+ an−1bn−1
+ an−2bn−2
+ · · · + a2b2
+ a1b + a0
(10)
Because N > q1 > q2 > · · · ≥ 0 is a strictly decreasing sequence of integers, this process must
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
68. eventually terminate, say, at the (m − l) th stage,
where , qm−1 = qmb + am−1, 0 ≤ am−1 < b and 0 ≤ qm < b.
Setting qm = am, we reach the representation
N = ambm + am−1bm−1
+ · · · + a2b2
+ a1b + a0
this is the required representation of N
To show uniqueness, let us suppose that N has two distinct representations, say,
N = ambm + am−1bm−1
+ · · · + a2b2
+ a1b + a0
= cmbm + cm−1bm−1
+ · · · + c2b2
+ c1b + c0
with 0 ≤ ai < b for each i and 0 ≤ cj < b for each j (we can use the same m by simply adding
terms with coefficients at ai = 0 or bj = 0 , if necessary).
Subtracting the second representation from the first gives the equation;
0 = dmbm
+ · · · + d1b + d0
where di = ai − ci for i = 1, 2, 3, · · · ; because the two representations for N are assumed to be
different, we must have di = 0 for some value of i. Take k to be the smallest subscript for
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
69. which dk = 0. Then 0 = dmbm + · · · + dk+1bk+1 + dkbk and so, after dividing by bk.
dk = −b dmbm−k−1
+ · · · dk+1
This tells us that b | dk. Now the inequalities 0 ≤ ak < b and 0 ≤ ck < b leads to
−b < ak − ck < b or |dk| < b. The only way of reconciling the conditions b | dk and |dk| < b
is to have dk = 0, which is impossible. From this contradiction, we conclude that the
representation of N is unique.
The essential feature in all of this is that the integer N is completely determined by the
ordered array
N = ambm + am−1bm−1
+ · · · + a2b2
+ a1b + a0
of coefficients, with the plus signs and the powers of b being superfluous. Thus, the number
may be replaced by the simpler symbol
N = (amam−1 · · · a2a1a0)b
the right-hand side is not to be interpreted as a product, but only as an abbreviation for N.
We call this the base b place-value notation for N. If b is ten, then the representation
(amam−1 · · · a2a1a0)10 is called the decimal representation of N and is simply written as
N = amam−1 · · · a2a1a0
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
70. Small values of b give rise to lengthy representation of numbers, but have the advantage of
requiring fewer choices for coefficients. The simplest case occurs when the base b = 2, and
the resulting system of enumeration is called the binary number system (from the Latin
binarius,two). The fact that when a number is written in the binary system only the integers 0
and 1 can appear as coefficients means that every positive integer is expressible in exactly one
way as a sum of distinct powers of 2. For example, the integer 101 can be written as
101 = 1.26 + 1.25 + 0.24 + 0.23 + 1.22 + 0.21 + 1.20
= 26 + 25 + 1.22 + 1
or in short form
101 = (1100101)2
In the other direction, (11001)2 translates into 25 by 1.24 + 1.23 + 0.22 + 0.21 + 1.20 = 25.
The binary system is most suitable for use in modern electronic computing machines, because
binary numbers are represented by strings of zeros and ones; 0 and 1 can be expressed in the
machine by a switch (or a similar electronic device) being either on or off. Any number we use
with out indicating the base is base ten number.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
71. Exercise
Number with Different bases
1 Obtain the representation of each of the following numbers in the scale of b given
1 m=24567, b=eight
2 m=68392, b=five
3 m=3896, b=two
4 m=698392, b=eleven
5 m=-884325, b=six
2 Find the decimal representation of the following numbers.
1 (342532)six
2 (103405)eleven
3 (23410)eight
4 (103405)seven
3 Calculate the following in the given bases.
1 (3425)seven +(353356)seven +(12456)seven
2 (3542)six - (2345)six
3 (3842)nine - (3648)nine
4 (16225)seven ÷(1012)seven
4 What is 6666 + 1 in base 7?
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
72. Number of Divisors and their sums
Definite function whose domain of definition is the set of positive integers is said to be a
number-theoretic (or arithmetic) function. Although the value of a number-theoretic function
is not required to be a positive integer or, for that matter, even an integer, most of the
number-theoretic functions that we shall encounter are integer-valued. Among the easiest to
handle, and the most natural, are the functions τ and σ.
Definition
Given a positive integer n, let τ(n) denote the number of positive divisors of n and σ(n)
denote the sum of these divisors.
For example of these notions, consider n = 24. Because 24 has the positive divisors
1, 2, 3, 4, 6, 8, 12, 24 we find that τ(24) = 8 and σ(24) = 1 + 2 + 3 + 4 + 6 + 8 + 12 + 24 = 60
For the first few integers number of positive divisors and their sum is
τ(1) = 1, τ(2) = 2, τ(3) = 2, τ(4) = 3, τ(5) = 2, τ(6) = 4, · · · and
σ(1) = 1, σ(2) = 3, σ(3) = 4, σ(4) = 7, σ(5) = 6, σ(6) = 12, · · ·
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
73. Remark
It is not difficult to see that τ(n) = 2 if and only if n is a prime number; also, σ(n) = n + 1 if
and only if n is a prime.
Before studying the functions τ and σ in more detail, we wish to introduce notation that will
clarify a number of situations later. It is customary to interpret the symbol
d|n
f (d),
to mean, ”Sum the values f (d) as d runs over all the positive divisors of the positive integer.”
For instance, we have
d|20
f (d) = f (1) + f (2) + f (4) + f (5) + f (10) + f (20)
With this understanding,τ and σ may be expressed in the form
τ(n) =
d|n
1 and σ(n) =
d|n
f (d)
The notation d|n 1 particular, says that we are to add together as many 1 ’s as there are
positive divisors of n. To illustrate: The integer 10 has the four positive divisors 1, 2, 5, 10
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
74. whence
τ(10) =
d|n
1 = 1 + 1 + 1 + 1
σ(10) =
d|10
f (d) = 1 + 2 + 5 + 10
The following Theorem makes it easy to obtain the positive divisors of a positive integer n
once its prime factorization is known.
Theorem
If n = pk1
1 pk2
2 · · · pkr
r is the prime factorization of n > 1, then the positive divisors of n are
precisely those integers d of the form d = pa1
1 pa2
2 · · · par
r where 0 ≤ ai ≤ ki (i = 1, 2, · · · , r).
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
75. Proof
Note that the divisor d = 1 is obtained when a1 = a2 = a3 = · · · an = 0, and n itself occurs
when a1 = k1, a2 = k2, · · · ar = kr . Suppose that d divides n non trivially; say, n = dd , where
d > 1, d > 1. Express both d and d as products of (not necessarily distinct) primes:
d = q1q2 · · · qs d = t1t2 · · · tu
with qi , tj prime. Then
n = pk1
1 pk2
2 · · · pkr
r = q1q2 · · · qst1t2 · · · tu,
d and d are two prime factorizations of the positive integer n. By the uniqueness of the prime
factorization, each prime qi must be one of the pj. Collecting the equal primes into a single
integral power, we get
d = q1q2 · · · qs = pa1
1 pa2
2 · · · par
r
where the possibility that ai = 0 is allowed.
Conversely, every number d = pa1
1 pa2
2 · · · par
r (0 ≤ ai ≤ ki ) turns out to be a divisor of n. For
we can write
n = pk1
1 pk2
2 · · · pkr
r = pa1
1 pa2
2 · · · par
r .pk1−a1
1 pk2−a2
2 · · · pkr −ar
r = dd
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
76. W
ith d = pk1−a1
1 pk2−a2
2 · · · pkr −ar
r ki − ai ≥ 0 for each i, d > 0 and d|n We put this theorem to
work on one occasion
Theorem
If n = pk1
1 pk2
2 · · · pkr
r is the prime factorization of n > 1, then
(a) τ(n) = (k1 + 1)(k2 + 1) · · · (kr + 1), and
(b) σ(n) =
pk1+1
1 − 1
p1 − 1
pk2+1
2 − 1
p2 − 1
· · ·
pkr +1
r − 1
pr − 1
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
77. Proof
(a) According to Theorem 0.18, the positive divisors of n are precisely those integers
d = pa1
1 pa2
2 · · · par
r where 0 ≤ ai ≤ ar There are k1 + 1 choices for the exponent a1 ;
k2 + 1 choices for a2, · · · ; and kr + 1 choices for ar . Hence, there are
(k1 + 1)(k2 + 1) · · · (kr + 1)possible divisors of n
(b) To evaluate σ(n), consider the product
(1 + p1 + p2
1 + · · · pk1
1 )(1 + p2 + p2
2 + · · · pk2
2 )(1 + pr + p2
r + · · · pkr
r )
Each positive divisor of n appears once and only once as a term in the expansion of this
product, so that
σ(n) = (1 + p1 + p2
1 + · · · pk1
1 )(1 + p2 + p2
2 + · · · pk2
2 )(1 + pr + p2
r + · · · pkr
r )
Applying the formula for the sum of a finite geometric series to the i th factor on the
right-hand side, we get
(1 + pi + p2
i + · · · pki
i ) =
pki +1
i − 1
pi − 1
following this
k1+1 k2+1 kr +1( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
78. Find number of positive divisors and their sum for n = 90. Here 90 = 21.32.51 hence it has
τ(90) = (1 + 1)(2 + 1)(1 + 1) = 12 positive divisors. These are integers of the form 2a1 .3a2 .5a3
where a1 = 0, 1 a2 = 0, 1, 2 a3 = 0, 1 specifically, we obtain
1, 2, 3, 5, 6, 9, 10, 15, 18, 30, 45, 90
The sum of these integers is
σ(n) =
22 − 1
2 − 1
33 − 1
3 − 1
52 − 1
5 − 1
= 234
Multiplicative functions arise naturally in the study of the prime factorization of an integer.
Before presenting the definition, we observe that
τ(2.10) = τ(20) = 6 = 2.4 = τ(2).τ(10)
At the same time, σ(2.10) = σ(20) = 6 = 2.4 = σ(2).σ(10).
These calculations bring out the nasty fact that, in general, it need not be true that
τ(mn) = τ(m)τ(n)andσ(mn) = σ(m)σ(n)
On the positive side of the ledger, equality always holds provided we stick to relatively prime m
and n.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
79. Definition
A number theoretic function f is said to be multiplicative if
f (mn) = f (m)f (n)
whenever gcd(m, n) = 1.
For simple illustrations of multiplicative functions, we need only consider the functions given
by f (n) = 1 and g(n) = n for all n ≥ 1. It follows by induction that if f is multiplicative and
n1, n2 · · · nr are positive integers that are pairwise relatively prime, then
f (n1n2 · · · nr ) = f (n1)f (n2) · · · f (nr )
Multiplicative functions have one big advantage for us: They are completely determined once
their values at prime powers are known. Indeed, if n > 1 is a given positive integer, then we
can write n = pk1
1 pk2
2 · · · pkr
r in canonical form; because the pki
i are relatively prime in pairs, the
multiplicative property ensures that
f (n) = f (pk1
1 )f (pk2
2 ) · · · f (pkr
r )
If f is a multiplicative function that does not vanish identically, then there exists an integer n
such that f (n) = 0. But f (n) = f (n.1) = f (n)f (1)
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
80. Being nonzero, f (n) may be canceled from both sides of this equation to give f (n) = 1. The
point to which we wish to call attention is that f (n) = 1 for any multiplicative function not
identically zero. We now establish that τ and σ have the multiplicative property.
Theorem
The functions τ and σ are both multiplicative functions.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
81. Proof
Let m and n be relatively prime integers. Because the result is trivially true if either m or n is
equal to 1, we may assume that m > 1 and n > 1. If m = pk1
1 pk2
2 · · · pkr
r and n = qs1
1 qs2
2 · · · qjs
s
are the prime factorization of m and n, then because gcd(m, n) = 1, no pi can occur among
the qj. It follows that the prime factorization of the product mn is given by
mn = pk1
1 pk2
2 · · · pkr
r qs1
1 qs2
2 · · · qjs
s
Engaging to Theorem 0.19, we obtain
τ(mn) = (k1 + 1)(k2 + 1) · · · (kr + 1)(s1 + 1)(s2 + 1) · · · (sj + 1)
In a similar manner, Theorem 0.19 gives
σ(mn) =
pk1+1
1 − 1
p1 − 1
· · ·
pkr +1
r − 1
pr − 1
qj1+1
1 − 1
p1 − 1
· · ·
qjs +1
s − 1
qs − 1
=σ(m)σ(n)
Thus, τ and σ are multiplicative functions.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7
82. Exercise
Number of Divisors and their sums
1 Evaluate each of the following
1 τ(2310), σ(2310)
2 τ(7480), σ(7480)
3 τ(4554), σ(4554)
2 Find each natural number m such that
1 τ(m) = 3
2 τ(m) = 6
3 τ(m) = 15
4 σ(m) = 13
5 σ(m) = 40
3 Characterize the natural numbers m for which σ(m) = 12
4 Find the smallest natural numbers m such that
1 τ(m) = 3
2 τ(m) = 10
3 τ(m) = 6
4 σ(m) = 31
5 σ(m) = 42
5 Show that there is no natural number m such that σ(m) = n, forn = 2, 9, 10, 19.
( By Abdulsamad.E) Number Theory November 8, 2018 7 / 7