Live data from Hacker News

Is 1 Prime, and Does It Matter?

mathenchant.wordpress.com

31–40 of 162 posts

Re: Is 1 Prime, and Does It Matter?

#32

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

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 ∅.

Re: Is 1 Prime, and Does It Matter?

#33

This is like a "do arrays start at 0 or 1" question, except as they mention, algebraic number theory pretty much settles it. Whether 0 is a natural number though is still open for bikeshedding.

I always thought that 0-based indexes were superior until few years ago I needed to deal with Fortran code and I realized that 1-based arrays allowed to use 0 as a non-existing index or sentinel, not size_t(-1) hack as found in C/C++. Like the article explains, depending on the domain one or the other convention can be advantageous.

And then C/C++ compilers are subtly inconsistent. If 0 is valid index, then null should correspond to uintptr_t(-1), not 0 address. That lead to non-trivial complication in OS implementations to make sure that the address 0 is not mapped as from hardware point of view 0 is absolutely normal address.

Re: Is 1 Prime, and Does It Matter?

#34
Another very interesting article on the primality of 1 is Evelyn Lamb's _Why isn't 1 a prime number?_ (https://www.scientificamerican.com/blog/roots-of-unity/why-i...)

A slightly facetious answer might be that this is the wrong question to ask, and the right question is: when did 1 stop being a prime number? To which the answer is: some time between 1933 (when the 6th edition of Hardy's _A course in pure mathematics_ was published) and 1938 (when the 7th edition was published).

Re: Is 1 Prime, and Does It Matter?

#36
post #20
post #3

One reason that 1 is often excluded from the prime numbers is that if it was included, it would complicate the theorems, proofs, and exposition by the endless repetition of "not equal to 1".

> One reason that 1 is often excluded from the prime numbers is that if it was included, it would complicate the theorems, proofs, and exposition by the endless repetition of "not equal to 1". This is true and compelling as things developed, but I think it's an explanation of where history brought us, rather than a logical inevitability. For example, I can easily imagine, in a different universe, teachers patiently e…

Many (most?) results are easier to write if you allow the empty set. For example:

"The intersection of two sets is a set."

Re: Is 1 Prime, and Does It Matter?

#38
post #27

Earlier quoted context omitted.

Yes, it's more of a convention where we assume language like "...ignoring the trivial case of 1 being an obvious factor of every integer." It's not interesting or meaningful, so we ignore it for most cases.

I'm no expert but: "...ignoring the trivial case of 1 being an obvious factor of every integer." I remember quite a big chunk of GEB formally defining how integers are really not trivial! The main problem seems to be is that you soon end up with circular reasoning if you are not razor sharp with your definitions. That's just in an explainer book 8) Then you have to define what factor means ...

Correct, it's impossible to specifically and formally define the natural numbers so that addition and multiplication work. Any definition of the natural numbers will also define things that look very similar to natural numbers but are not actually natural numbers.

Re: Is 1 Prime, and Does It Matter?

#39
All models are wrong, but some models are useful. It's not useful to consider 1 prime, so we don't. You're free to invent a new model of math where 1 is prime and see where it takes you; nobody will be offended. This happens all the time: "but what if we could take the square root of a negative number? What then?", etc. 99% of the time, this leads to a theory that is provably inconsistent and therefore useless. Out of the remaining 1%, about 99% of the time it leads to a mathematics that is simply less useful than what we have now. So it goes with making 1 prime. Out of the remaining cases, about 99% of those turn out to be identical to an already existing mathematical theory, which is interesting (and possibly publishable), but not hugely useful. But about 1% of 1% of 1% of the time, these exercises result in actual new math that can tell us new things about reality and solve problems we couldn't solve before.

This is not one of those times.

Re: Is 1 Prime, and Does It Matter?

#40
post #3

One reason that 1 is often excluded from the prime numbers is that if it was included, it would complicate the theorems, proofs, and exposition by the endless repetition of "not equal to 1".

And the reason we'd have to constantly exclude 1 is that it behaves in a qualitatively different way than prime numbers—and understand what this means and why that's the case is the real insight here.
Post reply on HN