Number theory concerns the study of integers. It is over 2000 years old and is still being actively researched today. It is famous for simply stated conjectures that have eluded proof for hundreds of years, but the theory is also vital to various applications. For example, data encryption is based on theories, conjectures, and algorithms that arise from number theory; it is used every time you send your credit card number over the internet. It is not possible to understand how the data encryption algorithms work without knowing some number theory.
Typically in number theory, we use the phrase ``
divides
''
to mean that
divides
without remainder.
That is, there exists an integer
with
.
The greatest common divisor of two positive integers
and
is the largest positive integer that divides both
and
.
For example,
,
,
.
Exercise: Compute
,
,
.
One way to find greatest common divisors is to compute all the factors of each number, but that is very slow for large numbers. Much of the utility of number theory is derived from the fact that there is a simple and fast algorithm to find the greatest common divisor known as the Euclidean Algorithm. In general, for many large numbers, the Euclidean Algorithm is conjectured to be a million (or more) times faster than any algorithm that tries to find all the factors of each number individually. There are important data encryption algorithms that take advantage of this.
The Euclidean Algorithm:
Example: Find the greatest common divisor ofand
:
Exercise: Use the Euclidean Algorithm to find
and
.
The Game of Euclid:
This is a game played by two people. Beginning with two positive integers, the players alternate turns making moves of the following type:
A player can move from the pair of positive integersThe winner is the one that first makes one element zero.to any of the pairs
where
is an integer and
. Thus, you can subtract any multiple of the smaller number from the larger number, provided you still have two nonnegative numbers.
Play the game of Euclid with a partner and for different starting pairs
of integers
. Verify that you always end up with the pair
at the end of the game.
Can you prove that this is always the case?
Can player 1 always win the game of Euclid? Can player 2 always win? What is the best strategy?
Further topics:
Exercise:
For each integer
from 2 to 12, find all positive integers less than
that are relatively prime to
.
The Euler phi-function
is defined to be the number of
positive integers not exceeding
that are relatively prime to
.
Exercise:
Use the result from the previous exercise to determine the values of the
Euler phi-function for
from 1 to 12.
Do you see a pattern?
(You can generate this sequence using Maple:
with(numtheory): [ seq(phi(n),n=1..100)]; )
Two numbers are congruent modulo
(written
)
if
divides
.
Exercise: For each integer from 0 to 3 find two other integers congruent to it modulo 4.
Exercise:
Suppose that
and
.
Is it true that
?
Can you prove it? Can you prove that
?
A famous and nontrivial result that is also used in data encryption
algorithms is Euler's Theorem: If
is a positive integer
and
is a positive integer relatively prime to
then
Exercise:
Verify Euler's Theorem for
and
and for
and
.