Skip to content(if available)orjump to list(if available)

Is 1 Prime, and Does It Matter?

Is 1 Prime, and Does It Matter?

106 comments

·April 21, 2025

JJMcJ

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

jordigh

To be fair, 2 is also a very odd prime because it's even.

So many theorems have to say, "for every odd prime..."

https://math.stackexchange.com/questions/1177104/what-is-an-...

kordlessagain

The concept of “one” holds a dual role. It represents a countable unit: something you can put in a bowl and also stands for indivisibility itself. When you divide any quantity by an indivisible unit, you’re simply counting how many of those indivisibles fit within it. Then comes 2: the first number that is divisible, but only by itself and the indivisible one. That’s what makes it prime. A prime is a number divisible only by itself and by 1, the indivisible origin of all counting.

aleph_minus_one

> Then comes 2: the first number that is divisible, but only by itself and the indivisible one.

This does hold in the ring Z. In the ring Z[i], 2 = (1+i)*(1-i), and the two factors are prime elements.

brennopost

It's actually the least odd prime

chrismcb

It isn't odd at all! And that I'm being pendantic. But you can't say it is very odd, and then I'm the next sentence day "for every odd prime..."

bluepnume

It's hardly odd.

"Even" just means "divisible by 2"

"2 is the only prime that is divisible by 2" "3 is the only prime that is divisible by 3" "5 is the only prime that is divisible by 5"

...

"N is the only prime that is divisible by N"

arcastroe

"2 is the only even prime number. Therefore, it's the oddest of them all!"

tikhonj

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.

reaperman

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.

gerdesj

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

Maxatar

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.

JadeNB

> 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 explaining that we declare that the empty set is not a set, to avoid complicating theorems, proofs, and exposition by the endless repetition of "non-empty set."

