Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If 1 is prime, then the fundamental theorem of arithmetic goes from "every positive integer can be written as a product* of primes in one and only one way" to "every positive integer can be written as a product of primes greater than 1 in one and only one way". Doesn't quite have the same ring to it. So just from an aesthetic perspective, no I'd rather 1 isn't a prime number.

* empty products being 1 of course



Not just that one; practically every useful theorem about primes would have to be rewritten to "if p is a prime other than 1".


That is the first time I thought of 1 as being the product of []

Thay is enough justification for me of 1 not being prime. It has a factorisation!


It seems a little inconvenient to require acceptance that empty products equal 1, since that is also slightly subtle and deserving of its own explanation of mathematical terminology.

Of course, I generally hear the fundamental theorem of arithmetic phrased as “every integer greater than one…” which is making its own little special case for the number 1.


>It seems a little inconvenient to require acceptance that empty products equal 1

Only the contrary: it is extremely inconvenient to not allow the product of an empty sequence of numbers to equal 1. The sum of an empty sequence is 0. The Baz of an empty sequence of numbers, for any monoid Baz, is the identity element of that monoid. Any other convention is going to be very painful and full of its own exceptions.

There are no exceptions to any rules here. 1 is not prime. Every positive integer can be expressed as the unique product of powers of primes. 1's expression is [], or 0000..., or ∅.


That’s not what I meant. I agree that the empty product being equal to 1 is reasonable.

I meant that it’s inconvenient to require engaging with that concept directly in the everyday definition of prime numbers.


Any convention comes with the inconvenience of definition and explanation. So to call the convention that the empty product equals 1 based on that alone seems a bit unfair. The reason the mathematical community has adopted this convention is because it makes a lot of proofs and theorems a bit easier to state. So yes, you lose a bit of convenience in one spot, and gain a bit in a whole bunch of spots.

And note that this convention is not at all required for the point I'm making regarding prime numbers. As you say yourself, restrict the theorem to integers greater than 1, and you can forget about empty products (and it is still easier to state if 1 is not prime (which it isn't)).


Isn't "every positive integer can be written as a product of primes greater than 1 in one and only one way" incorrect? A prime number is a only product of itself * 1, isn't it?


Mathematicians generally feel that a single number qualifies as a "product of 1 number." So 7 can be written as just 7 which is still considered a product of prime(s). This is purely a convention thing to make it so theorems can be stated more succinctly, as with not counting 1 as prime.


Ah, OK, thank you.


1 is not greater than 1, and a product of one prime is still a product of primes


Yeah, I didn't understand you can have a product of a single number.


Empty product and also 0! (Which is extra unintuitive because 0 isn’t empty ie the products of 0 are 0)


i remember something from math class about "1" and "prime" being special cases of "units" and "irreducible" (?) that made me think these kinds of definitions are much more complicated than we want them to be regardless.


The first part of your comment is completely correct. The latter is a matter of taste, of course. I think the main thing that can be said for a lot of the definitions we have in algebra is that the ones we're using are the ones that stood the test of time because they turned out to be useful. The distinction between invertible elements (units) and irreducible elements, while complicated, also gave us a conceptual framework allowing us to prove lots of interesting and useful theorems.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: