See How Things Work

Prime and composite numbers

Unit
Factors, Multiples & Primes
Part
2. Prime Numbers
Lesson
2.1

A prime number is a whole number greater than 1 whose only factors are 1 and itself; a composite number has other factors too. This lesson defines both, explains why 0 and 1 are neither, proves that the smallest factor greater than 1 of any number is prime, and turns that into a test: a whole number n > 1 is prime exactly when no prime p with p × p ≤ n divides it.

Prime and composite numbers

The lesson “Factors and multiples” found every factor of a number through its factor pairs. Some numbers have many factors: 12 has six, from the pairs 1 × 12, 2 × 6 and 3 × 4. Others have as few as possible: 29 has only the pair 1 × 29, so its dots form a single row and no other rectangle. Every whole number m ≥ 1 has the factors 1 and m, so these numbers have no factor beyond the two that every number has.

Definition (Prime and composite numbers).

A whole number p is prime, or a prime number, if p > 1 and its only factors are 1 and p. A whole number greater than 1 that is not prime is composite.⁠[1][2]

For a number n > 1 the factors 1 and n are two different numbers, so the definition can also be put by counting factors: a prime has exactly two factors, and a composite number has more than two.⁠[3] The letter p is the usual name for a prime.⁠[4]

In the picture of the lesson “Factors and multiples”, n dots set out in a full rectangle of a rows of b are a factor pair a × b = n. The dots of a prime can be set out only in a single row. The dots of a composite number can also be set out in a rectangle with at least two rows and at least two columns.

1neither2prime3prime4composite5prime6composite7prime8composite9composite10composite11prime12composite
Figure. The numbers 1 to 12 with every rectangle their dots can form, one for each factor pair. 2, 3, 5, 7 and 11 form only a single row: they are prime. 4, 6, 8, 9, 10 and 12 also form a rectangle with at least two rows and two columns: they are composite. 1 is a single dot, with the one factor 1: it is neither.
Example (Prime or composite, from 1 to 12).

Sort the numbers from 2 to 12 into primes and composite numbers.

  1. 2 = 1 × 2 and 3 = 1 × 3 are the only factor pairs of 2 and 3: both are prime.
  2. 4 = 2 × 2: composite. 5 has only 1 × 5: prime. 6 = 2 × 3: composite. 7 has only 1 × 7: prime.
  3. 8 = 2 × 4, 9 = 3 × 3 and 10 = 2 × 5: composite. 11 has only 1 × 11: prime. 12 = 2 × 6: composite.

Answer: the primes are 2, 3, 5, 7 and 11; the composite numbers are 4, 6, 8, 9, 10 and 12. Up to 10 this is the standard list: 2, 3, 5, 7 prime and 4, 6, 8, 9, 10 composite.⁠[5]

Proposition (composite numbers).

For a whole number n > 1 the following say the same thing:

  1. n is composite;
  2. n has a factor a with 1 < a < n;
  3. n has a factor pair a × b = n with 1 < a ≤ b < n.
Proof.

(1) gives (2): n is not prime, so it has a factor a other than 1 and n. By the Proposition on the size of a factor in the lesson “Factors and multiples”, 1 ≤ a ≤ n; as a is neither 1 nor n, 1 < a < n.

(2) gives (3): write n = a × c. Then c is a factor of n too. If c were 1, then n = a × 1 = a, but a < n. If c were n, then n = a × n; but a ≥ 2, and the multiples of n keep growing, so a × n ≥ 2 × n = n + n, which is more than n. So 1 < c < n. Of a and c, call the smaller one (either one if they are equal) a and the other b: then a × b = n with 1 < a ≤ b < n.

(3) gives (1): a is a factor of n other than 1 and n, so n is not prime; and n > 1, so n is composite.

Condition (2) is the usual test for being composite: a number greater than 1 is composite exactly when it has a factor strictly between 1 and itself.⁠[6]

Example (The only even prime).