(I agree that this is different, because there's no interesting "unique factorization theorem" for sets, but I can still imagine things developing this way. And, indeed, there are complications caused by allowing the empty set in a model of a structure, and someone determined to do so can make themselves pointlessly unpopular by asking "but have you considered the empty manifold?" and similar questions. See also https://mathoverflow.net/questions/45951/interesting-example....)

murderfs

A good example of this is the natural numbers. Algebraists usually consider zero to be a natural number because otherwise, it's not a monoid and set theorists want zero because it's the size of the empty set. My number theory textbook defined natural numbers as positive integers, but I'm not entirely sure why.

mathgeek

> My number theory textbook defined natural numbers as positive integers, but I'm not entirely sure why.

Since both the inclusion and exclusion of zero are accepted definitions depending on who’s asking, books usually just pick one or define two sets (commonly denoted as N_0 and N_1). Different topics benefit from using one set over the other, as well as having to deal with division by zero, etc. Number theory tends to exclude zero.

tux3

That's an interesting thought, but I think that'd break the usual trick of building up objects from the empty set, a set containing the empty set, then the set containing both of those and so forth.

That universe would be deprived from the bottomless wellspring of dryness that is the set theoretic foundations of mathematics. Unthinkable!

JadeNB

> That universe would be deprived from the bottomless wellspring of dryness that is the set theoretic foundations of mathematics. Unthinkable!

"Wellspring of dryness" is quite a metaphor, and I take it from that metaphor that this outcome wouldn't much bother you. I'll put in a personal defense for set theory, but only an appeal to my personal taste, since I have no expert, and barely even an amateurish, knowledge of set theory beyond the elementary; but I'll also acknowledge that set-theoretic foundations are not to everyone's taste, and that someone who has an alternate foundational system that appeals to them is doing no harm to themselves or to me.

> That's an interesting thought, but I think that'd break the usual trick of building up objects from the empty set, a set containing the empty set, then the set containing both of those and so forth.

In this alternate universe, the ZF or ZFC axioms (where C becomes, of course, "the product of sets is a set") would certainly involve, not the axiom of the empty set, but rather some sort of "axioms of sets", declaring that there exists a set. Because it's not empty, this set has at least one element, which we may extract and use to make a one-element set. Now observe that all one-element sets are set-theoretically the same, and so may indifferently be denoted by *; and then charge ahead with the construction, using not Ø, Ø ∪ {Ø}, Ø ∪ {Ø} ∪ {Ø ∪ {Ø}}, etc. but *, * ∪ {*}, * ∪ {*} ∪ {* ∪ {*}}, etc. Then all that would be left would be to decide whether our natural numbers started at the cardinality 1 of *, or if we wanted natural numbers to count quantities 1 less than the cardinality of a set.

gus_massa

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

"The intersection of two sets is a set."

JadeNB

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

> "The intersection of two sets is a set."

Many results in set theory, yes! (Or at least in elementary set theory. I'm not a set theorist by profession, so I can't speak to how often it arises in research-level set theory.) But, once one leaves set theory, the empty set can cause problems. For the first example that springs to mind, it is a cute result that, if a set S has a binary operation * such that, for every pair of elements a, b in S, there is a unique solution x to a*x = b, and a unique solution y to y*a = b, then * makes S a group ... unless S is empty!

In fact, on second thought, even in set theory, there are things like: the definition of a partial order being a well ordering would become simpler to state if the empty set were disallowed; and the axiom of choice would become just the statement that the product of sets is a set! I'm sure that I could come up with more examples where allowing empty sets complicates things, just as you could come up with more examples where it simplifies them. That there is no unambiguous answer one direction or the other is why I believe this alternate universe could exist, but we're not in it!

wesselbindt

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

apetresc

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

tshaddox

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.

feoren

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

tshaddox

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.

wesselbindt

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

SketchySeaBeast

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?

jdoliner

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.

SketchySeaBeast

Ah, OK, thank you.

wesselbindt

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

SketchySeaBeast

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

laweijfmvo

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.

wesselbindt

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.

robinhouston

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

scoofy

Just a note from your friendly philosophy degree holder:

Axioms are arbitrary. Use the axioms that are the most useful.

Spivak

Definitions are neither true nor false. They're either useful or not useful.

The question of whether or not the integer 1 is a prime doesn't make sense. The question is is it useful to define it as such and the answer is a resounding no.

munchler

Other good nerd-sniping math questions:

0^0 = 1? Yes, it’s simpler that way.

0! = 1? Yes, it’s simpler that way.

0/0 = ∞? No, it’s undefined.

0.9999… = 1? Yes, it’s just two ways of expressing the same number.

1+2+3+… = -1/12? No, but if it did have a finite value, that’s what it would be.

Affric

> 0.9999… = 1? Yes, it’s just two ways of expressing the same number.

More a question of place-value representation systems than what most people are thinking of which is 1 - ε.

margalabargala

> 1+2+3+… = -1/12? No, but if it did have a finite value, that’s what it would be.

The other ones, sure, but I'm not following this one.

meroes

0^0 got Gemini 2.5 pro the other day for me. It claimed all indeterminate forms (in the context of limits) are also undefined as a response to a prompt dividing by zero. 0^0 is the most obvious exception, it's typically defined as =1 as you said.

rvba

If we try to define division by zero, shouldnt 0/0 be 1?

Or even more abstract "every element on y". Which I think could sort of work

croes

But that would mean (0/0) * 2 = 2 but (0/0) * (2/1) = (0 * 2) / (0 * 1) = 0/0 = 1

null

[deleted]

cogman10

I'm sure it depends on the definition of prime. I've always been partial to "Any integer with exactly 2 divisors". Short, simple, and it excludes 1 and negative numbers.

JadeNB

> I'm sure it depends on the definition of prime. I've always been partial to "Any integer with exactly 2 divisors". Short, simple, and it excludes 1 and negative numbers.

Depending on your definition of divisor, it excludes everything except 1 and -1, whose two integer divisors are 1 and -1. But then, if you specify that "divisor" means "positive integer divisor", it no longer automatically excludes the negative numbers, since the two positive integer divisors of -2 are 1 and 2. (Incidentally, plenty of algebraists, myself included, are perfectly comfortable with including -2 as a prime.)

jconder

Odd to see an article about prime numbers with no mention of ideals. If (1) was a prime ideal then it would be the only non-maximal prime ideal. And it would be the only closed point in Spec(Z)...

dullcrisp

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.

fpoling

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.

IshKebab

No, this article makes the case for 0-based indexing. Let's ignore the reality that computer fundamentally use 0-based indexes... The article says 1 is not prime because maths gets more awkward if it is.

In the same way we index from 0 because indexing gets way more awkward if we index from 1.

In-band sentinels are both quite rare, and also equally convenient with -1 or 0. In fact I would say -1 is a bit more elegant because sometimes you need multiple sentinel values and then you can easily use -2 (what are you going to use 0 and 1 and then index from 2?).

The more common operations are things like indexing into flattened multidimensional arrays, or dealing with intervals, which are both way more elegant with 0-based indexing.

0 is a valid index into an array. It's even a valid index into global memory in some environments. Not mapping memory to address 0 is completely trivial. I'm not sure what non-trivial complications you're thinking of.

pwdisswordfishz

> One way in which 1 “quacks” like a prime is the way it accords with Euclid’s Lemma, the principle that asserts that if p is a prime, then whenever the product of two integers is divisible by p, one of the two numbers or both must be divisible by p.

This is debunked by https://ncatlab.org/nlab/show/too+simple+to+be+simple#relati...

pabenson

Since 1 is the multiplicative identity (x * 1 = x for any x in the set) and any definition of "prime" needs to use multiplication then one way or another 1 is going to be special when talking about primes whether it is included in the set of prime numbers or not. You can't avoid 1 being "special"

null

[deleted]

alganet

"Only divisible by itself and 1" is a darn elegant definition.

1, 2 and 3 are kind of special to me. In prime distribution studies, I discovered that they are special. It gets easier for some things if you consider primes only higher or equal to 5. Explaining distribution gets easier, some proofs become more obvious if you do that (tiny example: draw a ulam-like spiral around the numbers of an analog clock. 2 and 3 will become outliers and a distribution will reveal itself along the 1, 5, 7 and 11 diagonals).

Anyways, "only divisible by itself and 1" is a darn elegant definition.

andriamanitra

It's not entirely clear if that definition includes 1. On one hand 1 is certainly divisible by both itself and 1, but on the other hand they are the same number, so maybe it shouldn't count for "both", because the word "both" vaguely implies two distinct things. The usual "natural number with exactly two integer divisors" definition may not be as elegant but I think it is harder to misinterpret.

alganet

I never used the word "both" there.

But thanks anyway! I learned a thing.

teytra

When I was younger I had a period I often was thinking about prime numbers (before I got old and started thinking about the Roman Empire).

I noticed the same as you, and IIRC the (some?) ancient greeks actually had an idea about 1 as not a number, but the unit that numbers were made of. So in a different class.

2 and 3 are also different, or rather all other primes from 5 and up are neighbours to a multiple of 6, (though not all such neighbours are primes of course).

In base-6 all those primes end in 5 or 1. What is the significance? I don't know. I remember that I started thinking that 2*3=6, maybe the sequence of primes is a result of the intertwining of numbersystems in multiple dimensions or whatever? Then I started thinking about the late republic instead. ;)

alganet

If you work not only the primes, but also the modulus function value of each non-prime, things get even more interesting than thinking of base changes! To me, it reveals much more.

alganet

Also, rearrangements.

In two dimensions is easier.

I cannot rearrange one pebble.

I can rearrange two or three pebbles equidistant from each other in just one distinct way (inverting the position of a neighbouring pebble).

And so on...

There are many ways to think of natural numbers without actual numbers.

mikepurvis

The 1 exception matters as well for prime mutuality, like X and Y share no common factors other than 1 of course, sigh.

alganet

I see 1 as mostly an anchor. However, my thing is not about working out axioms and formal mathematics. I do some visualizations that can help demonstrate aspects of prime distribution.

I am fascinated by geometric proofs though. The clock thing is just a riff on Ulam's work. I believe there is more to it if one sees it as a geometric object and not just a visualization drawing. I could be wrong though.