0% found this document useful (0 votes)
22 views4 pages

Lec04 PrimeNumbers

This document provides a summary of a lecture on prime numbers. It defines prime and composite numbers, provides examples of each, and states fundamental theorems about primes, including: 1) Every integer can be expressed as a product of prime numbers 2) There are infinitely many prime numbers (proven by Euclid) 3) Certain arithmetic progressions, such as numbers of the form 4n+3, contain infinitely many prime numbers (Dirichlet's theorem) The document also discusses methods for finding primes, such as the Sieve of Eratosthenes, and the largest known primes including Mersenne primes.

Uploaded by

James Mlotshwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Lec04 PrimeNumbers

This document provides a summary of a lecture on prime numbers. It defines prime and composite numbers, provides examples of each, and states fundamental theorems about primes, including: 1) Every integer can be expressed as a product of prime numbers 2) There are infinitely many prime numbers (proven by Euclid) 3) Certain arithmetic progressions, such as numbers of the form 4n+3, contain infinitely many prime numbers (Dirichlet's theorem) The document also discusses methods for finding primes, such as the Sieve of Eratosthenes, and the largest known primes including Mersenne primes.

Uploaded by

James Mlotshwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lec04: Prime Numbers

28 February 2023, MATH4024-Number Theory, Lecturer: Prof A. Munagi

1 Introduction
An integer n is called prime if n > 1 and if the only positive divisors of n are 1 and n.
If n > 1 and if n is not prime, then n is called composite.
Examples: some primes are 2,3,5,7,11,. . . ,89,97,101,103,. . . ,127,157,257,3583,3659.
Thus a number n is composite iff ∃ integers a, b with 1 < a < n and 1 < b < n such
that n = a · b.
Some composite numbers are 4,6,8,9,10,12,14,. . . , 91,92,93,94,95,96,98,99,100,102,111
with
4 = 2 · 2, 30 = 2 · 3 · 5, 111 = 3 · 37, . . . . . . . . ..
Note that 1 is neither prime nor composite.
Prime numbers are the multiplicative building blocks of the integers.

Theorem 1.1. Every integer n > 1 is either a prime number or a product of prime
numbers.

Proof. We apply strong induction on n. The theorem is clearly true for n = 2. Assume it
is true for every integer < n. Then if n is not prime it has a positive divisor d 6= 1, d 6= n.
Hence n = cd, where c 6= n. But both c and d are < n and > 1 so each of c, d is a
product of prime numbers, hence so is n.

The following theorem is fundamental to the study of prime numbers.

Theorem 1.2 (Euclid). There are infinitely many prime numbers.

Proof. Suppose there are only a finite number of primes, p1 , p2 , . . . , pn . Let

Qn = p1 p2 · · · pn + 1.

1
Prof A. Munagi Prime Numbers MATH4024-Number Theory

Now Q > 1, so Q has a prime divisor, say q. Then notice that q 6= pj for j = 1, 2, . . . , n.
If q = pj , then q|(Qn − p1 p2 · · · pn ) or q|1 which s impossible. Thus q must be a new
prime not in the original list. Hence there are infinitely many primes.

Remark 1.3. It might be instructive to examine some cases of Qn .

Q2 = 2 · 3 + 1 = 7 (prime)
Q3 = 2 · 3 · 5 + 1 = 31 (prime)
Q4 = 2 · 3 · 5 · 7 + 1 = 211 (prime)
Q5 = 2 · 3 · 5 · 7 · 11 + 1 = 2311 (prime)
Q6 = 2 · 3 · 5 · 7 · 11 · 13 + 1 = 30031 = 59 · 509 (bigger primes)
.. .. .. .. ..
. . . . .

Remark 1.4. Euclid proved a more general statement than Theorem 1.2, namely, he
showed that the same proof works for any finite set of primes (not just the initial ones).

Exercise 1. Let R = {pj1 , pj2 , . . . , pjk } be a set of k distinct primes. Prove that there
is at least one prime number q ∈ / R.

1.1 Finding Primes



Exercise 2. Prove: If n is a composite integer, then n has a prime factor ≤ n.

Exercise 2 implies the first Primality Test:



“n is prime ⇐⇒ n has no prime divisors ≤ n ”.

Given a real number x, the prime counting function π(x), is defined as the number
of primes not exceeding x.

π(x) = {p | p is prime and p ≤ x}.

We can find all primes counted by π(n) using the Sieve of Eratosthenes. It is a
very efficient algorithm based on Exercise 2. √
For example, to find primes ≤ 40, we first note that the primes p satisfying p ≤ 40
are p = 2, 3, 5.
Then according to this sieve, we start by writing out the consecutive integers from
1 to 40:

2
Prof A. Munagi Prime Numbers MATH4024-Number Theory

1 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
Next, successively cross out all multiples of p, except p, for each p = 2, 3, 5. Thus when
this step is executed for p = 2 (using a slash /) and for p = 3 (using a backlash \), we
get

1 2 3 4 5 6A 7 8 9A 10


11 12
Z

Z
 13 14
 Z
 15
Z 16
 17 18
Z

Z
 19 20


21
Z
Z 22

 23 24
Z 25 
Z

 26
 27
Z
Z 28

 29 30
Z

Z

31 32

 33
Z
Z 34
 35 
 36
Z

Z 37 38

 39
Z
Z 40


When this step is also executed for p = 5 (this would cross out 25 and 35), we find
that the remaining numbers, not marked in the list (except 1), are all the primes less
than or equal to 40, namely,

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37.

Hence by actual count we obtain π(40) = 12.

Exercise 3. Use the sieve of Eratosthenes to show that π(100) = 25.

Exercise 4. Use the sieve of Eratosthenes to find all primes less than 200.

1.2 Largest Known Primes


Exercise 5. Let a, n ∈ Z+ . Prove that an − 1 is prime only if a = 2 and n is prime.

Primes of the form Mp = 2p − 1 are called Mersenne Primes.


Examples: 2p − 1 for p = 2, 3, 5, 7, 13, . . . correspond to the Mersenne primes
3, 7, 31, 127, 8191, . . ..
The largest known primes are Mersenne primes.
There is a special test to determine the primality of 2p − 1 without performing trial
division. Currently the world record for the largest prime known is
282589933 − 1 (a number with 24,862,048 decimal digits)!
It is an unsolved problem whether there exist infinitely many Mersenne primes.
Numbers of the form Mn = 2n − 1 without the primality requirement are also called
Mersenne numbers.

3
Prof A. Munagi Prime Numbers MATH4024-Number Theory

2 Primes in Arithmetic Progression


Every odd integer is either of the form 4n + 1 or the form 4n + 3.
4n + 1 : 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, . . .
4n + 3 : 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, . . .
Are there infinitely many primes in each class? Put your money on yes!
What about other arithmetic progressions such as 3n + 1, 7n + 4, 8n + 7, etc? Does each
of these contain infinitely many primes?
German mathematician G. L. Dirichlet (1805 - 1859) settled this question in 1837,
when he published a proof of the following theorem.

Theorem 2.1 (Dirichlet). Suppose a and b are positive integers not both divisible by
some prime. Then the arithmetic progression

an + b, n = 1, 2, 3, . . . ,

contains infinitely many primes.

We consider a special case of Dirichlet’s theorem below.


Exercise 6. Prove that the product of any two integers of the form 4n + 1 is again of
this form.

Theorem 2.2. There are infinitely many primes of the form 4n + 3, where n ∈ Z.

Proof. Assume that there is only a finite number of primes of the form 4n + 3, say
p0 = 3, p1 , p2 , . . . , pr , and let
Q = 4p1 p2 · · · pr + 3.
Then there is at least one prime in the factorization of Q of the form 4n + 3. Otherwise
all the prime factors would be of the form 4n + 1, and by Exercise 6, this would imply
that Q is of this form, a contradiction.
But none of the primes p0 , p1 , . . . , pr divides Q. Note that 3 - Q, for if 3|Q,
then 3|(Q − 3) =⇒ 3|4p1 p2 · · · pr , a contradiction. Similarly, if pj |Q, then pj |(Q −
4p1 p2 · · · pr ) =⇒ pj |3, which is absurd.
Hence there are infinitely many primes of the form 4n + 3.

You might also like