Number Theory
- Number Theory
- Divisors and Division
- Factorization into Primes
- Some Basic Facts About Primes
- Congruences and Modular Arithmetic
- Application: Diffie-Hellman Key-Agreement
Number Theory
Divisors and Division
π‘ For integers and we say that divides , denoted , if there exists an integer such that . In this case, is called a divisor of , and is called a multiple of . If and a divisor exists it is called the quotient when is divided by , and we write or . We write if does not divide .
π Euclidβs Theorem: For all integers and there exist unique integers and satisfying
Hence is called the dividend, is called the divisor, is called the quotient, and is called the remainder. The remainder is often denoted as or sometimes as .
π‘ For integers and (not both 0), an integer is called a greatest common divisor of and if divides both and and if every common divisor of and divides , i.e., if
π‘ For (not both 0) one denotes the unique positive greatest common divisor by and usually calls it the greatest common divisor. If , then and are called relatively prime.
π For any integers , and , we have
π‘ The above lemma implies in particular that
which is the basis for Euclidβs well-known -algorithm: Start with and repeatedly replace the pair by the pair until the remainder is 0, at which point the last non-zero number is equal to .
π‘ For , the ideal generated by and , denoted by , is the set
Similarly, the ideal generated by a single integer is
π For there exists such that .
π Let (not both 0). If , then is a greatest common divisor of and .
π For (not both 0), there exist such that
π‘ The least common multiple of two positive integers and , denoted , is the common multiple of and which divides every common multiple of and , i.e.,
Factorization into Primes
π‘ A positive integer is called prime if the only positive divisors of are 1 and . An integer greater than 1 that is not a prime is called composite.
π The fundamental theorem of arithmetic: Every positive integer can be writter uniquely (up to the order in which factors are listed) as the product of primes.
π If is a prime which divides the product of some integers , then divides one of them, i.e., for some .
π‘ Expressing and : The fundamental theorem of arithmetic assures that integers and can be written as
This product can be understood in two different ways. Either it is over all primes where all but finitely many of the are 0, or it is over a fixed agreed set of primes. Either view is correct. Now we have
and
It is easy to see that
because for all we have
π is irrational unless is a square ( for some ).*
Some Basic Facts About Primes
π There are infinitely many primes.
π Gaps between primes can be arbitrarily large, i.e., for every there exists such that the set contains no prime.
π‘ The prime counting function is defined as follows: For any real , is the number of primes .
π .
β Conjecture: There exist infinitely many twin primes, i.e., primes for which also is prime.
β Goldbachβs Conjecture: Every even number greater than 2 is the sum of two primes.
π Every composite integer has a prime divisor .
Congruences and Modular Arithmetic
π‘ For with , we say that is congruent to modulo if divides . We write or simply , i.e.,
π For any , is an equivalence relation on .
π‘
π If and , then
π Let be a multi-variate polynomial in variables with integer coefficients, and let . If for , then
π For any with ,
π Let be a multi-variate polynomial in variables with integer coefficients, and let . Then
π The congruence equation
has a solution if and only if . The solution is unique.
π‘ If , the unique solution to the congruence equation is called the multiplicative inverse of modulo . One also uses the notation or .
π The Chinese Remainder Theorem (CRT): Let be pairwise relatively prime integers and let . For every list with for , the system of congruence equations
for has a unique solution satisfying .
π‘ Useful theorems involving modular arithmetic:
- For any : .