evan's notes
cal 3discreteodeenv systems
中文

On this page

  • Strong induction
  • Divisibility
  • Three basic divisibility properties
  • Multiplying a divisible number
  • Adding or subtracting divisible numbers
  • Transitivity
  • Prime and composite integers
  • Every integer at least two has a prime divisor
  • Goldbach's conjecture
  • Euclid's theorem: there are infinitely many primes
  • Prime gaps
  • The Prime Number Theorem

Discrete Structures

§10 Strong Induction, Divisibility, and Primes

Evan Luo · Oct 15, 2026

Discrete Structures

§10 Strong Induction, Divisibility, and Primes

Evan Luo4 days ago

6 min read

Strong induction lets the current case use every earlier case, not just the one immediately before it. That extra reach is useful when an integer breaks into factors of unpredictable sizes.

Strong induction

Let P(n)P(n)P(n) be defined for every integer n≥n0n\ge n_0n≥n0​. A proof by strong induction has two parts:

  1. prove the base case P(n0)P(n_0)P(n0​);
  2. for an arbitrary n>n0n>n_0n>n0​, assume P(k)P(k)P(k) for every integer kkk with n0≤k<nn_0\le k<nn0​≤k<n, then prove P(n)P(n)P(n).

The strong induction hypothesis is

P(n0)∧P(n0+1)∧⋯∧P(n−1).P(n_0)\land P(n_0+1)\land\cdots\land P(n-1). P(n0​)∧P(n0​+1)∧⋯∧P(n−1).

The first few links look like

P(n0)⇒P(n0+1),P(n0)∧P(n0+1)⇒P(n0+2),P(n0)∧P(n0+1)∧P(n0+2)⇒P(n0+3).\begin{aligned} P(n_0)&\Rightarrow P(n_0+1),\\ P(n_0)\land P(n_0+1)&\Rightarrow P(n_0+2),\\ P(n_0)\land P(n_0+1)\land P(n_0+2)&\Rightarrow P(n_0+3). \end{aligned} P(n0​)P(n0​)∧P(n0​+1)P(n0​)∧P(n0​+1)∧P(n0​+2)​⇒P(n0​+1),⇒P(n0​+2),⇒P(n0​+3).​

“All earlier cases” means earlier cases inside the theorem's stated domain. It does not include P(n)P(n)P(n) itself. Ordinary and strong induction prove the same kinds of natural-number statements, but strong induction can make a proof much more direct.

Divisibility

For integers aaa and bbb, we say that aaa divides bbb, written a∣ba\mid ba∣b, when bbb is an integer multiple of aaa:

a∣b  ⟺  ∃k∈Z such that b=ak.\boxed{a\mid b\iff \exists k\in\mathbb Z\text{ such that }b=ak.} a∣b⟺∃k∈Z such that b=ak.​

The expression a∣ba\mid ba∣b is a proposition: it is true or false. It is not a fraction. When a≠0a\ne0a=0, a quotient gives an equivalent test:

a∣b  ⟺  ba∈Z.a\mid b\iff \frac ba\in\mathbb Z. a∣b⟺ab​∈Z.

The condition a≠0a\ne0a=0 matters because division by zero is undefined, while the original definition still handles zero.

Examples include

3∣42,6∣42,−7∣42,5∤42,3\mid42, \qquad6\mid42, \qquad-7\mid42, \qquad5\nmid42, 3∣42,6∣42,−7∣42,5∤42,

because 42=3(14)=6(7)=(−7)(−6)42=3(14)=6(7)=(-7)(-6)42=3(14)=6(7)=(−7)(−6), while no integer multiplied by 555 equals 424242.

For every integer xxx,

x∣x,x∣0,0∣x  ⟺  x=0.x\mid x, \qquad x\mid0, \qquad0\mid x\iff x=0. x∣x,x∣0,0∣x⟺x=0.

Indeed, x=x(1)x=x(1)x=x(1) and 0=x(0)0=x(0)0=x(0). If 0∣x0\mid x0∣x, then x=0k=0x=0k=0x=0k=0 for some integer kkk. Conversely, 0=0k0=0k0=0k for every integer kkk, so 0∣00\mid00∣0.

