Home page for accesible maths 4 Number theory

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

4.6 Prime numbers

The concept of a prime number is fundamental to number theory. For the next two sections we confine ourselves to the natural numbers \mathbb{N}.

Definition 4.6.1

Let p{2,3,4,}p\in\{2,3,4,\ldots\}. We say that pp is prime if the only natural numbers which divide pp are 11 and pp itself; otherwise pp is composite.

Note that 11 is neither prime nor composite. If nn is composite, then for some natural number aa satisfying 1<a<n1<a<n we have a|na|n; so n=abn=ab with a,b{2,3,,n-1}a,b\in\{2,3,\ldots,n-1\}.

It is easy to list the first few prime numbers: 2,3,5,7,2,3,5,7,\ldots A convenient way of obtaining a longer list is called the Sieve of Eratosthenes: begin with a grid listing the first 100100 (say) natural numbers.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100\begin{array}[]{|c|c|c|c|c|c|c|c|c|c|}\omit&\omit&\omit&\omit&\omit&\omit&% \omit&\omit&\omit&\omit\\ \hline\vrule width 0.0pt depth 10.0pt height 18.0pt1&2&3&4&5&6&7&8&9&10\\ \hline\vrule height 18.0pt depth 10.0pt width 0.0pt11&12&13&14&15&16&17&18&19&% 20\\ \hline\vrule height 18.0pt width 0.0pt depth 10.0pt21&22&23&24&25&26&27&28&29&% 30\\ \hline\vrule depth 10.0pt width 0.0pt height 18.0pt31&32&33&34&35&36&37&38&39&% 40\\ \hline\vrule height 18.0pt depth 10.0pt width 0.0pt41&42&43&44&45&46&47&48&49&% 50\\ \hline\vrule width 0.0pt depth 10.0pt height 18.0pt51&52&53&54&55&56&57&58&59&% 60\\ \hline\vrule height 18.0pt depth 10.0pt width 0.0pt61&62&63&64&65&66&67&68&69&% 70\\ \hline\vrule depth 10.0pt width 0.0pt height 18.0pt71&72&73&74&75&76&77&78&79&% 80\\ \hline\vrule width 0.0pt depth 10.0pt height 18.0pt81&82&83&84&85&86&87&88&89&% 90\\ \hline\vrule width 0.0pt depth 10.0pt height 18.0pt91&92&93&94&95&96&97&98&99&% 100\\ \hline\end{array}

Cross out 11, which is neither prime nor composite. Take the first remaining entry, circle it, and cross out all its successive multiples; then take the next remaining entry, circle it, and cross out all its successive multiples; and so on. At the end of the process the circled entries are the prime numbers.

The most important property of prime numbers is the following, which is a consequence of Euclid’s Lemma.

Proposition 4.6.2

Let p,a,bp,a,b\in\mathbb{N}. If pp is prime and p|abp|ab, then p|ap|a or p|bp|b.

Example 4.6.3

We have 7|287|28 and 28=21428=2\cdot 14, so 7|27|2 or 7|147|14. (Of course, we know that it is the latter statement which is true.)

Proof. Take a,ba,b\in\mathbb{N} with p|abp|ab. If p|ap|a then we have the desired conclusion, so assume that p|ap\!\!\!\!\;\not\!\!\!\;|\!\;a; then hcf(p,a)p\mathrm{hcf}(p,a)\neq p, so as hcf(p,a)|p\mathrm{hcf}(p,a)|p we must have hcf(p,a)=1.\mathrm{hcf}(p,a)=1. By Theorem 4.4.8 we therefore have p|bp|b as required. \Box

Note that this property characterizes prime numbers; if nn is composite we may write n=abn=ab for some a,b{2,3,4,,n-1}a,b\in\{2,3,4,\ldots,n-1\}, and then n|abn|ab but n|an\!\!\!\!\;\not\!\!\!\;|\!\;a and n|bn\!\!\!\!\;\not\!\!\!\;|\!\;b, so that nn fails to have the property. (Example: 6|66|6 and 6=236=2\cdot 3, but 6| 26\!\!\!\!\;\not\!\!\!\;|\!\;2 and 6| 36\!\!\!\!\;\not\!\!\!\;|\!\;3.)

