Download Link to project draft - Department of Mathematics

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

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

Theorem wikipedia , lookup

Large numbers wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Addition wikipedia , lookup

Elementary mathematics wikipedia , lookup

Quadratic reciprocity wikipedia , lookup

List of prime numbers wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Computation and Distribution of
Primes
May 13, 2014
Amy Chai-Feng Zhang
A thesis submitted to the Department of Mathematics of the University
of Hawaii in partial fulfillment of Plan B for the Master’s Degree in
Mathematics.
Thesis Committee:
Dr. Thomas Craven
Dr. Michelle Manes
Graduate Committee:
Dr. David Ross
Dr. Daisuke Takagi
Dr. Rufus Willett
Dr. George Wilkens
Dr. Thomas Hangelbrock
Acknowledgments
First, I would like to thank Professor Craven for introducing me to the
subject of number theory and for guiding the direction of my research. Without his tireless help this thesis would not have been possible. Secondly, I
would like to thank Professor Thomas Craven for his commitment and for
devoting regular weekly time to meet with me and teach me mathematics
as my advisor. I am also thankful to Professor J.B. Nation and Professor
George Wilkens for advice throughout the year.
There are many others to whom I am grateful in the mathematics department at the University of Hawaii, including all my professors and all my
fellow graduate students.
ii
Abstract
The earliest surviving record of the study of prime numbers came from
the Ancient Greeks. About 300 BC, Euclid’s Elements contained important
theorems about primes which included the infinitude of primes and the fundamental theorem of arithmetic. In the 3rd century BC, an ancient Greek
mathematician, Eratosthenes created the Sieve of Eratosthenes which was
a simple algorithm for finding all prime numbers up to a specified integer.
The large primes found today with computers have other ways to compute
them.
In this thesis, we address questions of how to recognize primes, how to
count primes, how to generate primes, and where the primes are located
among the integers.
iii
Contents
Acknowledgments
ii
Abstract
iii
1.
History and Introduction
1
1.1.
Fundamental Theorem of Arithmetic
1
1.2.
Euclid’s Proof
2
1.3.
Euler’s Proof
2
1.4.
Mersenne Numbers
3
1.5.
Fermat Primes
3
2.
2.1.
2.2.
2.3.
Prime Counting Function
5
The Sieve of Eratosthenes
5
Exact Formula from Mináč
5
Exact Formula from Meissel, 1871
8
3.
Ramanujan’s Proof of Bertrand’s Postulate
14
4.
Approximating the nth Prime
20
5.
Gaps between Primes
21
6.
Conclusion
23
References
24
iv
1. History and Introduction
A prime number (or prime) is a natural number greater than 1 that has
no positive divisors other than 1 and itself. Prime numbers are important
numbers in mathematics because primes can be considered the “basic building blocks” of the natural numbers as we shall see below. We begin with a
careful definition. We choose to limit ourselves to positive numbers, though
the definition is easily generalized.
Definition 1.1 (Prime Numbers). A natural number (i.e. 1,2,3,4,5,6, etc.)
is called a prime or a prime number if it has exactly two distinct positive
divisors, 1 and the number itself.
A natural number greater than 1 that is not a prime number is called a
composite number. For example 3 is prime because only 1 and 3 divide it,
but 4 is a composite number because it has three divisors 1, 2, and 4.
In his expository book [3], Paulo Ribenboim who is a professor Emeritus
of Mathematics at Queen’s University, Ontario, raises four questions:
How many prime numbers are there?
How can one generate primes?
How can one know if a given number is prime?
Where are the primes located?
These four questions are still not completely solved today. But there are
some partial results which can be obtained by hand computation. Some of
these results are Euclid’s and Euler’s proofs that there are infinitely many
primes, the Sieve of Eratosthenes for finding primes, Mersenne numbers
for prime candidates and formulas to count how many prime numbers are
less than a given x. Bertrand’s Postulate states that there is always a
prime number between a natural number and the double of that number.
Even though there is no formula for primes, prime numbers still hold great
importance in mathematics and in new technology because primes serve as
the building blocks for all positive integers. More generally prime elements,
prime ideals, the fundamental theorem of arithmetic have application in
cryptography and other fields.
1.1. Fundamental Theorem of Arithmetic. The Fundamental Theorem
of Arithmetic is an important theorem in number theory, and it is also called
the unique factorization theorem or the unique prime factorization theorem.
It shows how the primes are used to build all integers.
Theorem 1.2 (Fundamental Theorem of Arithmetic). Each positive integer
can be expressed as the product of primes, unique up to order of the factors,
in essentially one way only.
Example 1.3.
1200 = 24 × 31 × 52
=3×2×2×2×2×5×5
=5×2×3×2×5×2×2
1
Example 1.4.
4773 = 3 × 37 × 43
6111 = 3 × 3 × 7 × 97
We first ask the question, “How many prime numbers are there?” The answer is given by the theorem, “There exist infinitely many prime numbers.”
There are many proofs of the existence of infinitely many primes.
1.2. Euclid’s Proof. Suppose that p1 = 2 < p2 = 3 < · · · < pr are all the
primes. Let P = p1 p2 · · · pr +1. By the Fundamental Theorem of Arithmetic,
we can factor P . Let p be a prime dividing P ; then p cannot be any of
p1 , p2 , · · · , pr , otherwise p would divide the difference P − p1 p2 · · · pr = 1,
which is impossible. So this prime p is another prime, and p1 , p2 , · · · , pr
would not be all the primes.
1.3. Euler’s Proof. Euler showed that there must exist infinitely many
primes because a certain expression formed with all the primes is infinite.
If p is any prime, then 1/p < 1 and the sum of the geometric series is
∞
X
1
1
.
=
k
p
1 − p1
k=0
Similarly, if q is any other prime, then the sum of the geometric series is
∞
X
1
1
.
=
1
qk
1
−
k=0
q
Multiplying these two equalities, we have
1 1
1
1
1
1
1
×
.
1+ + + 2 +
+ 2 + ··· =
p q p
pq q
1 − p1
1 − 1q
In above equation, the left-hand side is the sum of the inverses of all natural
numbers of the form ph q k (h ≥ 0, k ≥ 0), each counted only once, because
every natural number has a unique factorization as a product of primes.
This idea is the basis of the proof.
Proof. Suppose that p1 , p2 , · · · , pn are all the primes. For each i = 1, · · · , n,
∞
X
1
1
.
=
k
1
p
1
−
i
k=0
pi
Multiplying these n equalities, we obtain
!
n
∞
n
Y
X
Y
1
1
.
=
(EU)
k
1
p
i=1 1 −
i=1 k=0 i
pi
The left-hand side of (EU) is the sum of the inverses of all natural numbers, each counted once, and this follows from the fundamental theorem of
2
arithmetic. The series
∞
X
1
,
k
k=1
known as the harmonic series, is divergent. To see that it is divergent, one
can compare it to
Z ∞
1
dx.
x
1
The left-hand side of (EU) is infinite while the right-hand side is finite. This
is a contradiction.
1.4. Mersenne Numbers. The numbers of the form 2n − 1 are called
Mersenne numbers, named for the French monk Marin Mersenne who describe them. (See, for example [6, pp 151–159].) This is an example of a
formula known to generate many primes.
Mersenne wrote in his book Cogiitata Physico-Mathematica in 1644 that
n
2 − 1 is prime when n = 2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257, and no other
n less than 257. But Mersenne made some mistakes because the number
M67 = 267 − 1, and M257 = 2257 − 1 are composite. Mersenne missed these
prime numbers M61 , M89 , and M107 . When 2n − 1 is prime, it is called a
Mersenne prime. This can only happen if n is prime since 2pq − 1 is divisible
by 2p − 1. As an example, in September, 2008, an electrical engineer HansMichael Elvenich found a prime which has 12,978,189 digits, and this prime
is the Mersenne number
243,112,609 − 1.
1.5. Fermat Primes. Pierre Fermat noticed that in all cases 2n +1 is prime
only if n itself was a power of 2. For example,
21 + 1 = 3 is prime,
23 + 1 = 9 is not prime,
24 + 1 = 17 is prime,
27 + 1 = 129 is not prime.
n
Later, he studied when the numbers of the form 22 +1 are prime. Fermat
knew that the numbers are prime for n less than or equal to 4. In particular,
0
22 + 1 = 3 is prime,
1
22 + 1 = 5 is prime,
2
22 + 1 = 17 is prime,
3
22 + 1 = 257 is prime,
4
22 + 1 = 65537 is prime.
3
From this Fermat conjectured that they are all prime. However
5
22 + 1 = 4, 294, 967, 297
= 641 × 6, 700, 417 is not prime,
The Fermat numbers grow large quickly making computation difficult even
16
for computers. In 1953, J. L. Selfridge showed that 22 is not prime. But
at this time, no other Fermat numbers are known to be prime.
4
2. Prime Counting Function
In this section, we look for ways to find all primes less than a given number
x or at least count the number of such primes. In 300 BC, Eratosthenes was
the first mathematician to give a way to find prime numbers, but it was not
clear how to count how many primes were constructed.
2.1. The Sieve of Eratosthenes. Suppose we want to find all the primes
less than 101. We write down all the natural numbers from 2 to 101. First,
we cross out any subsequent multiples of 2, so all the even numbers are gone
after 2. Next, we cross out any remaining subsequent multiples of 3 which
are 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69,75, 81, 87, 93, and 99. Then,
we cross out any subsequent multiples of 5 which are 25, 35, 55, 65, 85, and
95. The next step is the prime number 7, and we cross out any subsequent
multiples
of 7 which are 49, 77, and 91. We stop at the prime 11 because
√
101 < 11. We get only prime numbers left, and there are 26 of them. The
prime numbers from 1 to 101 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, and 101.
2
11
21
31
41
51
61
71
81
91
101
12
22
32
42
52
62
72
82
92
3
13
23
33
43
53
63
73
83
93
4
14
24
34
44
54
64
74
84
94
5
6
16
26
36
46
56
66
76
86
96
15
25
35
45
55
65
75
85
95
7
17
27
37
47
57
67
77
87
97
8
18
28
38
48
58
68
78
88
98
9
19
29
39
49
59
69
79
89
99
10
20
30
40
50
60
70
80
90
100
2.2. Exact Formula from Mináč. Let π(m) denote the number of primes
p ≤ m and [m] indicate the only integer n such that the real number m
satifies n ≤ m < n + 1. There is an exact formula for the function π(m) due
to J. Mináč [5, p. 132–133]. This is the formula:
m X
(j − 1)! + 1
(j − 1)!
π(m) =
−
.
j
j
j=2
where [x] indicate the only integer n such that the real number x satifies
n ≤ x < n + 1. For any integer j > 1, F (j) = 1 when j is a prime, while
F (j) = 0 otherwise. This formula is based on Wilson’s theorem.
Theorem 2.1. (Wilson’s Theorem) If p is a prime number, then
(p − 1)! ≡ −1
.
5
(mod p)
This formula works because
(j − 1)! + 1
(j − 1)!
= 1 if j is prime, and
−
j
j
(j − 1)! + 1
(j − 1)!
= 0 if j is not prime.
−
j
j
Thus the formula simply looks at each number up to m and adds 1 if it is
a prime. We need a much more efficient formula to count primes. The prime
counting formula of Meissel given in Section 2.3 is a much more efficient way
to count prime numbers.
6
Example 2.2. We shall illustrate how the formula works.
(2 − 1)! + 1
1+1
(2 − 1)!
1
=
−
−
2
2
2
2
1
= 1−
2
1
= 1 because the greatest integer of = 0
2
2! + 1
(3 − 1)! + 1
(3 − 1)!
2!
=
−
−
3
3
3
3
3
2
=
−
3
3
2
= 1 because the greatest integer of = 0
3
(4 − 1)! + 1
(4 − 1)!
3! + 1
3!
−
=
−
4
4
4
4
2×3+1
2×3
=
−
4
4
7
6
6
=
−
the greatest integer of = 1
4
4
4
7
−1
=
4
3
=
4
3
= 0 because the greatest integer of = 0
4
(5 − 1)! + 1
(5 − 1)!
4! + 1
4!
−
=
−
5
5
5
5
2×3×4+1
2×3×4
=
−
5
5
25
24
=
−
5
5
= [5 − 4]
=1
Therefore, with m = 5 we can count how many primes there are from 2 to
5.
5 X
(j − 1)! + 1
(j − 1)!
π(5) =
−
j
j
j=2
=1+1+0+1
=3
7
2.3. Exact Formula from Meissel, 1871. This method was devised in
1871 by Ernst Meissel to calculate the exact value of π(x). This method
1
requires the knowledge of the prime numbers p ≤ x 2 as well as the values
2
of π(y) for y ≤ x 3 . We shall use the notation pn for the nth prime number.
Thus p1 = 2, p2 = 3, p3 = 5, p4 = 7, p5 = 11, etc.
It thus gives an efficient way to extend the count much further. This is
the formula
s
X
s(s − 1)
x
(M)
π(x) = φ(x, m) + m(s + 1) +
,
−1−
π
2
pm+i
i=1
1
2
1
3
where m = π(x ), n = π(x ), s = n − m, and φ(x, m) denotes the number
of integers a such that a ≤ x and a is not a multiple of 2, 3, · · · , pm .
This formula is relatively efficient to compute because of the following
properties.
Recurrence relation:
x
(R)
φ(x, m) = φ(x, m − 1) − φ
,m − 1 .
pm
Division property:
If
Pm = p1 p2 · · · pm , and a ≥ 0, 0 ≤ r < Pm , then
(D)
φ(aPm + r, m) = aϕ(Pm ) + φ(r, m),
where ϕ(n) (with one argument) denotes the Euler ϕ-function.
Symmetry property:
If
1
Pm < r < Pm , then
2
(S)
φ(r, m) = ϕ(pm ) − φ (pm − r − 1, m) .
We shall illustrate this formula with increasingly complicated examples.
Example 2.3. Let x = 10, so that
1
1
1
1
m = π(x 3 ) = π(10 3 ) = 1,
n = π(x 2 ) = π(10 2 ) = 2,
1
1
and s = n − m = π(10 2 ) − π(10 3 ) = 2 − 1 = 1.
Since p1 = 2 and p2 = 3, we obtain
s
X
10
10
10
π
=π
=π
= 2.
p1+i
p2
3
i=1
8
Now (M) becomes
s
X
s(s − 1)
10
π(10) = φ(10, m) + m(s + 1) +
−1−
π
2
pm+i
i=1
1
X
1(1 − 1)
10
= φ(10, 1) + 1(1 + 1) +
−1−
π
2
p1+i
i=1
= φ(10, 1) + 2 + 0 − 1 − 2
=5+2+0−1−2
= 4.
The function φ(10, 1) above is determined as follows. By definition φ(10, 1)
denotes the number of integers a such that a ≤ 10 and a is not a multiple
of pm = p1 = 2 , so
φ(10, 1) = |{1, 3, 5, 7, 9}| = 5.
We can check the computation above with
π(10) = |{2, 3, 5, 7}| = 4.
Example 2.4. We now do a larger number x and use the recurrence relation
property
x
φ(x, m) = φ(x, m − 1) − φ
,m − 1
pm
to illustrate the use of the formula.
Let x = 100, so that
1
1
1
1
m = π(x 3 ) = π(100 3 ) = 2,
n = π(x 2 ) = π(100 2 ) = π(10) = |{2, 3, 5, 7}| = 4,
1
1
s = n − m = π(100 2 ) − π(100 3 ) = 4 − 2 = 2.
By definition φ(100, 2) denotes the number of integers a such that a ≤ 100
and a is a not a multiple of 2 or 3, so
φ(100, 2) = |{1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55,
59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}|
= 33
9
With a large number, we can use the recurrence relation property to count
φ(100, 2) more efficiently as follows.
100
,2 − 1
φ(100, 2) = φ(100, 2 − 1) − φ
p2
100
= φ(100, 1) − φ
,1
3
= φ(100, 1) − φ (33, 1)
= 50 − 17
= 33
We also compute
X
s
2
X
x
100
=
π
π
pm+i
p2+i
i=1
i=1
100
100
+π
=π
p2+1
p2+2
100
100
=π
+π
p3
p4
100
100
=π
+π
5
7
= π(20) + π(14)
= |{2, 3, 5, 7, 11, 13, 17, 19}| + |{2, 3, 5, 7, 11, 13}|
=8+6
= 14.
Now (M) becomes
2
X
2(2 − 1)
−1−
π
π(100) = φ(100, 2) + 2(2 + 1) +
2
i=1
2
X
2
100
= φ(100, 2) + 6 + − 1 −
π
2
p2+i
100
p2+i
i=1
= φ(100, 2) + 6 + 1 − 1 − 14
= 33 + 6 + 1 − 1 − 14
= 25,
which we can check via
π(100) = |{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67,
71, 73, 79, 83, 89, 97}|
= 25.
Example 2.5. We finally do a large enough example to illustrate the use
of the recurrence, division, and symmetry properties to count primes. We
10
count how many primes are there from 1 to 1000.Thus we take x = 1000 so
that
1
1
m = π(x 3 ) = π(1000 3 ) = π(10) = |{2, 3, 5, 7}| = 4,
1
1
n = π(x 2 ) = π(1000 2 ) = π(31)
= |{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31}| = 11, and
s = n − m = 11 − 4 = 7.
P
x
First we compute the sum si=1 π pm+i
in formula (M)
X
7
s
X
1000
x
=
π
π
pm+i
p4+i
i=1
i=1
1000
1000
1000
1000
=π
+π
+π
+π
11
13
17
19
1000
1000
1000
+π
+π
+π
23
29
31
= π(90) + π(76) + π(58) + π(52) + π(43) + π(34) + π(32)
= 24 + 21 + 16 + 15 + 14 + 11 + 11
= 112.
Formula (M) now becomes
7
X
7(7 − 1)
−1−
π
π(1000) = φ(1000, 4) + 4(7 + 1) +
2
i=1
1000
p4+i
= φ(1000, 4) + 32 + 21 − 1 − 112.
= φ(1000, 4) − 60.
We still need to calculate φ(1000, 4), and we use all three properties (R),
(D), (S), and the Euler ϕ-function to calculate φ(1000, 4) . First, we use the
division property with
P4 = p1 p2 p3 p4 = 210, and 160 < P4 = 210. Then
φ(1000, 4) = φ(4 × 210 + 160, 4)
= 4ϕ(210) + φ(160, 4),
where the Euler ϕ-function is calculated as follows for products of distinct
primes,
Y
ϕ (Pm ) =
(pk − 1) .
k≤m
11
Therefore
ϕ (P4 ) = ϕ(210)
Y
=
(pk − 1)
k≤4
= (p4 − 1) × (p3 − 1) × (p2 − 1) × (p1 − 1)
= (7 − 1) × (5 − 1) × (3 − 1) × (2 − 1)
=6×4×2×1
= 48.
We use the symmetry property to calculate φ(160, 4).
Since
1
P4 < 160 < P4 , we have
2
φ(160, 4) = ϕ(210) − φ (210 − 160 − 1, 4)
= ϕ(210) − φ(49, 4)
= 48 − φ(49, 4).
To calculate φ(49, 4), we use the recurrence relation (R) repeatedly, Thus
49
φ(49, 4) = φ(49, 3) − φ
,3
7
= φ(49, 3) − φ(7, 3)
49
= φ(49, 3 − 1) − φ
, 3 − 1 − φ(7, 3)
p3
49
, 2 − φ(7, 3)
= φ(49, 2) − φ
5
= φ(49, 2) − φ(9, 2) − φ(7, 3)
49
= φ(49, 2 − 1) − φ
, 2 − 1 − φ(9, 2) − φ(7, 3)
p2
49
= φ(49, 1) − φ
, 1 − φ(9, 2) − φ(7, 3)
3
= φ(49, 1) − φ(16, 1) − φ(9, 2) − φ(7, 3)
= 25 − 8 − 3 − 2
= 12.
Now we can calculate φ(1000, 4) as
φ(1000, 4) = 4ϕ(210) + φ(160, 4)
= 4 × 48 + ϕ(210) − φ(49, 4)
= 4 × 48 + 48 − 12
= 228.
12
Using all these results, finally we have an exact count of prime numbers from
1 to 1000. namely
7
X
7(7 − 1)
1000
π(1000) = φ(1000, 4) + 4(7 + 1) +
−1−
π
2
p4+i
i=1
= 228 + 32 + 21 − 1 − 112
= 168.
13
3. Ramanujan’s Proof of Bertrand’s Postulate
In 1845, Joseph Bertrand conjectured that for every x > 1, there is always
a prime number between x and 2x.
This was first proved by Srinivasa Aiyanger Ramanujan. He was born in
1887 in Erode, a small town in India.
In this section, I present Ramanujan’s proof of Bertrand’s postulate which
used Stirling’s formula, but replacing Ramanujan’s use of Stirling’s formula
with the following lemmas. This is based on an article by Meher and Murty
[2].
Lemma 3.1. For x > 1, let R(x) =
[x]!
. Then
[ x2 ]!2
2x−1
≤ R(x) ≤ 2x−1 (x + 1).
x+1
Proof. If [x] = 2k is even, then
R(x) =
2k
k
is the largest binomial coefficient in the expansion of (1 + 1)2k , so
22k
≤ R(x) ≤ 22k ,
2k + 1
where the lower bound is the average binomial coefficient.
If [x] = 2k + 1 is odd, then
2k + 1
(k + 1).
R(x) =
k
(3.1)
Now
2k + 1
2k + 1
2k + 1
=
+
≤ 22k+1
k
k
k+1
which yields the upper bound in
2
22k ≤ R(x) ≤ 22k (k + 1).
(3.2)
The lower bound comes from using (3.1) in
22k
(2k)!
≤ (2k + 1)
= R(x).
2k + 1
(k!)2
The result is now immediate.
22k = (2k + 1)
Lemma 3.2. R(x) ≤ 6
x
2
for all x ≥ 1.
Proof. First assume [x] = 2k.
From (3.1)
22k
≤ R(x) ≤ 22k ,
2k + 1
we have R(x) ≤ 22k = 4k < 6k ≤ 6x/2 .
14
If [x] = 2k + 1 is odd, we use (3.2) to see that
x/2
x
22k+1 (1 + k)
1 k
2x (1 + k)
x
x 3
R(x) ≤
≤
≤2 1+
≤2
= 62 .
2
2
2
2
We shall use the Von Mangoldt function to help us with the proof of the
main theorem. The Von Mangoldt function Λ is defined by
(
log p, if n = pk for some k ≥ 1, p prime;
Λ(n) =
0,
otherwise.
The unique factorization property of natural numbers implies
X
log n =
Λ(d).
d|n
For example, log 12 = 0 + log 2 + log 3 + log 2 + 0 + 0 for the divisors 1, 2,
3, 4, 6, and 12, respectively.
Let θ be the function defined by
X
θ(x) =
log p,
p≤x
where the sum is over primes p ≤ x. For example θ(10) = log 2 + log 3 +
log 5 + log 7 = log 210. We will use the functions Λ and θ to help us prove
our main theorem.
Theorem 3.3. (Bertrand’s Postulate) For x > 1, there is at least one prime
between x and 2x.
Proof. To prove Bertrand’s postulate, it suffices to show that θ(x)−θ(x/2) >
0 for any x ≥ 2 because this expression is a sum of logarithms of primes
between x/2 and x. As in Ramanujan [3],
X
X
X
X
(3.3)
log[x]! =
log n =
Λ(d) =
Λ(d) =
ψ(x/e)
n≤x
de≤x
d≤x/e
e≤x
where
ψ(x) =
X
Λ(n).
n≤x
Changing x to x/2 in (3.3), we have
X
log[x/2]! =
ψ(x/(2e)).
e≤x/2
Now, we subtract twice this from (3.3) to obtain
X
X
log[x]! − 2 log[x/2]! =
ψ(x/e) − 2
ψ(x/(2e)).
e≤x
e≤x/2
We look at how the terms cancel.
15
For e = 1, the contribution from
X
X
ψ(x/(2e)) is ψ(x) − 2ψ(x/2).
ψ(x/e) − 2
e≤x
e≤x/2
For e = 2, it is ψ(x/2) − 2ψ(x/4).
For e = 3, it is ψ(x/3) − 2ψ(x/6).
For e = 4, it is ψ(x/4) − 2ψ(x/8).
Adding up all the terms for all e = 1, 2, 3, · · · , we obtain
log[x]! − 2 log[x/2]! = ψ(x) − ψ(x/2) + ψ(x/3) − ψ(x/4) + · · ·
In Lemma 3.1, we have R(x) =
[x]!
, so that
[ x2 ]!2
[x]!
[ x2 ]!2
= log[x]! − 2 log[x/2]!
log R(x) = log
= ψ(x) − ψ(x/2) + ψ(x/3) − ψ(x/4) + · · ·
Since ψ(x) − ψ(x/2) + ψ(x/3) − ψ(x/4) + · · · is an alternating series of a
decreasing functions, we know log R(x) is between any two partial sums.
Therefore, in particular,
(3.4)
ψ(x) − ψ(x/2) ≤ log R(x) ≤ ψ(x) − ψ(x/2) + ψ(x/3).
x
By Lemma 3.2, R(x) ≤ 6 2 for all x ≥ 1. So
x
log R(x) ≤ log 6 2 =
x
log 6.
2
From (3.4), we have
x
log 6.
2
In (3.5), we change x to x/2, and we obtain
(3.5)
ψ(x) − ψ(x/2) ≤
(3.6)
ψ(x/2) − ψ(x/4) ≤
x
log 6.
4
Similarly, we change x to x/4 to obtain
x
log 6.
8
We keep changing x to x/2n and add up all the inequalities to obtain
x
x
x
ψ(x) ≤ log 6 + log 6 + log 6 + · · ·
2
4
8
1 1 1
= (x log 6)
+ + + ··· .
2 4 8
Since
1 1 1
+ + + · · · = 1,
2 4 8
(3.7)
ψ(x/4) − ψ(x/8) ≤
16
we obtain
(3.8)
ψ(x) < x log 6.
Then using inequality (3.4) and Lemma 3.1, we have
2x−1
≤ log R(x) ≤ ψ(x) − ψ(x/2) + ψ(x/3).
x+1
We can rewrite the equation above to
ψ(x) − ψ(x/2) ≥ (x − 1) log 2 − log(x + 1) − ψ(x/3)
(x − 1) log 2 − log(x + 1) = log
= x log 2 − log 2 − log(x + 1) − ψ(x/3)
= x log 2 − (log 2(x + 1)) − ψ(x/3)
In (3.8), we change x to x3 , and we have ψ x3 ≤ x3 log 6, so that
x
x
ψ(x) − ψ
≥ x log 2 − (log 2(x + 1)) − log 6
2
3
x
= x log 2 − log 6 − (log 2(x + 1))
3
x
1
log 8 − log 6 − log 2(x + 1)
=x
3
3
x
4
= log − log 2(x + 1).
3
3
Now rewrite the expression for ψ(x) as
X
X
X
X
X
ψ(x) =
Λ(n) =
log p =
log p +
log p +
log p + · · ·
n≤x
p2 ≤x
p≤x
pk ≤x
p3 ≤x
By definition,
θ(x) =
X
log p,
p≤x
where the sum is over primes p ≤ x, so we may write
X
X
X
X
ψ(x) =
log p =
log p +
log p +
log p + · · ·
p2 ≤x
p≤x
pk ≤x
1
1
p3 ≤x
1
1
= θ(x) + θ(x 2 ) + θ(x 3 ) + θ(x 4 ) + θ(x 5 ) + · · ·
1
Changing x to x 2 and multiplying by 2, we have
1
1
1
1
1
1
2ψ(x 2 ) = 2θ(x 2 ) + 2θ(x 4 ) + 2θ(x 6 ) + 2θ(x 8 ) + 2θ(x 10 ) + · · ·
1
We subtract 2ψ(x 2 ) from ψ(x) to obtain
1
1
1
1
1
ψ(x) − 2ψ(x 2 ) = θ(x) + θ(x 2 ) + θ(x 3 ) + θ(x 4 ) + θ(x 5 ) + · · ·
1
1
1
1
1
− (2θ(x 2 ) + 2θ(x 4 ) + 2θ(x 6 ) + 2θ(x 8 ) + 2θ(x 10 ) + · · · )
1
1
1
1
= θ(x) − θ(x 2 ) + θ(x 3 ) − θ(x 4 ) + θ(x 5 ) − · · ·
17
1
1
1
1
Since θ(x) − θ(x 2 ) + θ(x 3 ) − θ(x 4 ) + θ(x 5 ) − · · · is an alternating series of
a decreasing functions,
1
ψ(x) < 2ψ(x 2 ) + θ(x).
1
1
1
1
From ψ(x) = θ(x)+θ(x 2 )+θ(x 3 )+θ(x 4 )+θ(x 5 )+· · · , we have θ(x) ≤ ψ(x),
θ( x2 ) ≤ ψ( x2 ), and −θ( x2 ) ≥ −ψ( x2 ).
Using (3.8) ψ(x) ≤ x log 6
1
1
1
1
and ψ(x) = θ(x) + θ(x 2 ) + θ(x 3 ) + θ(x 4 ) + θ(x 5 ) + · · · , we have
x
x
x
√
1
ψ(x) − ψ
≤ 2ψ(x 2 ) + θ(x) − θ
≤ 2 x log 6 + θ(x) − θ
.
2
2
2
1
We move 2ψ(x 2 ) to the left side to obtain
x
x
1
ψ(x) − ψ
− 2ψ(x 2 ) ≤ θ(x) − θ
.
2
2
From ψ(x) − ψ x2 ≥ x3 log 43 − log 2(x + 1), we have
x
1
x
4
log − log 2(x + 1) − 2ψ(x 2 ) ≤ θ(x) − θ
,
3
3
2
giving us
x x
1
4
≥ log − log 2(x + 1) − 2ψ(x 2 )
θ(x) − θ
2
3
3
√
x
4
≥ − log − log 2(x + 1) − 2 x log 6 by (3.8).
3
3
Finally, we have the formula
x x
√
4
(3.9)
θ(x) − θ
≥ − log − log 2(x + 1) − 2 x log 6.
2
3
3
This finishes the proof when the expression on the right is positive. The
authors then do some confusing estimates ending with an incorrect conclusion. Mathematica shows that this is positive for x ≥ 1560. Indeed, its
derivative is positive for x ≥ 370, so once it becomes positive at x = 1560 it
stays positive. For small values of x, we observe that
2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631, 1259, and 2503
is a sequence of primes. In this sequence, each number is less than twice its
predecessor.
For example, 1259 is the prime number between 631 and 1262 = 2 × 631.
Thus this handles all x < 1560 in Bertrand’s Postulate.
Example 3.4. Let x = 631. This is an example to illustrate that the estimate
(3.9) does not prove the positivity of the left hand side for x < 1560 because
it gives a negative result. The expression θ(631) − θ 631
is estimated by
2
√
631
4
− log − log 2(631 + 1) − 2 631 log 6 ≥ −36.6.
3
3
With the number smaller than 1560, we need to count it, so we have the
prime number 5 between 3 and 6 and number 13 between 7 and 14.
18
On the other hand, when x = 1560, we obtain a positive lower bound
proving the existence of at least one prime between x/2 and x.
In this case
θ(1560) − θ
1560
2
√
1560
4
− log − log 2(1560 + 1) − 2 1560 log 6
3
3
≥ 0.0107912.
≥
19
4. Approximating the nth Prime
From the prime number theorem, we have
pn ∼ n log n,
which means
pn
= 1.
n→∞ n log n
For large n, the nth prime is about the size of n log n. It turns out that for
every n ≥ 1, pn > n log n. More precisely, we have
n log log n
.
pn = n log n + n(log log n − 1) + o
log n
In 1938, J. Barkley Rosser proved that for every n > 1,
lim
n log n + n(log log n − 10) < pn < n log n + n(log log n + 8),
Another mathematician, Pierre Dusart in 1998 [1] showed that the conjecture of R. Mandl is true for n ≥ 9,
p1 + p2 + p3 + · · · + pn
1
≤ pn .
n
2
Dusart also gave shaper bounds for pn : for all n ≥ 1,
pn > n(log n + log log n − 1)
and for n > 39017,
pn < n(log n + log log n − 0.9484).
In 1934, Ishikawa showed the following results which are consequences of
Tschebycheff’s theorems:
If n ≥ 2, then
pn + pn+1 > pn+2 .
If m, n ≥ 1, then
pm pn > pm+n .
20
5. Gaps between Primes
For every prime p, let g(p) be the number of composites between p and
the next prime. Thus letting pn be the n-th prime, we have
pn+1 = pn + g(pn ) + 1
We call g(pn ) the gap between pn and pn+1 . The first prime gap is that
between the numbers 2 and 3 which is 0. Then between the numbers 3 and
5 is 1, and so on. Like prime numbers, the set of prime gaps is infinite as
we will prove below. There are major questions about prime gaps: where
a given gap first appears and what possible sizes of the prime gap occur?
That is, we ask how far apart can consecutive primes be? For example,
Bertrand’s postulate states that there is always a prime number between n
and 2n, so pn+1 < 2pn and g(pn ) < pn − 1. A much stronger statement can
be made (see Theorem 5.1 below).
If p and p + 2 are both primes, then they are called twin primes. The
smallest pairs of twin primes are (3, 5), (5, 7), (11, 13), and (17, 19). For
twin primes, g(pn ) = 1 and there has long been a conjecture that there are
infinitely many such pairs.
On the other hand, g(pn ) can be arbitrarily large, a statement which can
be written as
lim sup g(p) = ∞.
This is easily proved. Let n be any integer greater than 1. We look at the
following sequence of consecutive composite integers:
n! + 2, n! + 3, n! + 4, n! + 5, · · · , n! + n.
We have 2 dividing the first term; 3 dividing the second term; and so on, thus
showing all of these numbers are composite, so there are n − 1 consecutive
composite numbers. If p is the largest prime less than n! + 2, then we have
g(p) > n − 1. We have thus proved that
lim sup g(pn ) = ∞.
In 1931, a better result was shown. Erik Westzynthius showed that
g(pn )
= ∞,
lim sup
log pn
which means that for every β > 0 there are infinitely many primes p with
g(p) > β log p.
From the prime number theorem, we can deduce an upper bound on the
length of prime gaps.
Theorem 5.1. For every > 0, there is a number N such that g(pn ) < pn
for all n > N.
There are exciting new results on the minimal gaps between primes.
The conjecture that there are infinitely many twin primes would say that
lim inf g(p) = 1. But until last year it was not even known that lim inf g(p)
was finite. In 2013, Yitan Zhang proved that there are infinitely many gaps
21
that do not exceed 70 million, that is
lim inf g(p) < 7 × 107 .
This spawned a large amount of work among number theorists to reduce
this bound. In November 2013, James Maynard reduced the bound to 600.
The most recent result is that in April 2014, Terence Tao announced that
the Polymath project wiki reduced the upper bound on lim inf g(p) to 246.
22
6. Conclusion
In this paper, we have introduced simple ways to find prime numbers,
to calculate how many prime numbers there are less than a given integer,
and to prove there is at least one prime between any number and twice
that number. Nowadays, with the developing high technology, people can
find large prime numbers with millions of digits. The largest prime number
currently known has more than 17 million digits was found by University
of Central Missouri mathematician Curtis Cooper. This was done using a
giant network of volunteer computers which were devoted to finding prime
numbers. This largest known prime number is
257,885,161 − 1
which is a Mersenne prime, and it has 17,425,170 digits. This was hard
work with about 360,000 processors operating at 150 trillion calculations
per second.
Prime numbers are important in many branches of mathematics, and
they also are essential to a number of real world algorithms including most
of the algorithms used in public key cryptography. The use of public-key
cryptography is pervasive in protecting the privacy of data transmission.
Several public-key systems have been proposed, and their security rests on
different computational problems. Prime numbers are an essential part of
the major public key systems in cryptography. The most important is the
RSA Crypto system. The RSA Crypto system’s security relies upon on the
difficulty of factoring the product of two large prime numbers.
For thousand of years, the subject of prime numbers has fascinated mathematicians, and prime numbers are still important and interesting entities
today.
23
References
[1] P. Dusart, Sharper bounds for ψ, θ, π, pk , Research report, Université de Limoges,
1998.
[2] J. Meher and M. R. Murty, Ramanujan’s Proof of Bertrand’s Postulate, Math.
Monthly 120 (2013), 650–653.
[3] W. Narkiewicz, “The Development of Prime Number Theory,” Springer-Verlag, New
York, 2000.
[4] S. Ramanujan, A proof of Bertrand’s postulate, J. Indian Math. Soc. 11 (1919),
181–182.
[5] P. Ribenboim, “The little book of bigger primes,” 2nd ed., Springer-Verlag, New
York, 2004.
[6] D. Well, “Prime Numbers The Most Mysterious Figures in Math,” Wiley and Sons,
New Jersey, 2005.
[7] Y. Zhang, Bounded gaps between primes, Ann. of Math. 179 (2014), 1121–1174.
24