News for hackers. Stuff that matters.
Re:Why isn't 1 a prime number? by gabrielblack on Sunday April 28, 2019 @10:37AM (#19771318)
Bad example, if 1 isn't prime, 2 x 1 isn't a product of prime, so not all the number can be written as product of primes. My point is that you can't write an introductory article, supposed to be understandable to the masses, using a form able to confuse further the readers. A student, reading this, I don't think will understand this explanation that seems contradictory.

"My mathematical training taught me that the good reason for 1 not being considered prime is the fundamental theorem of arithmetic, which states that every number can be written as a product of primes in exactly one way. If 1 were prime, we would lose that uniqueness. We could write 2 as 1×2, or 1×1×2, or 1594827×2. Excluding 1 from the primes smooths that out."

Re:Why isn't 1 a prime number? by zamadatix on Sunday April 28, 2019 @10:55AM (#19771411)
It's a good example just a poor rendition of the definition of the fundamental theorem of arithmetic. The proper definition includes "either prime or the product of primes". Many mathematical texts shorten this to "the product of one or more primes" which doesn't make much sense to me but if you take it as acceptable to use "product" with a single number then some shorten it even further to "the product of primes" (primes now representing "prime numbers" not "multiple primes") resulting in what you see in many places/this article.
Re:Why isn't 1 a prime number? by Certhas on Sunday April 28, 2019 @01:55PM (#19772544)
It does make sense in a mathematical context though. You might write something like

p_S = \prod_{x \in S} x

And then later find out that the set S contains one element. Or it might even be the empty set in which case you'd interpret the above as equal to 1. This makes it work that

p_{S union S'} = p_S p_S'

in all cases.

Re:Why isn't 1 a prime number? by rocqua on Sunday April 28, 2019 @04:33PM (#19773514)
You either need a disjoint union there (or equivalently multi-sets) or the assumption that S and S' are disjoint.
Re:Why isn't 1 a prime number? by kdmccormick on Sunday April 28, 2019 @10:55AM (#19771407)
All positive integers can be written as a product of primes, where a product is a sequence of numbers that are multiplied together. In the case of a composite number like 45, the primes are (3,3,5).

When the sequence has one element, then that element is the product. So, 2 is the product of (2).

When the sequence is empty, the product is 1.

Re:Why isn't 1 a prime number? by mintplant on Sunday April 28, 2019 @03:58PM (#19773313)
Furthermore, the ordered sequence of primes that multiply to any given positive integer is unique. If 1 were considered prime, that wouldn't hold, as you could keep adding as many 1s as you like to the start of the sequence: (1,3,3,5), (1,1,3,3,5), etc. Thus 1 encodes no useful information here.
Re:Why isn't 1 a prime number? by theoh on Sunday April 28, 2019 @01:33PM (#19772402)
This is explained more formally here: https://en.wikipedia.org/wiki/Empty_product
Re:Why isn't 1 a prime number? by skoskie on Sunday April 28, 2019 @03:44PM (#19773238)
As a total layman, I think this is my favorite definition so far.
Re:Why isn't 1 a prime number? by SkyBelow on Sunday April 28, 2019 @12:00PM (#19771821)
I think the best way it was explained to me was say that both exist as sets of numbers, which for now we will call Set_1 and Set_2.

Set_1 includes 1, Set_2 does not.

We have two possibilities for naming.

Option A: Set_1: Primes. Set_2: Primes except for 1.

Option B: Set_1: Primes and 1. Set_2: Primes.

You can then show the differences in the properties that make having Set_2 have the default name an easier to use convention than letting Set_1 have the default name. But at the core is the understanding that this is an arbitrary distinction done just for ease of use. Had we called Set_1 the Primes, or if ever someone became Galactic Emperor for a day and made the change, then Set_2 would get a new name for ease of use and we would just use it instead.

There are many other sets that are really close as well, which have their own properties.

Side note, SET_1 is listed on oeis https://oeis.org/A008578 and still includes 1. It is called "Prime numbers at the beginning of the 20th century".

Re:Why isn't 1 a prime number? by detaro on Sunday April 28, 2019 @10:58AM (#19771426)
Sloppy wording, yes, bad example, not really. "just" requires you to consider "2" to be the product of all numbers in the multiset {2}. Let "product of primes" mean "product of one or more primes" and it works.
Re:Why isn't 1 a prime number? by maire on Sunday April 28, 2019 @11:52AM (#19771750)
I thought the unique product of primes argument was great!

I assume most people on this list are engineers. They have college level math but not necessarily number theory. Number theory requires a similar thinking to the problems we solve in all the time in engineering fields.

I just explained the unique product of primes argument to my mechanical engineering husband. He got it right away and also thought it was awesome!

Re:Why isn't 1 a prime number? by amluto on Sunday April 28, 2019 @10:56AM (#19771412)
Surely “product of primes” means “product of one or more primes”.
Re:Why isn't 1 a prime number? by iamdead on Sunday April 28, 2019 @02:02PM (#19772593)
Product of zero or more primes. Otherwise you cannot factor 1.
Re:Why isn't 1 a prime number? by globuous on Sunday April 28, 2019 @11:25AM (#19771592)
Yeah, but it also says "in a unique way" and 1 breaks that since it sends any other number to itself under multiplication. So maybe a prime number also has the property that it sends any other number not to itself when multiplied by ? maybe that's already in it ?