Ma · Mathematics

How to Use Induction in a Proof About Prime Numbers

Published By the 9to5Science editorial team

At a glance

  1. 1. Choose a precise claim

    Induction applies to a statement indexed by every integer in a sequence, not just to the scattered prime numbers.

  2. 2. Check the base case

    For the prime-factorization theorem, start at 2, which is itself prime.

  3. 3. Assume earlier cases

    Use strong induction: assume the claim holds for every integer from 2 up to n.

  4. 4. Split composite numbers

    If n+1 is composite, write it as a product of two smaller integers and apply the induction hypothesis.

  5. 5. Finish the case

    If n+1 is prime, it is already a prime factorization with one factor.

The phrase “proof by induction with a prime number” does not specify a single theorem. One standard result that combines induction and primes is the existence part of the fundamental theorem of arithmetic: every integer greater than 1 can be written as a product of primes. The proof uses strong induction, because a composite number can be split into smaller integers.

This proves existence of a prime factorization; it does not by itself prove that the factorization is unique. It also illustrates an important point: induction is usually performed over consecutive integers, not over the prime numbers alone.

The statement to prove

For each integer n≥2n\ge 2, let P(n)P(n) be the statement:

nn is a product of one or more prime numbers.

A prime number counts as a product with just one factor. For example, 77 is the product consisting of the single prime 77.

We will prove P(n)P(n) for all integers n≥2n\ge 2 by strong induction.

Proof by strong induction

Base case: n=2n=2. The number 22 is prime, so it is already a product of primes. Thus P(2)P(2) holds.

Induction hypothesis. Fix an integer n≥2n\ge 2 and assume that P(k)P(k) holds for every integer kk with 2≤k≤n2\le k\le n. In other words, assume every integer from 22 through nn is a product of primes.

Induction step. Consider n+1n+1.

  • If n+1n+1 is prime, it is itself a product of primes, so P(n+1)P(n+1) holds.
  • If n+1n+1 is composite, then there are integers a,ba,b such that
n+1=ab,n+1=ab,

with 2≤a≤n2\le a\le n and 2≤b≤n2\le b\le n. The upper bounds follow because each factor is at least 22, so neither factor can equal or exceed n+1n+1. By the induction hypothesis, both aa and bb can be written as products of primes. Multiplying those two prime products gives a prime product equal to n+1n+1. Therefore P(n+1)P(n+1) holds.

In either case, P(n+1)P(n+1) follows from the induction hypothesis. Strong induction now gives P(n)P(n) for every integer n≥2n\ge 2.

Worked example: factoring 12 within the proof

The induction step does not require you to guess a prime factorization of n+1n+1 immediately. It is enough to split a composite number into smaller factors.

For 1212, write

12=3⋅4.12=3\cdot 4.

Both factors are smaller than 1212 and at least 22. The induction hypothesis says that each has a prime factorization: 33 is prime, and 4=2⋅24=2\cdot2. Combining them gives

12=3⋅2⋅2.12=3\cdot2\cdot2.

All the factors are prime, as required. The argument works for any composite n+1n+1: its factors are smaller, so the induction hypothesis covers them.

Why strong induction is useful here

Ordinary induction assumes only that P(n)P(n) is true when proving P(n+1)P(n+1). That is not enough for the factorization argument: a factor of n+1n+1 might be much smaller than nn, rather than equal to nn. Strong induction lets you use the claim for every smaller integer, which is exactly what the proof needs.

You can also formulate this with ordinary induction by proving a stronger statement or by adjusting the induction step, but strong induction is the direct and clearest method.

Common mistakes

  • Inducting only over primes. Prime numbers are not consecutive: for instance, the prime after 33 is 55. A usual induction step from one prime to the “next prime” does not automatically cover composite integers in between. If your claim concerns only primes, it may need a different argument or an induction parameter that ranges over all integers.
  • Assuming every number is prime. The induction step must handle both cases. If n+1n+1 is prime, use it as a one-factor product; if it is composite, split it into smaller factors.
  • Using the hypothesis outside its range. In the composite case, verify that each factor lies between 22 and nn. This is what makes the induction hypothesis applicable.
  • Claiming uniqueness from this proof. The argument shows that a prime factorization exists. To show it is unique up to rearranging the factors, one also needs a result such as Euclid’s lemma: if a prime divides a product, it divides at least one factor.

If the intended claim involves a particular prime—for example, a divisibility statement about powers or factorials—the exact statement matters. Induction may be useful, but the base case and induction step depend on what is being proved.

References

  1. An Introduction to the Theory of Numbers, Ivan Niven, Herbert S. Zuckerman, and Hugh L. Montgomery

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.