Show that 2 is the only even prime.

  1. 2 is even (2 = 1 × 2) and prime (its factors are 1 and 2).
  2. Let n be any other even number with n > 1, so n ≥ 4. Then 2 | n (lesson “Even and odd numbers”), and 1 < 2 < n.
  3. By condition (2) of the Proposition, n is composite. For example, 4 = 2 × 2, 38 = 2 × 19 and 1,000 = 2 × 500.

Answer: every even number other than 2 is composite (or is 0), so 2 is the only even prime.⁠[5]

Historical note.

Euclid’s Elements, Book VII, defines a prime number as “that which is measured by a unit alone”⁠[7] and a composite number as “that which is measured by some number”,⁠[8] where “measured by” means “is a multiple of”. Burton credits the Pythagoreans with being the first to sort numbers into prime and composite.⁠[9]

The numbers 0 and 1

Both definitions begin with numbers greater than 1, so 0 and 1 are neither prime nor composite. Each also fails the description by counting factors, in opposite ways.

  • 1 has exactly one factor, 1 itself (lesson “Factors and multiples”). A prime needs two, so 1 is not prime;⁠[10] and 1 has no factor between 1 and itself, so it is not composite either. It is neither.⁠[5]
  • 0 has every whole number as a factor, since 0 = 0 × a for every a:⁠[11] infinitely many factors. It is not greater than 1, so it is neither prime nor composite.

So every whole number is exactly one of four kinds: 0, 1, a prime, or a composite number. Why the definition leaves out 1, which has as few factors as can be, is the subject of the next lesson, “Why 1 is not prime”.

Example (Edge cases and a number that looks prime).

Classify 0, 1, 2 and 57.

  1. 0: every whole number is a factor of 0, and 0 is not greater than 1. Neither.
  2. 1: its only factor is 1, one factor. Neither.
  3. 2: factors 1 and 2, exactly two. Prime.
  4. 57 is odd and does not end in 5, which might suggest a prime. But its digit sum is 5 + 7 = 12, a multiple of 3, so 3 | 57 by the test of the lesson “Divisibility rules and why they work”: 57 = 19 × 3. Composite.

Answer: 0 and 1 are neither, 2 is prime, 57 = 3 × 19 is composite. Check: 3 × 19 = 57.

The smallest factor greater than 1

Every whole number n > 1 has at least one factor greater than 1, namely n itself, and all its factors lie between 1 and n. So among its factors greater than 1 there is a smallest one, found by trying 2, 3, 4, … in turn. That factor is always prime.

Theorem .

Let n > 1 be a whole number. The smallest factor of n that is greater than 1 is prime.

Proof.

Let p be the smallest factor of n with p > 1. Suppose p were not prime. Since p > 1, it would be composite, so by the Proposition it would have a factor q with 1 < q < p. Then q | p and p | n, so q | n by the rule on chains of the lesson “Divisibility”. So q would be a factor of n greater than 1 and smaller than p, which contradicts the choice of p. Hence p is prime.

This is the argument Burton uses at the start of his proof that every number greater than 1 is a product of primes.⁠[12]

Corollary .

Every whole number n > 1 has a prime factor. In particular, every composite number is divisible by a prime smaller than itself.

Proof.

The smallest factor p > 1 of n is a prime factor. If n is composite, it has a factor a with 1 < a < n, so p ≤ a < n.

The Corollary is Proposition 31 of Book VII of Euclid’s Elements: “Any composite number is measured by some prime number.”⁠[13]

Example (The smallest factor of 247).

Find the smallest factor of 247 greater than 1, and check that it is prime.

  1. 2: 247 is odd. 3: the digit sum is 13, not a multiple of 3. 5: the last digit is not 0 or 5. None of them divides 247.
  2. 4 and 6 are not factors either: a factor 4 or 6 would make 2 a factor, by the rule on chains.
  3. 7: 247 = 35 × 7 + 2. 8, 9 and 10 fail like 4 and 6 (their factors 2 or 3 would divide 247). 11: 247 = 22 × 11 + 5. 12: fails.
  4. 13: 247 = 19 × 13, remainder 0.

Answer: the smallest factor greater than 1 is 13, and 13 is prime, as the Theorem says. Check: 13 × 19 = 130 + 117 = 247.

