Hacker News new | ask | show | jobs
by animeshk 3130 days ago
I'm trying to look for the inequivalence you pointed at. The two definitions written are-

1.A prime number is a natural number that has no positive divisors other than 1 and itself.

2. A prime number is a number that has exactly two factors - 1 and itself.

Both statements clearly seem to be accounting for 1. Am I missing something here?

3 comments

"Itself" might be 1 in the first definition. The "exactly two" in the second definition is what makes the definitions different.

I'm not able to read the article because of a 503 timeout, so I can't see this in context, so the following might be irrelevant or off the mark (sorry).

A more interesting/usual pair of definitions is

1. A non-unit p is prime if whenever p divides ab then p divides a or p divides b.

2. A nonzero number n is composite if there are non-units a and b such that n = ab.

Then there is a short proof that, for nonzero non-units, being prime is equivalent to not being composite. (A unit is a number with a reciprocal in the number system. For the integers, that would be 1 and -1.)

The two definitions capture different (but equivalent) parts of the atomic nature of primes.

Elsewhere in mathematics, there are the concepts of irreducibility (whether an object has a subobject) and indecomposibility (whether an object splits into subobjects), where in general irreducible things are indecomposible. Basically, the fact that long division works implies that indecomposible numbers are irreducible and that irreducible factors don't straddle the decompositions.

Definition 1 says that 1 is a prime (it has no positive divisors except 1 and itself (1)).

Definition 2 says that 1 is not a prime: it does not have exactly two factors, but just one.

Okay.. so 1 should neither be prime nor composite. Because - a) 1 cannot be written as a product of two different factors : ruling out 1 to be composite b) 1 has only 1 positive divisor : ruling it out to be prime

That's indeed a special case which can be mentioned in the article.

I would simply not define "prime" or "composite" for 1, yes. If you check abstract algebra books (or wikipedia [1]), you'll usually find definitions along the lines of "a non-invertible, non-zero element is prime if and only if ...", and the nice thing about this definition is that it is a useful concept in more general structures than just natural numbers, namely (semi)rings.

[1](https://en.wikipedia.org/wiki/Prime_element)

If in (2) “itself” is 1 then you are listing the same thing twice—that shouldn’t count as two factors.