Arithmetic Home Contents
Part II. ON THE DIVISIBILITY OF NUMBERS•Chapter II. Decomposition of Numbers into Prime Factors

§ 94. Some Information on Prime Numbers

It is easy to verify that there exists an infinite number of prime numbers. Indeed, let us assume the contrary, i.e., that there is a finite number of prime numbers. In that case, there must exist a greatest prime number.

Let this number be a. To refute this assumption, let us imagine a new number N, constructed according to the formula:

N = (2 · 3 · 5 · 7... a) + 1, i.e., let us imagine a number that is obtained by multiplying all prime numbers from 2 to a inclusive and adding one to the product. Since N is obviously greater than a, and a, according to the assumption, is the greatest of the prime numbers, N must be a composite number. But a composite number is divisible by some prime number (§ 93, Theorem 1). Consequently, N is divisible by some number from the series: 2, 3, 5, 7, 11,..., a. But this cannot be, since N is the sum of two terms, of which the first (the product 2 · 3 · 5... a) is divisible by every number from the series: 2, 3, 5, 7, ..., a, and the second (1) is not divisible by any of these numbers. Thus, there is no greatest prime number; and if there is no greatest prime number, then the series of prime numbers is infinite.

Since ancient times, prime numbers have been the subject of numerous studies. Among other things, scientists have tried to find a law for constructing prime numbers that would make it possible to express all prime numbers by one or several formulas, or they have tried to find at least such a formula that, although it does not express all prime numbers, would allow finding an arbitrarily large prime number. In this sense, the attempt by the famous French mathematician of the 17th century, Fermat, is particularly interesting. He found that the formula 2n + 1 gives prime numbers when n is equal to 20 = 1, 21 = 2, 22 = 4, 23 = 8. Indeed, for these values of the exponent n, the following prime numbers are obtained:

3, 5, 17, 257.

Based on this observation (and on certain considerations regarding the properties of numbers), Fermat expressed the hypothesis that the formula 2n + 1 must give prime numbers for any n equal to a power of 2. This opinion was not refuted for a long time, because no one (until Euler) succeeded in pointing out even one case where, for n equal to a power of 2, the formula 2n + 1 would yield a composite number*. The first to refute Fermat's hypothesis was the famous Euler (18th century), who proved that for n = 25 = 32, the formula 2n + 1 gives a number divisible by 641. This error by Fermat serves as an instructive example of how inapplicable the method of reasoning from the particular to the general (the method of induction) is in mathematics.

In the absence of formulas expressing all prime numbers, there is a need to empirically (by experimental means) construct a series of consecutive prime numbers from 2 to some definite large number a. The simplest and at the same time the most ancient method of constructing such a series belongs to the Alexandrian mathematician Eratosthenes (who lived in the 3rd century BC). Eratosthenes' method consists in excluding from the series of natural numbers from 2 to a (the number by which one wishes to limit the series) first all numbers divisible by 2 (except 2), then all numbers divisible by 3 (except 3), then all numbers divisible by 5, by 7, by 11 (except these numbers themselves), and so on. This is done very simply: having written out the series of odd numbers from 3 to a, one crosses out every third number after 3, every fifth number after 5, every seventh number after 7, and so on.

At present, there are tables of all consecutive prime numbers less than 9,000,000.

If a written-out series of prime numbers is not at hand, or if the given number N exceeds the greatest number in the written-out series, the question arises: how to determine whether N is a prime or a composite number? The simplest way to do this consists of the following. Having previously found √N, one writes out all prime numbers less than this root. Let these be the numbers:

2, 3, 5, 7..., a.

If N is not divisible by any of these numbers, one can assert, without performing further divisions, that N is a prime number. Indeed, since N = √N · √N, it is obvious that dividing N by numbers greater than √N must yield quotients less than √N; therefore, if the number N could be divided by some number greater than √N, it would also be divisible by a number less than √N. When N is large, this method can be very tedious; for example, if N > 1,000,000, then √N > 1000, and there are 168 prime numbers less than 1000; consequently, testing such a number would sometimes require up to 168 divisions. In number theory, methods are indicated by which the number of divisions required for testing a given number can be significantly reduced; but even so, the question of determining whether a given number is prime or composite still presents enormous difficulties at times.

