Why are all non-prime numbers divisible by a prime number?

One can prove this for all integers greater than $1$ by induction: we know that $2$ is a prime. Now for ou inductive step assume that for all $i<n$, $i$ is either prime or divisible by a prime. Case 1: $n$ is prime; we're done. Case 2: $n$ is composite, so $ab = n$ for $a, b < n$. So each of those is divisible by a prime. We're done.

Essentially the same argument shows that all integers greater than $1$ can be written as a product of primes.


Lemma $\ $ The least factor $>1\,$ of $\ n>1\,$ is prime.

Proof $\ $$\,n>1$ has at least one factor $> 1,\,$ viz. $\,n.\,$ Let $\,p\,$ be its least factor $>1.\,$ Then $\,p\,$ is prime (else $\,p\,$ has a proper divisor $\,1 < d < p\,$ and $\,d\mid p\mid n\,\Rightarrow\,d\mid n,\,$ contra minimality of $\,p).$

Remark $\ $ More generally it proves prime the least element of any set $\,S\,$ of integers $> 1$ that is closed under divisors $> 1,\,$ i.e. $ $ if $\,S\,$ contains $\,n\,$ then $\,S\,$ contains every divisor $> 1$ of $\,n.\,$ Above the set $\,S\,$ is the set of factors $>1$ of $\,n.$

We can interpret the proof constructively as follows. Suppose we have an algorithm $\,n\mapsto f(n)\,$ that yields a proper factor of every nonprime $\,n > 1.\,$ Then iterating the algorithm must eventually terminate at a prime factor of $\,n,\,$ for otherwise it would yield an infinite strictly descending sequence of proper factors (see below), contra $\,\Bbb N\,$ is well-ordered

$$ n > f(n) > f(f(n)) > f(f(f(n))) >\, \cdots$$


You are in good company in your error. Some great mathematicians, including Dirichlet, have made the same mistake: falsely reporting that Euclid's proof was by contradiction.

Euclid's proof says that if you take any finite set of prime numbers (for example, $2$, $11$, and $19$) and multiply them and then add $1$, the resulting number is not divisible by any of the primes in the finite set you started with (thus $(2\cdot11\cdot19)+1$ is not divisible by $2$, $11$, or $19$ because its remainder on division by any of those numbers is $1$.

Therefore, the finite set you started with can be extended to a larger finite set: the prime factors of (in this example) $(2\cdot11\cdot19)+1$.)

The reason the number $(2\cdot11\cdot19)+1$ must be divisible by some prime is that if it is not divisible by any prime other than itself, then it is prime and it is of course divisible by itself.

PS: Some people commenting below are unhappy with my last paragraph above, so I'll add this: Let's do a proof by contradiction on this one: Consider the smallest number $N$ that is not divisible by any prime. It cannot be divisble by anything smaller than itself except $1$, since that not-necessarily-prime factor, being smaller than the smallest counterexample, would be divisible by some prime, and then $N$ would be divisible by that prime. So not being divisible by anything except itself and $1$, $N$ would be prime, and hence divisible by some prime, namely itself.