You are on page 1of 26

Let us get into some of …

Elementary Number Theory

Neha Gupta, PhD


Assistant Professor
Department of Mathematics
Shiv Nadar University

1
Introduction to Number Theory
Number theory is about integers ( ) and their properties.

We will discuss today basic principles of

• divisibility
• division algorithm
• modular arithmetic
• congruence relation
• some problem solving using these principles

2
Properties of Congruence relation:

Theorem: Let m be a positive integer. The integers a and b are congruent


modulo m if and only if there is an integer k such that a = b + km.

Theorem: Let m be a positive integer. If


a  b (mod m) and
c  d (mod m), then

i) a + c  b + d (mod m) and
ii) ac  bd (mod m).

3
Properties of Modular arithmetic:

1. [(a mod n) + (b mod n)] mod n = (a + b) mod n


2. [(a mod n) - (b mod n)] mod n = (a - b) mod n
3. [(a mod n) x (b mod n)] mod n = (a x b) mod n
Exponentiation
Exponentiation is done by repeated multiplication, as in
ordinary arithmetic.
Problem 1 :
Suppose we want to find the units digit of the following sum:

Solution : We could find their sum, which is 8221 and conclude that the units
,

digit is 1 However, we could find the units digit with far less calculation.
.

Solution using modular arithmetic


We can simply add the units digits of the addends:

And, we extract them using remainder after dividing by 10.

So,
Problem 2: Find the remainder when the difference
between 60002 and 601 is divided by 6.

Solution :
Problem 3:

• Solution : This can also be stated as


First, lets calculate a few powers of 7 : • 71 = 7 • 75 = 16807
• 72 = 49 • 76 = 117649
• 73 = 343 • 77 = 823543
• 74 = 2401 • 78 = 5764801, etc…

Analyze the pattern here. The last digit of powers of 7 repeats in the pattern [7,9,3,1],
[7,9,3,1].. So, we can generalize this as:
last digit of 74m+1 is 7, last digit of 74m+2 is 9 ,
last digit of 74m+3 is 3, and last digit of 74m is 1.
• Now, in modular arithmetic, 7 = (1)4 + 3
3 = (0)4 + 3
7 ___ mod 4 -1 = (-1)4 + 3
7 3 mod 4 -5 = (-2)4 + 3
7 -1 mod 4 Also, 7 -5 mod 4
Hence,
71000 (-1)1000 (mod 4)
(1) (mod 4)
1 (mod 4) (remainder is 1 when divided by 4)
That is, 71000 = 4m + 1
From prev slide,
the last digit of 7 4m+1 is 7,
the last digit of 7 4m+2 is 9
the last digit of 7 4m+3 is 3, and
the last digit of 7 4m is 1.
7
= the last digit of 74m+1 = .
Hence, the last digit of
Problem 4: What are the tens and units digits of
• Solution: We begin by writing down the first few powers of 7 (mod 100)

• Which means,
• 74m+1 (mod 100) = 07 and 74m+2 (mod 100) = 49
• 74m+3 (mod 100) = 43 and 74m+0 (mod 100) = 01

Now 1942 = (485)4 + 2, so


mod 100

• Hence, tens and units digits are 4 and 9 respectively .


The last digit of powers(2,3,4,1) of 1 to 9 :
Problem 5 : Can you find a number that is both a multiple of 2 but not a multiple of 4 and a
perfect square?

Solution : If the required number n is not a multiple of 4, then it must


be one of these forms : 4m + 1, 4m + 2, 4m + 3, for some integer m.

Further, the required number n is a multiple of 2, so the only form it


can be is 4m + 2. (-ie- n = 4m + 2, which implies that n mod 4 = 2)

Lastly, this number n is a perfect square, which means n = 4m + 2 = x2 ,


for some integer x.
Now x when divided by 4, can have four options for remainders: 0,1,2,3
• Lets work with all the cases:

• Thus, n = x2 is never going to be 2 mod 4. This assures us that it is


impossible to find such a number!
Summary of useful facts:
Applications of Modular Arithmetic
• Simplifying Extensive Calculations
• theoretical mathematics : modular arithmetic is one of the foundations of number theory;
• It is also used extensively in group theory, ring theory, knot theory, and abstract algebra;
• Applied mathematics: it is used in computer algebra, computer science, chemistry and
the visual and musical arts.
• Cryptography
• Directly Underpins Public Key Systems such as RSA and Diffie-Hellman
• Provides Finite Fields which Underlie Elliptic Curves
• Used in Symmetric Key Algorithms – AES, IDEA, RC4
• A very practical application : International Standard Book Number (ISBN) uses modulo 11 or
modulo 10 (if issued after 1 January, 2007) arithmetic for error detection.
Likewise, International Bank Account Numbers (IBANs), make use of modulo 97 arithmetic to
spot user input errors in bank account numbers.
ISBN bar code

• To maintain global standards for business communication.


• Products can be scanned electronically.
International Standard Book Number (ISBN)
• An ISBN is assigned to each edition and variation (except reprinting's) of
a book.
• For example, an ebook, a paperback, and a hardcover edition of the
same book would each have a different ISBN.
• The ISBN is 13 digits long if assigned on or after 1 January 2007, and 10
digits long if assigned before 2007.
• An International Standard Book Number consists of 4 parts (if it is a 10
digit ISBN) or 5 parts (for a 13 digit ISBN):
ISBN-10 Check Digit
• A check digit is a form of redundancy check used for error detection.
• It consists of a single digit computed from the other digits in the number.
• For an ISBN-10 check digit, x1 … x10 we have

• It is also true for ISBN-10 that the sum of all the ten digits, each multiplied by its weight
in ascending order from 1 to 10, is also a multiple of 11

• For example, for an ISBN-10 of 0-306-40615-2


Problem :
Calculate the check digit s for an ISBN-10 of 0-306-40615-s.
Solution :

Alternatively,

Note : The value of the check digit (x10) required to satisfy this condition might be 10; if
so, an 'X' should be used
ISBN-13 check digit calculation
• The ISBN-13 check digit, which is the last digit of the ISBN, must range from
0 to 9
• Procedure : Each digit of the ISBN, from left to right, is alternately multiplied
by 1 or 3, then those products are summed modulo 10 to give a value
ranging from 0 to 9
• Formally, using modular arithmetic, we can say that
ISBN-10 to ISBN-13 conversion

• The conversion is quite simple as one only needs to prefix "978" to


the existing number and then calculate the new checksum using the
ISBN-13 algorithm.
Find missing ISBN digit
Rough Sheet
Multiples of 11:
ISBN code = 01985_8030 198
209
Solution : 220
231
We have 242
253
0 1 9 8 5 x 8 0 3 0
10 9 8 7 6 5 4 3 2 1 205 + 5.0 = 205
205 + 5.1 = 210
205 + 5.2 = 215
205 + 5.3 = 220
This gives us
0 + 9 + 72 + 56 + 30 + 5x + 32 + 0 + 6 + 0 = 205 + 5x = multiple of 11

Hence x = 3
End of slide
Components of ISBN
• for a 13-digit ISBN, a prefix element – so far 978 or 979 have
been made available by GS1,
• the registration group element (language-sharing country
group, individual country or territory),
• the registrant element,
• the publication element, and
• A checksum character or a check digit
GS-1
• GS1 is a non profit organisation that develops and maintains global standards for
business communication.
• The best known of these standards is the barcode, a symbol printed on products that
can be scanned electronically
• making it easier for products to be tracked, processed, and stored.

You might also like