Willow and Calvin — story illustration for § 94 “Some Information on Prime Numbers”
👨‍👩‍👧 In Plain Words (Kids & Parents)
Ask your child: Ask your child to demonstrate with numbers 12 and 4 on the right stage why the main rule of “Some Information on Prime Numbers” holds true.
Quick reference without leaving:

Study Guide for Parents, Teachers & Family Co-Learning — Lesson 94. Some Information on Prime Numbers

Core Idea in Plain Language

There is no magic formula to list all prime numbers, so we use Eratosthenes' Sieve to cross out multiples of 2, 3, 5, and so on, leaving only the primes behind. To check if a big number is prime, you only need to try dividing it by primes up to its square root.

If N is not divisible by any of these numbers, one can assert, without performing further divisions, that N is a prime number.
No largest prime number exists, so there are infinitely many.

Key Mathematical Terms:

Prime numbersComposite numberDivisible

Common Student Mistake & Socratic Fix

Typical pitfall: Billy tried to determine if 101 is prime by dividing it by every integer from 2 up to 100. He spent a long time checking 4, 6, 8, and other composite divisors, believing he had to test all numbers less than 101 to be sure.

How to guide correction: According to § 94, you only need to test prime divisors up to the square root of the number. Since √101 is approximately 10.05, Billy only needed to check divisibility by the primes 2, 3, 5, and 7. Since 101 is not divisible by any of these, it is prime, and he did not need to check numbers greater than 10.

Complete 4-Step Reasoning Walkthrough

  1. 1. Step 1: Assumption of finite primesAssume: finite number of primes

    Willow suggests assuming that there are finitely many prime numbers. Then there must exist a largest prime number, which we will call a.

  2. 2. Step 2: Constructing number NN = (2 · 3 · 5 · ... · a) + 1

    Calvin suggests imagining a number N equal to the product of all prime numbers from 2 to a plus one. This number N is clearly larger than a.

  3. 3. Step 3: Analyzing divisibility of NN not divisible by 2, 3, 5, ..., a

    Willow explains: the first term is divisible by all prime numbers, while one is divisible by none. Therefore, the sum N is not divisible by any prime number in the sequence.

  4. 4. Step 4: Conclusion and Fermat's error2³² + 1 is divisible by 641

    Calvin summarizes: since N is not divisible by the primes, no largest prime exists, meaning there are infinitely many. Euler refuted Fermat by showing that for n=32, the formula yields a composite number.

Graded Practice Problems & Worked Solutions

  1. Problem 1 (§ 94). What is the smallest prime number (and the only even prime number)?

    Hint: Recall the definition of a prime number: it must be greater than 1 and have exactly two distinct divisors. Check the even numbers starting from 2 to see which one fits the definition.

    Worked solution: The number 2 is divisible only by 1 and itself (2). All other even numbers are divisible by 2 and at least one other number, making them composite. Therefore, 2 is the smallest and only even prime number.
  2. Problem 2 (§ 94). How many prime factors (counting repetitions: 2 × 3 × 3) are in the prime factorization of the number 18?

    Hint: Perform the prime factorization of 18 by dividing it by the smallest primes. Count the total number of prime factors in the product, including duplicates.

    Worked solution: Divide 18 by 2 to get 9: 18 = 2 × 9. Divide 9 by 3 to get 3: 9 = 3 × 3. The full factorization is 2 × 3 × 3, which contains three prime factors.
  3. Problem 3 (§ 94). What prime number comes immediately after 7 in the table of prime numbers?

    Hint: List the integers greater than 7 in order: 8, 9, 10, 11... Check each number for divisibility by 2, 3, and 5 to determine if it is prime.

    Worked solution: 8 is divisible by 2, so it is composite. 9 is divisible by 3, so it is composite. 10 is divisible by 2, so it is composite. 11 is not divisible by 2, 3, or 5, so it is the next prime number.