Remark 4.6.4

We can easily extend Proposition 4.6.2 to cover products of more than two factors. Suppose that pp\in\mathbb{N} is prime and that p|abcp|abc for some a,b,ca,b,c\in\mathbb{N}; regarding the product as (ab)c(ab)c, Proposition 4.6.2 shows that we must have p|abp|ab or p|cp|c, and in the former case Proposition 4.6.2 again shows that p|ap|a or p|bp|b; so all in all, pp divides one of the three factors. Likewise if a,b,c,da,b,c,d\in\mathbb{N} with p|abcdp|abcd, we deduce that p|abcp|abc or p|dp|d, and in the former case we have just seen that pp divides aa, bb or cc; so again pp divides one of the factors. Continuing in this way (or, strictly speaking, by induction), we see that whenever pp divides a product of any number of factors, it must divide one of them.

We now come to a most important result, the Fundamental Theorem of Arithmetic. By a product of primes we mean an expression of the form p1p2pnp_{1}p_{2}\cdots p_{n} for some nn\in\mathbb{N} and prime numbers p1,p2,,pnp_{1},p_{2},\dots,p_{n}; note that if n=1n=1 we obtain p1p_{1} as the ‘‘product’’ of a single prime number.

Theorem 4.6.5

Every natural number greater than or equal to 22 can be expressed as a product of primes; this product is unique up to the order of the factors.

The proof of this theorem relies on the Principle of Induction, which will be introduced in MATH101. We shall postpone it until the end of the module (see Appendix A).

We conclude this section with a couple of examples which highlight the difference between a proof and a counterexample.

Example 4.6.6

For each nn\in\mathbb{N}, consider the statement

P(n):P(n)\colon‘‘the natural number 6n-16n-1 is prime’’.

It is tempting to believe that P(n)P(n) is true for all nn\in\mathbb{N} because

61-1\displaystyle 6\cdot 1-1 =5\displaystyle=5 is prime,\displaystyle\text{is prime},
62-1\displaystyle 6\cdot 2-1 =11\displaystyle=11 is prime,\displaystyle\text{is prime},
63-1\displaystyle 6\cdot 3-1 =17\displaystyle=17 is prime,\displaystyle\text{is prime},
64-1\displaystyle 6\cdot 4-1 =23\displaystyle=23 is prime,\displaystyle\text{is prime},

so that P(n)P(n) is true for n=1,2,3,4n=1,2,3,4. However, P(n)P(n) is not true in general, because

66-1=35=57is𝑛𝑜𝑡prime,6\cdot 6-1=35=5\cdot 7\quad\text{is}\ \textsl{not}\ \text{prime,}

that is, P(6)P(6) is false.

Our second example is similar, but much harder to resolve; it goes back to Fermat and is known as Fermat’s Prime Conjecture.

Example 4.6.7

For each nn\in\mathbb{N}, consider the statement

P(n):P(n)\colon‘‘the natural number 22n+12^{2^{n}}+1 is prime’’.

Then P(n)P(n) is true for n=1,2,3,4n=1,2,3,4 because 22+1=52^{2}+1=5, 24+1=172^{4}+1=17, 28+1=2572^{8}+1=257 and 216+1=65 5372^{16}+1=65\>537 are prime numbers. Based on these observations, Fermat conjectured that P(n)P(n) is true for all nn\in\mathbb{N}. Euler, however, gave a counterexample to Fermat’s conjecture by showing that P(5)P(5) is false; indeed, we have

225+1=232+1=4 294 967 297=6416700417.2^{2^{5}}+1=2^{32}+1=4\>294\>967\>297=641\cdot 6700417.