Testing whether a number is prime

To prove that n is prime, one must rule out every factor between 1 and n. The Theorem of the previous section shows that much less is needed: it is enough to try primes, and only small ones. Each try is a division with remainder, as in the lesson “Division with remainder”: the prime divides n exactly when the remainder is 0.

Theorem .

Let n be a composite number, and p its smallest factor greater than 1. Then p is prime and p × p ≤ n.

Proof.

p is prime by the previous Theorem. Write n = p × b. Then b is a factor of n. Since n is composite, p < n, so b is not 1 (else n = p). Thus b is a factor of n greater than 1, and p, the smallest such factor, satisfies p ≤ b. Write b = p + e for a whole number e. By the distributive property,⁠[14] n = p × (p + e) = p × p + p × e, and adding the whole number p × e cannot make a sum smaller. So p × p ≤ n.

Corollary (the test for primes).

A whole number n > 1 is prime exactly when no prime p with p × p ≤ n divides n.

Proof.

If n is composite, the Theorem gives a prime p with p × p ≤ n that divides n. Conversely, let n be prime, and let p be a prime that divides n. The only factors of n are 1 and n, and p ≠ 1, so p = n; then p × p = n × n, which is more than n because n > 1. So no prime p with p × p ≤ n divides a prime n.

This is the standard test, usually stated with square roots: a composite number n has a prime divisor less than or equal to the square root of n,⁠[15] so a number is prime if no prime up to its square root divides it.⁠[16] The method of dividing by these primes in turn is called trial division.⁠[16] Textbooks describe the same procedure: test the primes in order to see whether each is a factor; if none is, the number is prime.⁠[17][18]

Looking ahead.

For a whole number p ≥ 0, “p × p ≤ n” is what “p is at most the square root of n” means. Square roots are introduced in the unit Powers & Square Roots; this unit needs only the products p × p.

Reason.

Only primes need trying: if a composite number d divided n, then the smallest factor of d greater than 1, a prime smaller than d, would divide n too, by the rule on chains, and would already have been found. OpenStax says to stop when the quotient becomes smaller than the divisor;⁠[19] the lesson “Factors and multiples” showed that this happens at the same moment as p × p > n.

Example (A prime under 100).

Is 97 prime?

  1. The primes p with p × p ≤ 97 are 2, 3, 5 and 7, since 7 × 7 = 49 and 11 × 11 = 121.
  2. 2: 97 is odd. 3: digit sum 9 + 7 = 16, not a multiple of 3. 5: the last digit is 7.
  3. 7: 97 = 13 × 7 + 6, remainder 6.
  4. No prime with p × p ≤ 97 divides 97.

Answer: 97 is prime. Check of step 3: 13 × 7 = 91, and 91 + 6 = 97.

Example (A composite number with no small factor).

Is 323 prime?

  1. The primes to try are those with p × p ≤ 323: 2, 3, 5, 7, 11, 13 and 17 (17 × 17 = 289, while 19 × 19 = 361).
  2. 2: 323 is odd. 3: digit sum 8. 5: last digit 3. None divides.
  3. 7: 323 = 46 × 7 + 1. 11: 323 = 29 × 11 + 4. 13: 323 = 24 × 13 + 11.
  4. 17: 323 = 19 × 17, remainder 0.

Answer: 323 is composite, 323 = 17 × 19. Its smallest factor greater than 1 is 17, and 17 × 17 = 289 ≤ 323, as the Theorem says. Check: 17 × 19 = 17 × 20 − 17 = 340 − 17 = 323.

Example (The smallest cases: 2, 3 and 4).

Apply the test to 2, 3 and 4.

  1. The smallest prime is 2, and 2 × 2 = 4. So for n = 2 and n = 3 there is no prime p with p × p ≤ n.
  2. No such prime, so none divides n: by the Corollary, 2 and 3 are prime.
  3. For n = 4, the prime 2 has 2 × 2 = 4 ≤ 4, and 2 | 4. So 4 is composite.

