News for hackers. Stuff that matters.
Re:Do we have negative prime numbers? by FartyMcFarter on Saturday January 16, 2021 @11:25AM (#25803232)
I think the TLDR is:

We could but it's inconvenient, so we don't usually allow that.

Specifically, allowing negative numbers (or the number 1) to be primes screws up the fact that every natural number otherwise has a unique factorization.

Re:Do we have negative prime numbers? by pmiller2 on Saturday January 16, 2021 @11:36AM (#25803315)
Not really. Unique factorization is defined up to units, so, factors of +-1 don't matter. 1 is not a prime because it's a unit, and the ideal it generates is trivial; it's the entire ring, so, for Z, it's all of Z.
Re:Do we have negative prime numbers? by FartyMcFarter on Saturday January 16, 2021 @11:43AM (#25803365)
The fundamental theorem of arithmetic doesn't say anything about units though:

https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithme...

> every integer greater than 1 either is a prime number itself or can be represented as the product of prime numbers and that, moreover, this representation is unique, up to (except for) the order of the factors.

Re:Do we have negative prime numbers? by ogogmad on Saturday January 16, 2021 @11:44AM (#25803372)
Look up the definition of a Unique Factorisation Domain and a prime element of a ring. The theorem that the integers form a UFD necessarily takes into account negative primes.

[Edit] Here: https://en.wikipedia.org/wiki/Unique_factorization_domain

Re:Do we have negative prime numbers? by ogogmad on Saturday January 16, 2021 @11:30AM (#25803265)
Allowing 1 to be prime is a lot worse. The integers modulo 1 don't form a field, but modulo a negative prime they do. I think algebraists do generally consider negative primes to be primes.
Re:Do we have negative prime numbers? by pmiller2 on Saturday January 16, 2021 @12:10PM (#25803551)
It's even worse than that. Because integers a and b are congruent modulo n iff n | a - b, and 1 divides every integer, the integers modulo 1 has only 1 element. This gives you the somewhat pathological object called the zero ring: https://en.wikipedia.org/wiki/Zero_ring