Download Fundamental Theorem of Arithmetic

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Vincent's theorem wikipedia , lookup

Georg Cantor's first set theory article wikipedia , lookup

Addition wikipedia , lookup

Mathematical proof wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Theorem wikipedia , lookup

Factorization wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Quadratic reciprocity wikipedia , lookup

List of prime numbers wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Prime Numbers
Definition. An integer n is said to be a prime if and only if n > 1 and the only positive divisors of n are
1 and n.
A positive integer n is said to be composite if and only if n > 1 and n is not a prime. Thus, n > 1 is
composite if and only if there exist integers a and b with 1 < a, b < n such that n = a · b.
As an exercise using the division algorithm, we prove the following:
Theorem. If p and p2 + 2 are both primes, then p2 − 2 is also a prime.
Proof. Suppose that p is a prime, when the division algorithm is used to divide p by 3,
p = 3q + r
where 0 ≤ r ≤ 2, so the only possible remainders are r = 0, r = 1, and r = 2.
case 1 : If r = 0, then p = 3q for some positive integer q, and since p is prime, we must have q = 1, so that
p = 3. In this case, p2 + 2 = 32 + 2 = 9 + 2 = 11 is a prime, and p2 − 2 = 9 − 2 = 7 is also a prime. Thus, the
implication is true for p = 3. The implication is also true if p 6= 3 and 3 p, since in this case the hypothesis
is false.
case 2 : If r = 1, then p = 3q + 1 for some positive integer q, and
p2 + 2 = (3q + 1)2 + 2 = 9q 2 + 6q + 3 = 3(3q 2 + 2q + 1)
and 3 p2 + 2. Since the second factor is clearly greater than 1, then p2 + 2 is composite in this case, and
again the implication is true since the hypothesis is false.
case 3 : If r = 2, then p = 3q + 2 for some positive integer q, and
p2 + 2 = (3q + 2)2 + 2 = 9q 2 + 12q + 6 = 3(3q 2 + 4q + 2)
and again 3 p2 + 2. Since the second factor is clearly greater than 1, then p2 + 2 is also composite in this
case, and again the implication is true since the hypothesis is false.
Therefore, if p and p2 + 2 are both prime, then p2 − 2 is also prime.
We will show that there are infinitely many primes, in fact, the proof we give is Euclid’s original proof.
Lemma. Every positive integer n > 1 has a prime divisor.
Proof. Let S = {n ∈ Z | n > 1 and n has no prime divisors}. If S 6= ∅, since S is bounded below, by the
well ordering property S has a smallest element, say n0 ∈ S.
Since n0 > 1 and n0 has no prime divisors, then n0 is composite, and there exist integers a0 , b0 ∈ Z such
that
n0 = a 0 · b 0
where 1 < a0 < n0 and 1 < b0 < n0 .
However, since 1 < a0 < n0 and n0 is the smallest element in S, then a0 6∈ S, which implies that a0 has a
prime divisor, say p a0 , but then p n0 also, which is a contradiction.
Therefore, the assumption that S 6= ∅ leads to a contradiction, and we must have S = ∅, so that every
positive integer n > 1 has a prime divisor.
Theorem. There are infinitely many primes.
Proof. Suppose not, suppose that p1 , p2 , . . . , pN are the only primes. Now consider the integer
M = p1 · p2 · · · pN + 1,
from the previous lemma, M has a prime divisor, and it must therefore be one of the primes p 1 , p2 , . . . , pN .
This is a contradiction, since none of these primes divides M.
The Fundamental Theorem of Arithmetic
The Fundamental Theorem of Arithmetic states that if n > 1 is a positive integer, then n can be written as
a product of primes in only one way, apart from the order of the factors.
Recall that an integer n is said to be a prime if and only if n > 1 and the only positive divisors of n are 1
and n.
In order to prove the fundamental theorem of arithmetic, we need the following lemmas.
Lemma 1. Every integer n > 1 is either a prime number or a product of prime numbers.
proof. We will prove this by induction on n. The lemma is clearly true for n = 2. Assume now that it is
true for every positive integer k with 2 ≤ k < n. If n is not a prime, then it has a positive divisor d with
d 6= 1 and d 6= n. Therefore, n = m · d, where m 6= n. However, both m and d are less than n and greater
than 1, so by the induction hypothesis each of m and d is a product of primes, therefore n is also a product
of primes. This completes the induction.
Lemma 2. If a prime p does not divide a, then gcd(p, a) = 1.
proof. Let d = gcd(p, a), then d p and p is prime, so that d = 1 or d = p. However, d a, so we must have
d 6= p, since p 6 a. Therefore, d = 1.
Lemma 3. If a prime p divides ab, then p a or p b. More generally, if a prime p divides a product a1 a2 · · · an ,
the p divides at least one of the integers ai , for 1 ≤ i ≤ n.
proof. Suppose that p ab and that p 6 a. We will prove that p b. From Lemma 2 we have gcd(p, a) = 1,
and by the Euclidean algorithm there exist integers x and y such that 1 = xa + yp, and therefore,
b = x · ab + yb · p,
so that p b. For the more general statement, use induction on n.
Theorem (Fundamental Theorem of Arithmetic). Every integer n > 1 can be represented as a product of
prime factors in only one way, apart from the order of the factors.
proof. The proof is by induction on n. The theorem is true for n = 2. Assume, then, that the theorem is
true for all integers k with 1 < k < n. We will show that this implies that it is also true for n. If n is prime,
then there is nothing more to prove. Assume, then, that n is composite and that n has two factorizations,
say
n = p 1 p 2 · · · p s = q 1 q2 · · · qt .
(∗)
We want to show that s = t and that each pi equals some qj .
Since p1 q1 q2 · · · qt and p1 is prime, then by Lemma 3, p1 must divide some qj . We may assume then (relabel)
that p1 q1 , and therefore p1 = q1 since they are both primes. In (∗) we can cancel p1 on both sides to get
n
= p 2 · · · ps = q 2 . . . qt .
p1
n
n
< n, and by the induction hypothesis the two factorizations of
must be
p1
p1
identical, apart from the order of the factors. Therefore s = t and the factorizations in (∗) are also identical,
apart from the order of the factors. The induction is complete.
If s > 1 or t > 1, then 1 <
Note: In the factorization of an integer n, a particular prime p may occur more than once. If the distinct
prime factors of n are p1 , p2 , . . . , pk , and if pi occurs as a prime factor αi times, for 1 ≤ i ≤ k then we can
write
αk
1 α2
n = pα
1 p2 · · · pk ,
that is,
n=
k
Y
i
pα
i ,
i=1
and this is called the factorization of n into prime powers. We can also express 1 in this form by taking each
exponent αi = 0.
Corollary. If
n=
k
Y
i
pα
i ,
i=1
then the set of positive divisors of n is the set of all numbers d of the form
d=
k
Y
pβi i ,
i=1
where 0 ≤ βi ≤ αi for i = 1, 2, . . . , k, and the number of positive divisors of n, denoted by τ (n), is given by
τ (n) = (1 + α1 )(1 + α2 ) · · · (1 + αk ).
As an example of the use of the prime factorization of an integer, we have the following result.
Theorem. If n > 1 is a positive integer, then n is a perfect square if and only if n has an odd number of
divisiors.
Proof. Let the prime factorization of n be given by
αk
1 α2
n = pα
1 p2 · · · pk
where p1 < p2 < · · · < pk are distinct primes and for 1 ≤ i ≤ k, each of the integers αi ≥ 1.
Now note that n is a perfect square if and only if each αi is an even integer, that is, if and only if there exist
positive integers βi such that
αi = 2βi
for 1 ≤ i ≤ k.
From the previous corollary, n is a perfect square if and only if the number of divisors of n is
τ (n) = (2β1 + 1)(2β2 + 1) · · · (2βk + 1),
that is, if and only if τ (n) is an odd integer.
Example. The Locker Problem
A certain locker room contains n lockers numbered 1, 2, . . . , n and they are all originally locked. An
attendant performs a sequence of operations T1 , T2 , . . . , Tn whereby with the operation Tk , 1 ≤ k ≤ n, the
condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers
are multiples of k. Show that after all the n operations have been performed, all those lockers whose numbers
are perfect squares (and only those lockers) are now open or unlocked.
proof. Locker number m, for 1 ≤ m ≤ n, will be unlocked after the n operations have been performed if
and only if it has changed state an odd number of times, that is, if and only if the integer m has an odd
number of positive divisors. Therefore, locker number m is unlocked after all n operations are performed if
and only if m is a perfect square.
We will show that the prime factorization of an integer leads to a method to find the greatest common divisor
and the least common multiple of two positive integers. First the definition.
Definition. If a and b are positive
integers,
then the least common multiple of a and b is the smallest
positive integer m such that a m and b m.
Note: The least common multiple of a and b is denoted by [a, b] or lcm(a, b), and its existence is guaranteed
by the well ordering property of the positive integers.
Once the prime power decomposition of the positive integers a and b are known, it is trivial to find both
gcd(a, b) and lcm(a, b), in fact, if
αk
1 α2
a = pα
1 p2 · · · pk
and
b = pβ1 1 pβ2 2 · · · pβk k
where p1 < p2 < · · · < pk are distinct primes, 0 ≤ αi and 0 ≤ βi , for 1 ≤ i ≤ k, (zero exponents are allowed
so that we may use the same primes in the factorization of both a and b), then
min{α1 ,β1 } min{α2 ,β2 }
p2
· · · pk
max{α1 ,β1 } max{α2 ,β2 }
p2
· · · pk
gcd(a, b) = p1
and
lcm(a, b) = p1
min{αk ,βk }
max{αk ,βk }
.
The hard part (how hard is an open question) is finding the prime power decomosition of a positive integer.
From the above, we have an easy proof of the following theorem.
Theorem. If a and b are positive integers, then
gcd(a, b) · lcm(a, b) = a · b.
Proof. Note that for any two real numbers x and y we have
max{x, y} + min{x, y} = x + y
since on the left, one is x and the other is y. Now multiply the prime power decompositions of a and b
together to get
gcd(a, b) · lcm(a, b) = a · b.
As an application of the fundmental theorem of arithmetic, we prove a special case of Dirichlet’s theorem,
which says that if a and b are relatively prime positive integers, then the arithmetic progression
a · n + b,
n≥0
contains infinitely many primes.
Theorem. There are infinitely many primes of the form 4n − 1, where n is a positive integer.
Proof. Note that any odd integer is of the form 4n − 1 or 4n + 1, and the product of any two odd integers
a = 4k − 1 and b = 4` − 1, or the product of an two odd integers a = 4k + 1 and 4` + 1, is of the form 4n + 1.
Suppose that there are only finitely many primes of the from 4n − 1, say p1 , p2 , . . . , pk , where p1 = 3, and
let
Q = 4p2 · · · pk − 1,
then Q is not divisible by any of the primes p1 , p2 , . . . , pk . However, this implies that every prime divisor
of Q is of the form 4n + 1, and as noted above, this implies that Q itself if of the form 4n + 1, which is a
contradiction. Therefore there are an infinite number of primes of the form 4n − 1.
The Sieve of Eratosthenes
Now we give a theorem to determine whether a positive integer is a prime, that is, a simple primality test.
√
Theorem. If n is a composite integer, then n has a prime divisor p such that p ≤ n.
√
√
Proof. If n is composite, then n = a · b, where 1 < a ≤ b < n. If a > n, then b ≥ a > n, and this implies
that
√ √
n=a·b> n· n=n
√
which is √a contradiction. Therefore,
a ≤ n and since a > 1, then a has a prime divisor p such that
p ≤ a ≤ n, and since p a and a n, then p n also.
Before the advent of the computer, one of the most efficient methods of constructing tables of primes was the
sieving process, invented by the Greek mathematician Eratosthenes (276-194 B.C.). The method is called
the Sieve of Eratosthenes.
We illustrate the method by constructing a table containing all primes less that 130. We begin by listing
all the integers from 2 to 129 (since 1 is not a prime it is not listed). The work involved in the process is
simplified by the previous lemma.
The first number in our list, 2, must be a prime and no multiple of 2 except 2 itself can be prime. We remove
all multiples of 2 (except 2 · 1) from our list. The next remaining number, 3, must be a prime, so we delete
all the multiples of 3. We now
√ delete the multiples of 5, the multiples of 7, and the multiples of 11. Because
the largest prime less than 130 is 11, then from the lemma, all the remaining numbers must be primes.
In the table below, rather than delete multiples of 2, 3, 5, 7, 11, we have underlined the integers that were
not deleted, thus, the primes less than 130 are all underlined.
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49
50 51 52 53 54 55 56 57 58 59
60 61 62 63 64 65 66 67 68 69
70 71 72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87 88 89
90 91 92 93 94 95 96 97 98 99
100 101 102 103 104 105 106 107 108 109
110 111 112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127 128 129
The sieve of Eratosthenes can be used
√ to derive a formula for the number of primes less than or equal to n
if the primes less than or equal to n are known. Although this formula is very awkward to use, it is the
only formula for the exact value of π(n).