Answer: 2 and 3 are prime and 4 = 2 × 2 is composite. When there is nothing to try, the test says “prime”, and correctly so.

Example (A common mistake: stopping one prime too early).

Someone tests 289: “2, 3, 5, 7, 11 and 13 do not divide it, and 13 × 13 = 169 is far below 289, so I stop: 289 is prime.” Check this.

  1. The test may stop only at a prime p with p × p more than 289. 13 × 13 = 169 is less, so 13 is not that prime.
  2. The next prime is 17, and 17 × 17 = 289, which is at most 289: 17 must be tried.
  3. 289 = 17 × 17, remainder 0.

Answer: 289 = 17 × 17 is composite. The condition is p × p ≤ n, with equality allowed: a number such as 289 whose only factor pairs are 1 × 289 and 17 × 17 is found only by the last prime.

Game

Is it prime?

Round
1
Score
0
Streak
0

Is 179 prime? Tap a prime to divide 179 by it. Try the primes in order, and stop once p × p is more than 179.

No division yet. Start with 2, the smallest prime.
Looking ahead.

Testing numbers one at a time is slow when all the primes up to some number are wanted. The lesson “The sieve of Eratosthenes” finds them all at once, and the lesson “Prime factorization” uses the smallest prime factor, again and again, to write every number greater than 1 as a product of primes.

Exercises

Exercise .

Classify each number as prime, composite or neither: 0, 1, 2, 9, 31, 39, 51, 53.

▸ Show solution
  1. 0 and 1: neither (0 has every number as a factor, 1 has one factor).
  2. 2: prime. 9 = 3 × 3: composite.
  3. 31: try 2, 3, 5 (5 × 5 = 25 ≤ 31 < 49 = 7 × 7). 31 is odd, its digit sum is 4, it ends in 1. Prime.
  4. 39 = 3 × 13 and 51 = 3 × 17: composite (digit sums 12 and 6).
  5. 53: try 2, 3, 5, 7 (7 × 7 = 49 ≤ 53). Odd, digit sum 8, ends in 3, and 53 = 7 × 7 + 4. Prime.
Exercise .

Find every prime between 50 and 70.

▸ Show solution

For every n between 50 and 70, the primes to try are 2, 3, 5 and 7, since 7 × 7 = 49 and 11 × 11 = 121. The even numbers and the numbers ending in 5 (other than 5 itself) are composite, which leaves 51, 53, 57, 59, 61, 63, 67, 69.

By digit sums, 3 divides 51 (= 3 × 17), 57 (= 3 × 19), 63 (= 3 × 21) and 69 (= 3 × 23). The others: 53 = 7 × 7 + 4, 59 = 8 × 7 + 3, 61 = 8 × 7 + 5, 67 = 9 × 7 + 4, and their digit sums 8, 14, 7, 13 are not multiples of 3.

Answer: 53, 59, 61 and 67.

Exercise .

Is 211 prime? Show every division you need.

▸ Show solution

Try the primes with p × p ≤ 211: 2, 3, 5, 7, 11, 13 (13 × 13 = 169, 17 × 17 = 289). 211 is odd, its digit sum is 4, it ends in 1; 211 = 30 × 7 + 1, 211 = 19 × 11 + 2, 211 = 16 × 13 + 3. No remainder is 0, so 211 is prime.

Exercise .

Find the smallest factor of 1,001 greater than 1. Is 1,001 prime?

▸ Show solution

2, 3 and 5 do not divide 1,001 (odd, digit sum 2, last digit 1). 7 does: 1,001 = 143 × 7. So 1,001 is composite and its smallest factor greater than 1 is 7. Going on with 143: 143 = 13 × 11. So 1,001 = 7 × 11 × 13.

Exercise .

Let p and q be primes with p | q. Prove that p = q.

▸ Show solution

The only factors of the prime q are 1 and q. Since p | q, p is one of them; and p ≠ 1 because p > 1. So p = q.

Exercise .

A composite number n is not divisible by 2, 3, 5 or 7. Prove that n ≥ 121, and show that 121 is possible.

▸ Show solution

