TITLE: Understanding Euclid's proof that the number of primes is infinite.
QUESTION [23 upvotes]: In Euclid's proof, if $p_1, p_2, \dots, p_n$ are the only primes then $p_1 \times p_2 \times \dots \times p_n + 1$ is not divisible by any of $p_1, p_2, \dots, p_n$ (because of some algebraic facts), which makes another prime and is a contradiction. 
The proof makes sense logically, and I tried some numerical examples to "feel" the proof better but...
$2 \times 3 \times 5\times 7\times 11\times 13+1$ is not a prime! $2 \times 3 \times 5\times 7\times 11\times 13 \times 17+1$ is also not prime! Why is the general case proof is not working for these examples?

REPLY [5 votes]: It depends on how you start. You can start with "assume that $p_1$ to $p_n$ are primes, and I will demonstrate that there is another prime". You take the product of $p_1$ to $p_n$, add 1, and get a number not divisible by any prime $p$ within $p_1$ to $p_n$, so that number is either a prime itself, or divisible by a prime other than those in the set $p_1$ to $p_n$, and in either case we have another prime. 
Or you can try a proof by contradiction. You start with "assume that $p_1$ to $p_n$ are all the primes. Then the product plus 1 is not divisible by any prime (because it is divisible by $p_1$ to $p_n$, which are all the primes) and therefore it is a prime. On the other hand, since $p_1$ to $p_n$ are all the primes it's even more obviously not a prime :-) So we get a contradiction. So the assumption "$p_1$ to $p_n$ are all the primes" is false.