Skip to main content
Mathematics LibreTexts

1.11: Prime Numbers

  • Page ID
    83346
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Definition \(\PageIndex{1}\)

    An integer \(p\) is prime if \(p\ge 2\) and the only positive divisors of \(p\) are \(1\) and \(p\). An integer \(n\) is composite if \(n\ge 2\) and \(n\) is not prime.

    Remark \(\PageIndex{1}\)

    The number \(1\) is neither prime nor composite.

    Lemma \(\PageIndex{1}\)

    An integer \(n\ge 2\) is composite if and only if there are integers \(a\) and \(b\) such that \(n=ab\), \(1<a<n\), and \(1<b<n\).

    Proof

    Let \(n\ge 2\). If \(n\) is composite there is a positive integer \(a\) such that \(a\ne 1\), \(a\ne n\) and \(a\mid n\). This means that \(n=ab\) for some \(b\). Since \(n\) and \(a\) are positive so is \(b\). Hence \(1\le a\) and \(1\le b\). By Theorem 1.4.1(10) \(a\le n\) and \(b\le n\). Since \(a\ne 1\) and \(a\ne n\) we have \(1<a<n\). If \(b=1\) then \(a=n\), which is not possible, so \(b\ne 1\). If \(b=n\) then \(a=1\), which is also not possible. So \(1<b<n\). The converse is true by the definition of composite numbers.

    Lemma \(\PageIndex{2}\)

    If \(n>1\), there is a prime \(p\) such that \(p\mid n\).

    Proof

    Assume there is some integer \(n>1\) which has no prime divisor. Let \(S\) denote the set of all such integers. By the Well-Ordering Principle there is a smallest such integer, call it \(m\). Now \(m>1\) and has no prime divisor. So \(m\) cannot be prime. Hence \(m\) is composite. Therefore by Lemma \(\PageIndex{1}\) \[m=ab,\quad 1<a<m,\quad 1<b<m.\nonumber \] Since \(1<a<m\) then \(a\) is not in the set \(S\). So \(a\) must have a prime divisor, call it \(p\). Then \(p\mid a\) and \(a\mid m\) so by Theorem 1.4.1, \(p\mid m\). This contradicts the fact that \(m\) has no prime divisor. So the set \(S\) must be empty and this proves the lemma.

    Theorem \(\PageIndex{1}\): Euclid's Theorem\(^{1}\)

    There are infinitely many prime numbers.

    Proof

    Assume, by way of contradiction, that there are only a finite number of prime numbers, say: \[p_1,p_2,\dotsc,p_n.\nonumber \] Define \[N=p_1p_2\dotsm p_n+1.\nonumber \] Since \(p_1\ge 2\), clearly \(N\ge 3\). So by Lemma 10.2 \(N\) has a prime divisor \(p\). By assumption \(p=p_i\) for some \(i=1,\dotsc,n\). Let \(a=p_1\dotsm p_n\). Note that \[a=p_i\left(p_1p_2\dotsm p_{i-1}p_{i+1}\dotsm p_n\right),\nonumber \] so \(p_i\mid a\). Now \(N=a+1\) and by assumption \(p_i\mid (a+1)\). So by Exercise 1.4.3 \(p_i\mid ((a+1)-a)\), that is \(p_i\mid 1\). By Basic Axiom 3 in Section 1.2 this implies that \(p_i=1\). This contradicts the fact that primes are \(>1\). It follows that the assumption that there are only finitely many primes is not true.

    Theorem \(\PageIndex{2}\)

    If \(n>1\) is composite then \(n\) has a prime divisor \(p\le\sqrt{n}\).

    Proof

    Let \(n>1\) be composite. Then \(n=ab\) where \(1<a<n\) and \(1<b<n\). We claim that one of \(a\) or \(b\) is \(\le\sqrt{n}\). If not, then \(a>\sqrt{n}\) and \(b>\sqrt{n}\). Hence \(n=ab>\sqrt{n}\,\sqrt{n}=n\). This implies that \(n>n\), a contradiction. So \(a\le\sqrt{n}\) or \(b\le\sqrt{n}\). Suppose \(a\le\sqrt{n}\). Since \(1<a\), by Lemma \(\PageIndex{2}\) there is a prime \(p\) such that \(p\mid a\). Hence, by Theorem 1.4.1 since \(a\mid n\) we have \(p\mid n\). Also by Theorem 1.4.1 since \(p\mid a\) we have \(p\le a\le\sqrt{n}\).

    The proof of Euclid’s Theorem hints at a way of generating a new prime number, given a list of already-known prime numbers.\(^{2}\) However, this method does not produce all primes in the order in which they occur among the integers. A more systematic way of producing primes, known as the sieve of Eratosthenes.\(^{3}\) The sieve of Eratosthenes works in this way:

    To generate all the prime numbers less than or equal to \(n\), we begin by writing out all positive integers from \(2\) through \(n\). For instance, if we wish to find all prime numbers that are at most 100, we begin by writing

      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

    (here the grid-like arrangement we have used is convenient but not necessary for the sieve to work).

    We next repeatedly apply the following step:

    Circle the first non-crossed out number; then cross out any other multiple of this number appearing in the list that hasn’t already been crossed out.

    We repeat this process until we cannot, i.e., until there are no more non-crossed out numbers to circle. The prime numbers are then the numbers that have been circled.

    For example, in our example above we would begin by circling 2, the first number that has not been circled or crossed out. We would then cross out all multiples of 2 in the list other than 2. This produces the following figure:

      \(\fbox{2}\) 3 \(\xcancel{4}\) 5 \(\xcancel{6}\) 7 \(\xcancel{8}\) 9 \(\xcancel{10}\)
    11 \(\xcancel{12}\) 13 \(\xcancel{14}\) 15 \(\xcancel{16}\) 17 \(\xcancel{18}\) 19 \(\xcancel{20}\)
    21 \(\xcancel{22}\) 23 \(\xcancel{24}\) 25 \(\xcancel{26}\) 27 \(\xcancel{28}\) 29 \(\xcancel{30}\)
    31 \(\xcancel{32}\) 33 \(\xcancel{34}\) 35 \(\xcancel{36}\) 37 \(\xcancel{38}\) 39 \(\xcancel{40}\)
    41 \(\xcancel{42}\) 43 \(\xcancel{44}\) 45 \(\xcancel{46}\) 47 \(\xcancel{48}\) 49 \(\xcancel{50}\)
    51 \(\xcancel{52}\) 53 \(\xcancel{54}\) 55 \(\xcancel{56}\) 57 \(\xcancel{58}\) 59 \(\xcancel{60}\)
    61 \(\xcancel{62}\) 63 \(\xcancel{64}\) 65 \(\xcancel{66}\) 67 \(\xcancel{68}\) 69 \(\xcancel{70}\)
    71 \(\xcancel{72}\) 73 \(\xcancel{74}\) 75 \(\xcancel{76}\) 77 \(\xcancel{78}\) 79 \(\xcancel{80}\)
    81 \(\xcancel{82}\) 83 \(\xcancel{84}\) 85 \(\xcancel{86}\) 87 \(\xcancel{88}\) 89 \(\xcancel{90}\)
    91 \(\xcancel{92}\) 93 \(\xcancel{94}\) 95 \(\xcancel{96}\) 97 \(\xcancel{98}\) 99 \(\xcancel{100}\)

    The next step is to circle 3 (the first number not already circled or crossed out) and cross out any multiples of 3 (like 9, 15, etc.) not already crossed out. When this step is finished, our list looks like this:

      \(\fbox{2}\) \(\fbox{3}\) \(\xcancel{4}\) 5 \(\xcancel{6}\) 7 \(\xcancel{8}\) \(\xcancel{9}\) \(\xcancel{10}\)
    11 \(\xcancel{12}\) 13 \(\xcancel{14}\) \(\xcancel{15}\) \(\xcancel{16}\) 17 \(\xcancel{18}\) 19 \(\xcancel{20}\)
    \(\xcancel{21}\) \(\xcancel{22}\) 23 \(\xcancel{24}\) 25 \(\xcancel{26}\) \(\xcancel{27}\) \(\xcancel{28}\) 29 \(\xcancel{30}\)
    31 \(\xcancel{32}\) \(\xcancel{33}\) \(\xcancel{34}\) 35 \(\xcancel{36}\) 37 \(\xcancel{38}\) \(\xcancel{39}\) \(\xcancel{40}\)
    41 \(\xcancel{42}\) 43 \(\xcancel{44}\) \(\xcancel{45}\) \(\xcancel{46}\) 47 \(\xcancel{48}\) 49 \(\xcancel{50}\)
    \(\xcancel{51}\) \(\xcancel{52}\) 53 \(\xcancel{54}\) 55 \(\xcancel{56}\) \(\xcancel{57}\) \(\xcancel{58}\) 59 \(\xcancel{60}\)
    61 \(\xcancel{62}\) \(\xcancel{63}\) \(\xcancel{64}\) 65 \(\xcancel{66}\) 67 \(\xcancel{68}\) \(\xcancel{69}\) \(\xcancel{70}\)
    71 \(\xcancel{72}\) 73 \(\xcancel{74}\) \(\xcancel{75}\) \(\xcancel{76}\) 77 \(\xcancel{78}\) 79 \(\xcancel{80}\)
    \(\xcancel{81}\) \(\xcancel{82}\) 83 \(\xcancel{84}\) 85 \(\xcancel{86}\) \(\xcancel{87}\) \(\xcancel{88}\) 89 \(\xcancel{90}\)
    91 \(\xcancel{92}\) \(\xcancel{93}\) \(\xcancel{94}\) 95 \(\xcancel{96}\) 97 \(\xcancel{98}\) \(\xcancel{99}\) \(\xcancel{100}\)

    If we keep going until all numbers have either been circled or crossed out, our list will look like this:

      \(\fbox{2}\) \(\fbox{3}\) \(\xcancel{4}\) \(\fbox{5}\) \(\xcancel{6}\) \(\fbox{7}\) \(\xcancel{8}\) \(\xcancel{9}\) \(\xcancel{10}\)
    \(\fbox{11}\) \(\xcancel{12}\) \(\fbox{13}\) \(\xcancel{14}\) \(\xcancel{15}\) \(\xcancel{16}\) \(\fbox{17}\) \(\xcancel{18}\) \(\fbox{19}\) \(\xcancel{20}\)
    \(\xcancel{21}\) \(\xcancel{22}\) \(\fbox{23}\) \(\xcancel{24}\) \(\xcancel{25}\) \(\xcancel{26}\) \(\xcancel{27}\) \(\xcancel{28}\) \(\fbox{29}\) \(\xcancel{30}\)
    \(\fbox{31}\) \(\xcancel{32}\) \(\xcancel{33}\) \(\xcancel{34}\) \(\xcancel{35}\) \(\xcancel{36}\) \(\fbox{37}\) \(\xcancel{38}\) \(\xcancel{39}\) \(\xcancel{40}\)
    \(\fbox{41}\) \(\xcancel{42}\) \(\fbox{43}\) \(\xcancel{44}\) \(\xcancel{45}\) \(\xcancel{46}\) \(\fbox{47}\) \(\xcancel{48}\) \(\xcancel{49}\) \(\xcancel{50}\)
    \(\xcancel{51}\) \(\xcancel{52}\) \(\fbox{53}\) \(\xcancel{54}\) \(\xcancel{55}\) \(\xcancel{56}\) \(\xcancel{57}\) \(\xcancel{58}\) \(\fbox{59}\) \(\xcancel{60}\)
    \(\fbox{61}\) \(\xcancel{62}\) \(\xcancel{63}\) \(\xcancel{64}\) \(\xcancel{65}\) \(\xcancel{66}\) \(\fbox{67}\) \(\xcancel{68}\) \(\xcancel{69}\) \(\xcancel{70}\)
    \(\fbox{71}\) \(\xcancel{72}\) \(\fbox{73}\) \(\xcancel{74}\) \(\xcancel{75}\) \(\xcancel{76}\) \(\xcancel{77}\) \(\xcancel{78}\) \(\fbox{79}\) \(\xcancel{80}\)
    \(\xcancel{81}\) \(\xcancel{82}\) \(\fbox{83}\) \(\xcancel{84}\) \(\xcancel{85}\) \(\xcancel{86}\) \(\xcancel{87}\) \(\xcancel{88}\) \(\fbox{89}\) \(\xcancel{90}\)
    \(\xcancel{91}\) \(\xcancel{92}\) \(\xcancel{93}\) \(\xcancel{94}\) \(\xcancel{95}\) \(\xcancel{96}\) \(\fbox{97}\) \(\xcancel{98}\) \(\xcancel{99}\) \(\xcancel{100}\)

    Observe how the name of this technique is descriptive—by crossing out all the multiples of the circled numbers, we let these numbers slip away from us as if through a sieve, while we can imagine the circled primes getting caught in the sieve. In our example, the numbers preserved by the sieve of Eratosthenes, that is, the prime numbers less than \(100\), are the numbers \[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.\nonumber \]

    Definition \(\PageIndex{2}\)

    The primality of an integer \(n \geq 2\) refers to its membership (or not) in the set of prime numbers. To check the primality of \(n\) means to determine whether \(n\) is prime.

    Remark \(\PageIndex{2}\)

    We can use Theorem \(\PageIndex{2}\) to help in checking the primality of an integer: To check whether or not \(n>1\) is prime we need only try to divide it by all primes \(p\le\sqrt{n}\). If none of these primes divides \(n\) then \(n\) must be prime.

    Example \(\PageIndex{1}\)

    Consider the number \(97\). Note that \(\sqrt{97}<\sqrt{100}=10\). The primes \(\le 10\) are \(2\), \(3\), \(5\), and \(7\). One easily checks that \(97\bmod 2=1\), \(97\bmod 3=1\), \(97\bmod 5=2\), \(97\bmod 7=6\). So none of the primes \(2\), \(3\), \(5\), \(7\) divide \(97\) and \(97\) is prime by Theorem \(\PageIndex{2}\).

    This gives us a slight shortcut to finding primes with the Sieve of Eratosthenes: in our example above, once we have circled 7 and crossed out its multiples in the example above, every other number currently in the list that has not yet been circled or crossed out is guaranteed to be prime and can immediately be circled, since 7 is the largest prime number that is less than or equal to the square root of 100.

    Definition \(\PageIndex{3}\)

    Let \(x\in\mathbb{R}\), \(x>0\). The prime-counting function \(\pi(x)\) is defined as the number of primes \(p\) such that \(p\le x\).

    For example, since the only primes \(p\le 10\) are 2, 3, 5, and 7 we have \(\pi(10) = 4\).

    Here is a table of values of \(\pi(10^i)\) for \(i=2, \dots, 10\). We also include known approximations to \(\pi(x)\). Note that the formulas for the approximations do not give integer values, but for the table we have rounded each to the nearest integer. The values in the table were computed using the computer algebra system Maple. \[\left | \begin {array}{rrrr} x & \pi(x) & \frac x{\ln(x)} & \int_2^x\frac{1}{\ln(t)}dt \\ & & & \\ 10^2 & 25 & 22 & 29\\ 10^3 & 168& 145& 177\\ 10^4 & 1229 & 1086 & 1245\\ 10^5 & 9592 & 8686 & 9629\\ 10^6 & 78498 & 72382 & 78627\\ 10^7 & 664579 & 620421 & 664917\\ 10^8 & 5761455 & 5428681 & 5762208\\ 10^9 & 50847534 & 48254942 & 50849234\\ 10^{10} & 455052511 & 434294482 & 455055614 \end {array} \right|\nonumber \] You may judge for yourself which approximations appear to be the best. This table has been continued\(^{4}\) up to \(10^{28}\), but undoubtedly people are still working on finding the value of \(\pi(10^{n})\) for larger \(n\). Of course, the approximations are easy to compute with Maple or a similar computational tool, but the exact value of \(\pi(10^{28})\) is difficult to find.

    Why do the functions defined by \(\frac{x}{\ln x}\) and \(\int_2^x \frac{dt}{\ln t}\) do as well as they do in approximating \(\pi(x)\)? This is not an easy question to answer. The relationship between \(\pi(x)\) and \(\int_2^{x}\frac{dt}{\ln t}\) was conjectured by Gauss in \(1793\). More than 100 years later, Hadamard and de la Vallée Poussin, independently of each other, successfully completed proofs of this result. Here is an equivalent statement.

    Theorem \(\PageIndex{3}\): The Prime Number Theorem

    \[\pi(x)\sim\frac x{\ln(x)} \quad \mbox{ for $x>0$}.\nonumber \]

    Remark \(\PageIndex{3}\)

    The \(\sim\) in the Prime Number Theorem means that \[\lim_{x\to\infty}\frac{\pi(x)}{\frac x{\ln(x)}}=1.\nonumber \] For a connection between \(\frac{x}{\ln x}\) and \(\int_2^x \frac{dt}{\ln t}\), see Exercise \(\PageIndex{11}\).

    The distribution of the prime numbers among the integers is in some respects still mysterious. Although there are infinitely many primes, there are long stretches of consecutive integers containing no primes.

    Theorem \(\PageIndex{4}\)

    For any positive integer \(n\) there is an integer \(a\) such that the \(n\) consecutive integers \[a, \; a+1, \; a+2, \; \dotsc, \; a+(n-1)\nonumber \] are all composite.

    Proof

    Given \(n\ge 1\) let \(a=(n+1)!+2\). (Factorials were defined in Exercise 1.3.5.) We claim that all the numbers \[a, \; a+1, \; a+2, \; \dotsc, \; a+(n-1)\nonumber \] are composite. Since \((n+1)\ge 2\) clearly \(2\mid (n+1)!\) and \(2\mid 2\). Hence \(2\mid ((n+1)!+2)\). Since \((n+1)!+2>2\), \((n+1)!+2\) is composite. Consider \[a+i=(n+1)!+i+2\nonumber \] where \(0\le i\le n-1\) so \(2\le i+2\le n+1\). Thus \(i+2\mid (n+1)!\) and \(i+2\mid (i+2).\) Therefore \(i+2\mid (a+i)\). Now \(a+i>i+2>1\), so \(a+i\) is composite.

    On the other hand, statements such as the Twin Prime Conjecture describe how short a list of consecutive composite numbers might be guaranteed to be. Twin primes are prime numbers that differ by exactly 2. Examples of “twin primes” include 5 and 7, 29 and 31, and 1427 and 1429. Between twin primes, there is only one composite number, but do twin primes eventually stop happening?

    The Twin Prime Conjecture

    There are infinitely many pairs of twin primes.

    Though this conjecture remains unproven, in April 2013 mathematician Yitang Zhang announced a proof that there are infinitely many pairs of primes that differ by 70 million or less.\(^{5}\) Following up on these ideas, one year later The Polymath Project\(^{6}\) improved the result to show that there are infinitely many pairs of primes that differ by no more than 246.

    Another conjecture that has ties to the locations of prime numbers is Goldbach’s Conjecture.

    Goldbach's Conjecture

    Every even integer \(n>2\) is the sum of two primes.

    This conjecture arose in correspondence from 1742 between Christian Goldbach and Leonhard Euler. It has been verified by T. Oliveira e Silva, S. Herzog, and S. Pardi\(^{7}\) for all even integers not larger than \(4 \cdot 10^{18}\) but remains unproven.

    There is even a connection between the distribution of the prime numbers (in particular, how rough of an approximation the functions in the Prime Number Theorem are for \(\pi(x)\)) and the question that is perhaps most famous among all currently unsolved problems of mathematics: is the Riemann Hypothesis true? We will not discuss the Riemann Hypothesis here, but you can read about it (and its connection to approximations of \(\pi(x)\)) with a bit of research.\(^{8}\)

    We have covered a lot of ground in this chapter. Truly, even thousands of years after Euclid and Eratosthenes studied them, the prime numbers remain a rich source of understandable but as-yet-unsolved mysteries.

    Exercises

    Exercise \(\PageIndex{1}\)

    Prove that \(2\) is the only even prime number. (Joke: Hence it is said that 2 is the “oddest” prime.)

    Exercise \(\PageIndex{2}\)

    Show that every prime number other than 2 or 3 is either one less than, or one more than, a multiple of 6. (Appendix A organizes the primes less than 200 into cases based on this fact.)

    Exercise \(\PageIndex{3}\)

    Show that if \(p\) and \(q\) are primes and \(p\mid q\), then \(p=q\).

    Exercise \(\PageIndex{4}\)

    Use the idea of the proof of Euclid’s Theorem (Theorem \(\PageIndex{1}\)) to show that if \(q_1,q_2,\dotsc,q_n\) are any primes (not necessarily the smallest primes, or consecutive ones), then there is a prime \(q\notin\left\{q_1,\dotsc,q_n\right\}\).

    (Hint: Take \(N=q_1\dotsm q_n+1\); by Lemma \(\PageIndex{2}\) there is a prime \(q\) such that \(q\mid N\). Prove that \(q\notin\left\{q_1,\dotsc,q_n\right\}\).)

    Exercise \(\PageIndex{5}\)

    Let \(p_1=2,p_2=3,p_3=5,\dotsc\) and, in general, \(p_i=\text{the }i\)-th prime. Prove or disprove that \[p_1p_2\dotsm p_n+1\nonumber \] is prime for all \(n\ge 1\).

    (Hint: If \(n=1\) we have \(2+1=3\) is prime. If \(n=2\) we have \(2\cdot 3+1=7\) is prime. If \(n=3\) we have \(2\cdot 3\cdot 5+1=31\) is prime. Try the next few values of \(n\). You may want to use Theorem \(\PageIndex{2}\) to check primality.)

    Exercise \(\PageIndex{6}\)

    By using Theorem \(\PageIndex{2}\) as in Example \(\PageIndex{1}\), determine the primality of the following integers: \[143,\quad 221,\quad 199,\quad 223,\quad 3521.\nonumber \]

    Exercise \(\PageIndex{7}\)
    1. Imitating the proof of Theorem \(\PageIndex{2}\), show that if \(n=abc\) where \(a>1\), \(b>1\), and \(c>1\), then one of \(a,b,c\) is less than or equal to \(\sqrt[3]{n}\).
    2. Comparing Theorem \(\PageIndex{2}\) and part (a), come up with a generalization for when \(n\) is the product of \(k\) integers, each greater than 1.
    Exercise \(\PageIndex{8}\)

    Use the sieve of Eratosthenes to find all prime numbers less than 300, showing your work.

    Exercise \(\PageIndex{9}\)

    Prove that while the sieve of Eratosthenes is performed on a list \(2,\dots,n\) of integers, when a number \(k\) is circled, the first multiple of \(k\) that then needs to be crossed out (because it hasn’t already been crossed out) is \(k^2\).

    Exercise \(\PageIndex{1}\)

    Use the Prime Number Theorem and a calculator to approximate the number of primes \(\le 10^8\). Note \(\ln (10^8 )=8 \ln (10)\).

    Exercise \(\PageIndex{11}\)

    Use l’Hospital’s rule and the Fundamental Theorem of Calculus (with integration by parts) to show that \[\lim_{x \to \infty} \frac{\int_2^{x}\frac{dt}{\ln t}}{\frac{x}{\ln x}} = 1,\nonumber \] and use this and Theorem \(\PageIndex{3}\) to show that \[\pi(x) \sim \int_2^{x}\frac{dt}{\ln t}.\nonumber \]

    Exercise \(\PageIndex{12}\)

    Find \(10\) consecutive composite numbers.

    Exercise \(\PageIndex{13}\)
    1. Is \(2^n-1\) always prime if \(n\ge 2\)? Explain.
    2. Is \(2^n-1\) always prime if \(n\) is prime? Explain.

    Footnotes

    [1] This theorem appears as Proposition 20 in Book IX of Euclid's Elements, so a proof of this fact has been passed down for over 2000 years.

    [2] If we repeatedly apply the proof of Euclid's Theorem, starting with \(p_1 = 2\) and each time letting \(p_{n+1}\) be the smallest prime divisor when \(N\) is created from \(p_1,\ldots ,p_n\), then the order in which the prime numbers are generated, beginning with \(2, 3, 7, 43\), etc., is not well understood. For some notes on this ordering of primes, visit the entry on it at the Online Encyclopedia of Integer Sequences: see http://oeis.org/A000945.

    [3] This method was attributed by an ancient writer to the Greek mathematician Eratosthenes, who lived in the 3rd century BC (also in Alexandria, though perhaps a little after Euclid).

    [4] The value \(\pi (10^{28})\) was announced to be \(157,589,269,275,973,410,412,739,598\) by David Baugh and Kim Walisch in August 2020 (see https://mersenneforum.org/showthread.php?p=555442).

    [5] For an engaging video on the breakthrough, see Numberphile's "Gaps between Primes" at https://www.youtube.com/watch?v=vkMXdShDdtY.

    [6] https://polymathprojects.org/

    [7] "Empirical verification of the even Goldbach Conjecture and computation of prime gaps up to \(4\cdot 10^{18}\)," Mathematics of Computation, Vol. 83, No. 288 (July 2014), pp. 2033-2060.

    [8] One source to consult is at https://www.simonsfoundation.org/202...nn-hypothesis/ .


    This page titled 1.11: Prime Numbers is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike Barrus & W. Edwin Clark.