• Nem Talált Eredményt

Primes

In document Discrete mathematics (Pldal 14-17)

2. Integers

2.2. Primes

As we know from earlier, the primes are the integers whose have exactly two positive divisors. Evidently, this two divisors are 1 and the absolute value the number. By this definition, none of the integers is prime, because 0 has infinite number of positive divisors, whereas the other two have only one. The following statements give us a fair show to characterize the primes in other ways.

1.

An integer other than 0 and is prime if and only if it can only be written as a product of two integers that one of the factors is or 1.

2.

An integer other than 0 and is prime if and only if implies or .

The second statement can be expressed as a prime can only divide a product, if it divides one of the factors of the product. For example, 6 is not prime, because but 6 does not divide either 2 or 15.

The next theorem shows that the primes can be considered as the building blocks of the integers.

Theorem 1.2 (The fundamental theorem of arithmetic). Every integer other than 0 and is a product of finite number of primes (with perhaps only one factor) in one and only one way, except for the signs and the order of the factors.

So, the prime factorizations , , and of 10 are essentially the same.

Proof. We first prove the theorem for natural numbers: we are going to show that every natural number greater than 1 can be uniquely (in the above sense) expressed as a product of finite many primes. We use induction: let first . Since 2 is prime, so we can consider it as a product with a single factor. Assume the statement for all natural numbers from 2 tok. We are going to show that the statement is true for as well. This is obvious if is prime. Otherwise, there exist natural numbers and such that , and . By the inductive hypothesis, and can both be written as product of finite number of primes, and so is .

In order to prove the uniqueness, assume that the natural number is the product of prime numbers in two different ways:

From the natural numbers to the real therefore . This means that there cannot be two essentially different factorizations.

It remaind the case when when n is an integer less than . Then is a natural number greater than 1, so, as we have seen before, is a product of finitely many positive primes:

. Then is a possible prime factorization.

Furthermore, ifn had two prime factorization differ not only in the order and signs of the prime factors, then would have two prime factorization like that, which contradicts to the above-mentioned conclusion.

Let us mention that for , in the expression the primes are not necessarily distinct. By collecting the same primes together, n can be written in the form

where are distinct primes and are positive integers. This representation of n is called the canonical factoring of n.

It is clear that if and , then the canonical factoring of d is of the form

where . In other words, a prime occurs in the canonical

factoring of d only if it also occurs in the canonical factoring of n, and its exponent is certainly not greater. The converse is also true: every natural number of canonical factoring like that divides n. As a consequence, for and , can be determined by writing the prime factorizations of the two numbers as follows: take all common prime factors with their the smallest exponent and multiply them together. For instance, and . The common prime factors are 2 and 7, the least exponent for 2

is 2, for 7 is 1, so =28.

It also follows from the fundamental theorem of arithmetic that every integer different form 0 and is divisible by a prime.

Once prime numbers possess such an important role, let us observe some statements referring to them. We show first that the number of primes is infinite. Indeed, if we had only finite number of primes, and say, were the all, then let us see what about the integer . According to fundamental theorem of arithmetic, N can be written as a product of primes. Since N is not divisible by

, there must exists primes distinct from , which is a contradiction.

From the natural numbers to the real numbers

If we would like to decide that whether a natural number is a prime or not, it is enough to investigate if if has any positive divisor different from itself and 1 or not. Let pbe the least positive divisor of n. Then for some integer c. As c is also a divisor of n, so , and . Hence

, which means that the least positive divisor different form 1 of cannot be grater than . For example, in order to observe if 1007 is a prime or not, it is enough to look for positive divisors up to

. Moreover, it sufficient to search amongst the primes, so we must verify the divisibility of 1007 by only the primes 3, 5, 7, 11, 13, 17, 19, 23, 29 and 31. By checking one and all it turns out that 19 divides 1007, so 1007 is not prime.

Finally, we can see an algorithm for finding all prime numbers up to any given limit. Create a list of integers from 2 to n:

We frame the first number of the list and cross out all its multiples:

The next unframed and uncrossed number on the list is the 3, we frame it and cross out all its multiples (some of them may have already been crossed out, in this case there is no need for crossing out it again):

The method continues the same way: the first uncrossed and unframed number gets framed, and its multiples get crossed. About the framed numbers it can be stated, that they cannot be divided by any number which is smaller than them and bigger than 1, namely, a prime. The crossed numbers are the multiples of the framed ones, so they cannot be primes. This algorithm is known as the Sieve of Eratosthenes. It also follows from the above-mentioned facts that if we have already framed all primes up to , then every unmarked element of the original list will be prime.

Figure 1.6. The list of primes below 100

From the natural numbers to the real numbers

In document Discrete mathematics (Pldal 14-17)