Three basic divisibility properties

Let a,b,c∈Za,b,c\in\mathbb Za,b,c∈Z. Each property follows directly from the definition.

Multiplying a divisible number

If a∣ba\mid ba∣b, write b=arb=arb=ar for some r∈Zr\in\mathbb Zr∈Z. Then

bc=(ar)c=a(rc).bc=(ar)c=a(rc). bc=(ar)c=a(rc).

Since rc∈Zrc\in\mathbb Zrc∈Z, we have

a∣b⟹a∣bc.a\mid b\quad\Longrightarrow\quad a\mid bc. a∣b⟹a∣bc.

Adding or subtracting divisible numbers

If a∣ba\mid ba∣b and a∣ca\mid ca∣c, write b=arb=arb=ar and c=asc=asc=as for integers r,sr,sr,s. Then

b±c=ar±as=a(r±s).b\pm c=ar\pm as=a(r\pm s). b±c=ar±as=a(r±s).

Since r±s∈Zr\pm s\in\mathbb Zr±s∈Z,

a∣b and a∣c⟹a∣(b+c) and a∣(b−c).a\mid b\text{ and }a\mid c \quad\Longrightarrow\quad a\mid(b+c)\text{ and }a\mid(b-c). a∣b and a∣c⟹a∣(b+c) and a∣(b−c).

Transitivity

If a∣ba\mid ba∣b and b∣cb\mid cb∣c, write b=arb=arb=ar and c=bsc=bsc=bs. Then

c=bs=(ar)s=a(rs).c=bs=(ar)s=a(rs). c=bs=(ar)s=a(rs).

Therefore

a∣b and b∣c⟹a∣c.a\mid b\text{ and }b\mid c \quad\Longrightarrow\quad a\mid c. a∣b and b∣c⟹a∣c.

None of these proofs requires aaa, bbb, or ccc to be nonzero.

Prime and composite integers

An integer p≥2p\ge2p≥2 is prime when its only positive divisors are 111 and ppp. The first primes are

2,3,5,7,11,13,17,19,23,….2,3,5,7,11,13,17,19,23,\ldots. 2,3,5,7,11,13,17,19,23,….

An integer n≥2n\ge2n≥2 that is not prime is composite. Equivalently, it has a factorization

n=abwith2≤a,b<n.n=ab \qquad\text{with}\qquad 2\le a,b<n. n=abwith2≤a,b<n.

The integers 000 and 111 are neither prime nor composite.

Every integer at least two has a prime divisor

We prove by strong induction that every integer n≥2n\ge2n≥2 has a prime divisor.

Base case. Since 2=2⋅12=2\cdot12=2⋅1 and 222 is prime, the claim holds at n=2n=2n=2.

Strong induction hypothesis. Let n>2n>2n>2 and assume every integer kkk with 2≤k<n2\le k<n2≤k<n has a prime divisor.

There are two cases.

  • If nnn is prime, then n=n⋅1n=n\cdot1n=n⋅1, so nnn itself is a prime divisor.

  • If nnn is composite, write n=abn=abn=ab with 2≤a,b<n2\le a,b<n2≤a,b<n. The induction hypothesis applies to aaa, so a=pra=pra=pr for some prime ppp and integer rrr. Therefore

    n=ab=(pr)b=p(rb).n=ab=(pr)b=p(rb). n=ab=(pr)b=p(rb).

    Since rb∈Zrb\in\mathbb Zrb∈Z, the prime ppp divides nnn.

Both cases establish the claim for nnn. Thus every integer n≥2n\ge2n≥2 has a prime divisor.

This is not yet the Fundamental Theorem of Arithmetic. Unique prime factorization is later material.

Goldbach's conjecture

A conjecture is a statement believed to be true but not yet proved. Goldbach's conjecture says:

Every even integer greater than 222 is the sum of two primes.

For example,

42=19+23.42=19+23. 42=19+23.

Examples support the pattern but do not prove it. Goldbach's conjecture remains open.

Euclid's theorem: there are infinitely many primes

Suppose, for contradiction, that all primes form a finite list

