Hacker News new | ask | show | jobs
by lurchedsawyer 2742 days ago
It's not, though. It's one group of mathematicians appropriating prime numbers and jack-booting them into their favourite theorem. There are valid reasons to treat 1 as a prime number, just as there are for defining 0^0 as 1 in some cases. Also for a fun pastime try asking an arithmetician to apply the fundamental theorem to 1 and watch them squirm.
2 comments

Presumably the arithmetician will answer that its factorization is the empty set. That's what sympy says, for example.

  >>> sympy.factorint(6)
  {2: 1, 3: 1}
  >>> sympy.factorint(1)
  {}
This definition is also sensible because it also preserves uniqueness in both directions. The empty set is the only prime factorization of 1, and 1 is the only natural number whose prime factorization is the empty set. (Wikipedia has a footnote that "Using the empty product rule one need not exclude the number 1 [from the fundamental theorem of arithmetic], and the theorem can be stated as: every positive integer has unique prime factorization.")

The fundamental theorem doesn't have to state that the prime factorization is nonempty.

It's true that some mathematicians have defined 1 as a prime number and there's nothing logically inconsistent about doing so, but it makes most theorems and formulas in number theory more complex and so this definition has fallen out of favor.

Edit: I think the Wikipedia article on the empty product gives some quite nice examples of the benefits of a closely related concept. https://en.wikipedia.org/wiki/Empty_product

> Presumably the arithmetician will answer that its factorization is the empty set.

Arithmetician (Ph.D. in number theory) here. This answer is completely correct.

As another reason why the factorization of 1 should be the empty set: suppose you have two positive integers m and n. Write S(m) and S(n) for their sets of prime divisors, counted with multiplicity.

Then S(mn) is the union of S(m) and S(n). We need S(1) to be the empty set to make this rule consistent.

Analogous to how log(1) is equal to 0.

It also is analogous to the fact that the sum of zero integers equals zero (a claim that, I guess, more laymen will find reasonable)

The analogy is a good one, as zero is the additive identity (https://en.wikipedia.org/wiki/Additive_identity) of the integers, and one is the multiplicative one (https://en.m.wikipedia.org/wiki/1#Mathematics)

See? Squirming. Somehow multiplying 0 factors is supposed to result in 1.

I'm not saying it's incorrect, but you have to explain that edge case away. At the same time allowing 1 to be prime would remove that problem given that e.g. 6 = 2^1 * 3 ^1 and 6 = 1^81 * 2^1 * 3^1 are the same unique factorisation because, well, monoids.

Edit: `s/fields/monoids`

How many prime factors does the product of two numbers have? Not the sum of the number of prime factors of the individual numbers.

Now you are the one squirming.

Cleanly accounting for edge cases isn't squirming, it's logical thinking.

Why would anyone "squirm"? You have an issue with multiplying 0 factors to obtain 1, but you don't have a problem with multiplying a number by itself 0 times to obtain 1?

What the sibling response to my own is correct. It's just the empty set.