
1 is not prime - tosh
https://en.wikipedia.org/wiki/Prime_number#Primality_of_one
======
OscarCunningham
There's an interesting way of looking at this, which is that a prime is a
number, p, such that when p divides into a product, it divides into one of the
factors of the product.

Then 1 divides into the empty product, but not into any of its factors.

------
MrBingley
Here's another question: should 0 be considered prime? The zero ideal is a
prime ideal, but 0 is certainly a different sort of number than the rest of
the primes.

~~~
gus_massa
When I first read this question it was grey, but it's a good question, perhaps
too technical for the most readers.

There are a few similar concepts

* irreducible elements: [https://en.wikipedia.org/wiki/Irreducible_element](https://en.wikipedia.org/wiki/Irreducible_element)

> _In abstract algebra, a non-zero non-unit element in an integral domain is
> said to be irreducible if it is not a product of two non-units._

* prime element: [https://en.wikipedia.org/wiki/Prime_element](https://en.wikipedia.org/wiki/Prime_element)

> _An element p of a commutative ring R is said to be prime if it is not zero
> or a unit and whenever p divides ab for some a and b in R, then p divides a
> or p divides b._

In the integers the definitions are equivalent, but in more general cases they
are different.

* prime ideal: [https://en.wikipedia.org/wiki/Prime_ideal](https://en.wikipedia.org/wiki/Prime_ideal)

> _An ideal P of a commutative ring R is prime if it has the following two
> properties: If a and b are two elements of R such that their product ab is
> an element of P, then a is in P or b is in P,_ [and] _P is not equal to R
> for the whole ring._

The prime ideals are a "generalization" of the prime numbers to more general
sets, that have elements that may not even look like numbers. It's a very
important idea in algebra, and it's not an straightforward generalization
because the elements in the new set may not have all the properties that the
number have. (More details in the links to Wikipedia an in any advance algebra
book.)

In particular in the integers if p is a prime then the set pZ={..., -3p, -2p,
-p, 0, p, 2p, 3p, ...} is a prime ideal.

Also in the integers, if p !=0 and pZ is a prime ideal, then p is a prime.

Therefore, in the integers there is an almost 1 to 1 relation between prime
elements and prime ideals. So

1) This is a "good" generalization

2) The number 0 is a nasty exception

So the question in the previous comment is "Why is it a good idea to make a
nasty exception for 0? Would it be better to redefine the primes numbers to
include 0?"

I personally would prefer a redefinition of the prime number to include 0, but
it is not the standard definition :( .

tl;dr: Please don't downvote the previous comment unless you know what is a
"prime ideal".