Let p be the smallest factor of n greater than 1. By the Theorems of this lesson, p is prime and p × p ≤ n. None of 2, 3, 5, 7 divides n, so p is none of them, and the next prime is 11: p ≥ 11. Then n ≥ p × p ≥ 11 × 11 = 121.

The bound is reached: 121 = 11 × 11 is composite, and 2, 3, 5 and 7 do not divide it.

Exercise .

A whole number n with 2 ≤ n ≤ 1,000 is not divisible by any of 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31. Prove that n is prime.

▸ Show solution

For n ≤ 1,000, every prime p with p × p ≤ n is at most 31, because 37 × 37 = 1,369 > 1,000 and 37 is the prime after 31. The listed primes are all the primes up to 31. So if none of them divides n, no prime with p × p ≤ n divides n, and by the test n is prime.

Summary

  1. A prime is a whole number p > 1 whose only factors are 1 and p (exactly two factors). A composite number is a number greater than 1 that is not prime (more than two factors).
  2. n > 1 is composite exactly when it has a factor a with 1 < a < n, that is, a factor pair a × b with 1 < a ≤ b < n. 2 is the only even prime.
  3. 0 and 1 are neither prime nor composite: every number is a factor of 0, and 1 has only one factor.
  4. The smallest factor greater than 1 of any n > 1 is prime; so every n > 1 has a prime factor.
  5. If n is composite, its smallest prime factor p has p × p ≤ n. So n > 1 is prime exactly when no prime p with p × p ≤ n divides it.