p1,p2,…,pk.p_1,p_2,\ldots,p_k. p1​,p2​,…,pk​.

Define

N=p1p2⋯pk+1.N=p_1p_2\cdots p_k+1. N=p1​p2​⋯pk​+1.

The integer NNN is greater than 111, so it is prime or composite.

Case 1: NNN is prime. It is larger than every pip_ipi​, so it is a prime missing from the supposedly complete list. This is a contradiction.

Case 2: NNN is composite. By the prime-divisor theorem, some prime ppp divides NNN. Since the list supposedly contains every prime, p=pip=p_ip=pi​ for some iii, and therefore

p∣p1p2⋯pk.p\mid p_1p_2\cdots p_k. p∣p1​p2​⋯pk​.

We also have p∣Np\mid Np∣N. The difference property gives

p∣(N−p1p2⋯pk),p\mid\left(N-p_1p_2\cdots p_k\right), p∣(N−p1​p2​⋯pk​),

so p∣1p\mid1p∣1. But a prime is at least 222 and cannot divide 111. This is another contradiction.

Both cases contradict the assumption, so there are infinitely many primes. The proof does not claim that p1p2⋯pk+1p_1p_2\cdots p_k+1p1​p2​⋯pk​+1 is always prime; if it is composite, one of its prime divisors is enough.

Prime gaps

Prime numbers are not evenly spaced.

Two primes whose difference is 222 are twin primes, such as

(3,5),(11,13),(4241,4243).(3,5), \qquad(11,13), \qquad(4241,4243). (3,5),(11,13),(4241,4243).

The Twin Prime Conjecture says that infinitely many twin-prime pairs exist. It remains open.

In the other direction, gaps between consecutive primes can be arbitrarily large.

For every natural number nnn, there are consecutive primes p<qp<qp<q such that q−p≥nq-p\ge nq−p≥n.

For n≥2n\ge2n≥2, consider the n−1n-1n−1 consecutive integers

n!+2,n!+3,…,n!+n.n!+2,n!+3,\ldots,n!+n. n!+2,n!+3,…,n!+n.

For each k=2,3,…,nk=2,3,\ldots,nk=2,3,…,n, the integer kkk divides both n!n!n! and kkk, so

k∣(n!+k).k\mid(n!+k). k∣(n!+k).

Also 1<k<n!+k1<k<n!+k1<k<n!+k, so this divisor is nontrivial. Every number in the block is therefore composite.

Let ppp be the greatest prime below the block and qqq the least prime above it. Such a qqq exists because Euclid's theorem makes the primes unbounded. No prime lies between ppp and qqq, so they are consecutive. Moreover,

p≤n!+1,q≥n!+n+1,p\le n!+1, \qquad q\ge n!+n+1, p≤n!+1,q≥n!+n+1,

and hence

q−p≥(n!+n+1)−(n!+1)=n.q-p\ge(n!+n+1)-(n!+1)=n. q−p≥(n!+n+1)−(n!+1)=n.

For n=0n=0n=0 or n=1n=1n=1, the consecutive primes 222 and 333 already work.

The Prime Number Theorem

Define the prime-counting function

π(n)=#{p≤n∣p is prime}.\pi(n)=\#\{p\le n\mid p\text{ is prime}\}. π(n)=#{p≤n∣p is prime}.

The Prime Number Theorem describes its long-run growth:

π(n)∼nln⁡n.\boxed{\pi(n)\sim\frac{n}{\ln n}}. π(n)∼lnnn​​.

The symbol ∼\sim∼ means that the ratio tends to 111:

lim⁡n→∞π(n)n/ln⁡n=1.\lim_{n\to\infty} \frac{\pi(n)}{n/\ln n}=1. n→∞lim​n/lnnπ(n)​=1.

This is an asymptotic approximation, not an exact equality. The theorem is proved mathematics, but its proof is beyond the scope of this course.

Source: https://notes.ohevan.com/notes/discrete-structures/10-strong-induction-divisibility-and-primes

© 2026 Evan Luo. All rights reserved.

Back to Discrete Structures

0 reads

·Last edited Today
  • newsletter

  • about me

  • sponsor

© 2026 Evan Luo. All rights reserved.