Number theory is an area of mathematics that has grown from studies of natural numbers
or, slightly more generally, studies of integers
to much more complicated structures, but you still can trace the origins of its problems to the set of integers (denoted by ). We meet integers for the first time in childhood, and they can seem well-known, boring, and useful only for counting things. None of this is right if we take a closer look. There are still a lot of unsolved problems concerning integers, they exhibit surprising patterns and relationships. And, unexpectedly, in the 20th-century number theory has become crucial for computer security.
Let's learn some basic number theory concepts.
Divisibility
We can add, subtract and multiply integers. But we are not always able to divide one integer by another if we want the result to stay within the realm of integers. This leads us to a fundamental definition:
Given two integers and , we say that divides , or that is divisible by , if there is some integer such that (we also say that is a multiple of ).
If divides , we denote it as . For example, , because . Also, (check it!), but doesn't divide , because no multiple of is equal to .
Using only the definition, we can derive the property of transitivity:
If and , then .
Indeed, for some integer and for some integer , so, is a multiple of .
If , we also say that is a divisor of . For instance, has 6 positive divisors () and the same number of negative divisors ().
Prime numbers and the unique factorization
Let be a positive integer and . Trivially, and divide . If and are the only positive integers dividing , we say that is a prime number, or simply a prime. If but is not a prime, we say that is composite. The number is not considered to be either prime or composite. The first few primes are
Now let's look at a famous theorem with a solemn name:
The Fundamental Theorem of Arithmetic: Every positive integer can be written uniquely (except for the order of factors) as a product of primes.
For instance, . We wrote primes in this factorization in the increasing order, it's a common practice. Also, it is convenient to bunch together all equal factors: .
So, the primes act as ''building blocks'' for all positive integers (and if we can also apply negation — for all non-zero integers). But surprisingly, we do not have an efficient algorithm for factoring an arbitrary integer into a product of primes. This fact is extremely important for modern cryptography.
The greatest common divisor
Suppose we have two integers, such as and . We can look for common divisors, i.e., integers that divide both of them. For example, is their common divisor, and you can easily notice it is their largest common divisor. Similarly, is a common divisor of and , but it is not the largest, since is also a common divisor.
Mathematicians usually use "the greatest common divisor" instead of "the largest common divisor", and this simple concept turns out to be extremely important in applications.
Definition: The greatest common divisor of two integers and (at least one different from zero) is the largest integer that divides both of them.
The greatest common divisor of and is denoted by . If , we say that and are relatively prime. Try to check, for example, that (i.e., these numbers are relatively prime) and .
We'll soon study a simple, but efficient algorithm to compute the greatest common divisor of any two integers. The extended version of this algorithm is crucial for some modern cryptosystems.
Conclusion
In this piece of theory, we have started exploring a more advanced part of the number theory and got acquainted with the concept of divisibility more thoroughly. Let's now quickly go over the most notable points:
- Divisibility is denoted by and reads as " divides ", which also means that is divisible by without a remainder.
- Divisibility is transitive, which means that if divides and divides , then divides .
- According to the Fundamental Theorem of Arithmetic every positive number can be uniquely represented as a product of primes.
- The greatest common divisor of two integers and or the largest integer that divides both and is denoted by .