Sources

  1. 1.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 3, “Primes and Their Distribution”, section 3.1, “The Fundamental Theorem of Arithmetic”, Definition 3.1, p. 39 (the whole topic: pp. 39–42).
    “An integer p > 1 is called a prime number, or simply a prime, if its only positive divisors are 1 and p. An integer greater than 1 that is not a prime is termed composite.”
    Used for: the definitions of a prime (greater than 1, only factors 1 and itself) and of a composite number (greater than 1 and not prime).
  2. 2.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.3, “Primes and Greatest Common Divisors” (4.3.2, “Primes”), Definition 1, p. 271 (the whole topic: pp. 271–273).
    “An integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite.”
    Used for: the definitions of prime and composite numbers.
  3. 3.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “The Language of Algebra”, section 2.4, “Find Multiples and Factors” (“Identify Prime and Composite Numbers”), p. 148 (the whole topic: pp. 148–149).
    “A number with only two factors is called a prime number. A number with more than two factors is called a composite number.”
    Used for: a prime has exactly two factors and a composite number more than two.
  4. 4.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 3, “Primes and Their Distribution”, section 3.1, “The Fundamental Theorem of Arithmetic”, p. 39 (the whole topic: pp. 39–42).
    “In the rest of this book, the letters p and q will be reserved, so far as is possible, for primes.”
    Used for: the letter p is the usual name for a prime.
  5. 5.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 3, “Primes and Their Distribution”, section 3.1, “The Fundamental Theorem of Arithmetic”, p. 39 (the whole topic: pp. 39–42).
    “Among the first 10 positive integers, 2, 3, 5, 7 are primes and 4, 6, 8, 9, 10 are composite numbers. Note that the integer 2 is the only even prime, and according to our definition the integer 1 plays a special role, being neither prime nor composite.”
    Used for: 2, 3, 5, 7 are prime and 4, 6, 8, 9, 10 composite; 2 is the only even prime; 1 is neither prime nor composite.
  6. 6.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.3, “Primes and Greatest Common Divisors” (4.3.2, “Primes”), Remark after Definition 1, p. 271 (the whole topic: pp. 271–273).
    “Note also that an integer n is composite if and only if there exists an integer a such that a ∣n and 1 < a < n.”
    Used for: a number is composite exactly when it has a factor strictly between 1 and itself.
  7. 7.
    Euclid, trans. T. L. Heath, ed. D. E. Joyce, “Euclid’s Elements, Book VII”, Clark University.
    “A prime number is that which is measured by a unit alone.”
    Used for: Euclid’s definition of a prime number (Elements VII, Definition 11).
  8. 8.
    Euclid, trans. T. L. Heath, ed. D. E. Joyce, “Euclid’s Elements, Book VII”, Clark University.
    “A composite number is that which is measured by some number.”
    Used for: Euclid’s definition of a composite number (Elements VII, Definition 13).
  9. 9.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 3, “Primes and Their Distribution”, section 3.1, “The Fundamental Theorem of Arithmetic”, p. 42 (the whole topic: pp. 39–42).
    “The Pythagoreans deserve the credit for being the first to classify numbers into odd and even, prime and composite.”
    Used for: Burton credits the Pythagoreans with being the first to sort numbers into prime and composite.
  10. 10.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.3, “Primes and Greatest Common Divisors” (4.3.2, “Primes”), Remark after Definition 1, p. 271 (the whole topic: pp. 271–273).
    “Remark: The integer 1 is not prime, because it has only one positive factor.”
    Used for: 1 is not prime, because it has only one factor.
  11. 11.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 2, “Divisibility Theory in the Integers”, section 2.3, “The Greatest Common Divisor”, p. 21 (the whole topic: pp. 20–21).
    “Now every integer divides zero”
    Used for: every whole number is a factor of 0.
  12. 12.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 3, “Primes and Their Distribution”, section 3.1, “The Fundamental Theorem of Arithmetic”, proof of Theorem 3.2, p. 41 (the whole topic: pp. 39–42).
    “Among all such integers d, choose p₁ to be the smallest (this is possible by the Well-Ordering Principle). Then p₁ must be a prime number.”
    Used for: the smallest factor greater than 1 of a number is prime; the lesson’s proof follows Burton’s argument.
  13. 13.
    Euclid, trans. T. L. Heath, ed. D. E. Joyce, “Euclid’s Elements, Book VII”, Clark University.
    “Any composite number is measured by some prime number.”
    Used for: Euclid, Elements VII.31: every composite number is divisible by a prime.
  14. 14.
    Michelle Manes, “Properties of Operations”, Mathematics for Elementary Teachers, University of Hawaiʻi (Pressbooks) (2018).
    “Multiplication distributes over addition.”
    Used for: the distributive property of multiplication over addition: p × (p + e) = p × p + p × e.
  15. 15.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.3, “Primes and Greatest Common Divisors” (4.3.3, “Trial Division”), Theorem 2, p. 272 (the whole topic: pp. 272–273).
    “If n is a composite integer, then n has a prime divisor less than or equal to √n.”
    Used for: a composite number n has a prime divisor at most the square root of n (here: a prime p with p × p ≤ n).
  16. 16.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.3, “Primes and Greatest Common Divisors” (4.3.3, “Trial Division”), p. 272 (the whole topic: pp. 272–273).
    “From Theorem 2, it follows that an integer is prime if it is not divisible by any prime less than or equal to its square root. This leads to the brute-force algorithm known as trial division.”
    Used for: the test for primes, and its name, trial division.
  17. 17.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “The Language of Algebra”, section 2.4, “Find Multiples and Factors” (“Identify Prime and Composite Numbers”), p. 148 (the whole topic: pp. 148–149).
    “To do this, we can test each of the smaller prime numbers in order to see if it is a factor of the number. If none of the prime numbers are factors, then that number is also prime.”
    Used for: the textbook procedure: test the primes in order to see whether each is a factor; if none is, the number is prime.
  18. 18.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 3, “Primes and Their Distribution”, section 3.2, “The Sieve of Eratosthenes”, p. 44 (the whole topic: pp. 44–45).
    “In testing the primality of a specific integer a > 1, it therefore suffices to divide a by those primes not exceeding”
    Used for: to test whether a number is prime it is enough to divide it by the primes up to its square root.
  19. 19.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “The Language of Algebra”, section 2.4, “Find Multiples and Factors” (“Identify Prime and Composite Numbers”), Example 2.47, p. 149 (the whole topic: pp. 148–149).
    “We will stop when the quotient is smaller than the divisor.”
    Used for: OpenStax stops the trial divisions when the quotient becomes smaller than the divisor.