# Definition of a prime number

**URL:** https://boards.straightdope.com/t/definition-of-a-prime-number/1695
**Category:** Cecil's Columns/Staff Reports
**Created:** [December 29, 1999, 8:24pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695 "1999-12-29T20:24:00Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Kyberneticist](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kyberneticist](https://boards.straightdope.com/u/Kyberneticist)
#### Post date: [December 30, 1999, 6:40am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/1 "1999-12-30T06:40:00Z")

</div>

On the front page is a response by an SD staff member to the question of whether 0 is even or odd. They go on to comment on the status of 1. Now, the definition they give is “having no divisors except itself and 1.”  
They use this to show that one is neither prime nor not prime.  
But I learned in school that a prime number is a positive number that has exactly two factors, 1 and itself.  
This would seem to exclude 1.  
Further more, the claim that all non-prime numbers are composites seems questionable. What about irrationals? Imaginary? Infinite?  
Comments?  
[http://www.straightdope.com/mailbag/mzeroeven.html](http://www.straightdope.com/mailbag/mzeroeven.html)

---

<div class="post-metadata">

### Author: ![bup](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bup](https://boards.straightdope.com/u/bup)
#### Post date: [December 29, 1999, 8:24pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/2 "1999-12-29T20:24:00Z")

</div>

Prime/composite only makes sense in the set of natural numbers. The set is understood to be positive integers, that’s why you don’t need to address the superset of rational numbers, or the larger set of reals.

1 is neither composite nor prime; it is a unit.

I don’t understand why he spent time in his answer arguing that zero is not even in the set of natural numbers, because zero is not  
a natural number. If you’re answering the question of whether a given number is even, why talk about sets the number isn’t in?

Also, in the conjecture bit, he uses the word ‘uniquely’: every even number higher than two can be _uniquely_ expressed by the sum of two primes,

But 10 = 7+3 = 5+5.  
16 = 11+5 = 13+3.

---

<div class="post-metadata">

### Author: ![jens](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jens](https://boards.straightdope.com/u/jens)
#### Post date: [December 29, 1999, 9:35pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/3 "1999-12-29T21:35:00Z")

</div>

As you’ve shown, that was just a mistake. The “uniquely” is NOT part of the conjecture, and never has been. The writer probably got carried away with uniqueness based on prime factorizations.

Obviously, the writer was not Cecil.

---

<div class="post-metadata">

### Author: ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)
#### Post date: [December 30, 1999, 7:55am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/4 "1999-12-30T07:55:00Z")

</div>

Yep. This is being discussed in the mailbag forum.

.

---

<div class="post-metadata">

### Author: ![C\_K\_Dexter\_Haven](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@C\_K\_Dexter\_Haven](https://boards.straightdope.com/u/C_K_Dexter_Haven)
#### Post date: [December 30, 1999, 2:05pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/5 "1999-12-30T14:05:00Z")

</div>

Sorry about the “uniqueness”, it’s what comes of drafting too quickly and not proofing well. Too much spiked holiday egg nog.

The reason we went to such lengths to find an explanation of how zero could be considered NOT an even number, is that was what the poser of the question was asking. She had some memory of some situation where zero was not considered even, and we were trying to figure out what that situation would be. If the question had just been, “Is zero odd or even,” we wouldn’t have given it a moment’s thought. But the question was essentially, “I remember some circumstance in which zero is considered neither odd nor even.”

Having said that, we are now closing this topic here, and moving it to the forum called CECIL’S MAILBAG.

---

<div class="post-metadata">

### Author: ![bup](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bup](https://boards.straightdope.com/u/bup)
#### Post date: [December 30, 1999, 4:55pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/6 "1999-12-30T16:55:00Z")

</div>

Another stab in the dark as to what the  
question poser may have been remembering:

0! = 1

It has nothing to do with odd or even, but  
it’s another case where we have to make  
a special exception for zero.

But as far as I know, anywhere zero exists,  
it is even.

---

<div class="post-metadata">

### Author: ![Kyberneticist](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kyberneticist](https://boards.straightdope.com/u/Kyberneticist)
#### Post date: [December 31, 1999, 6:52am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/7 "1999-12-31T06:52:00Z")

</div>

Still, I haven’t really seen any explanation of why 1 would qualify as a prime number. I always understood that a prime number had two, and only two, factors.

---

<div class="post-metadata">

### Author: ![C\_K\_Dexter\_Haven](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@C\_K\_Dexter\_Haven](https://boards.straightdope.com/u/C_K_Dexter_Haven)
#### Post date: [December 31, 1999, 2:08pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/8 "1999-12-31T14:08:00Z")

</div>

Kyber, it depends on your definition of prime numbers. Under your definition, 1 would presumably not be prime. However, note that a composite number is a number with more than two factors; hence 1 would also not be composite. Thus, 1 is still a neither-nor.

Under the definition quoted in the Mailbag article (“no factors other than itself and 1”), the status of 1 is left ambiguous, and 1 is usually excluded from the prime. As noted, the main reason to exclude 1 from the primes is for the sake of simplicity in stating theorems such as the unique factorization theorem.

---

<div class="post-metadata">

### Author: ![mok](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@mok](https://boards.straightdope.com/u/mok)
#### Post date: [January 16, 2000, 5:45am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/9 "2000-01-16T05:45:00Z")

</div>

CDextHavn sez:

> [@](#):
>
> Kyber, it depends on your definition of prime numbers. Under your definition, 1 would presumably not be prime. However, note that a composite number is a number with more than two factors; hence 1 would also not be composite. Thus, 1 is still a neither-nor.  
> Under the definition quoted in the Mailbag article (“no factors other than itself and 1”), the status of 1 is left ambiguous, and 1 is usually excluded from the prime. As noted, the main reason to exclude 1 from the primes is for the sake of simplicity in stating theorems such as the unique factorization theorem.

No, the status of 1 is **not** ambiguous. And it does **not** “depend on your definition of prime numbers”. There is only one definition of prime numbers, and that definition is generally accepted by mathematicians. The definition “no factors other than itself and 1” is a non-rigorous definition that may suit the layperson, but it is not the real definition of a prime number.

Primes are natural numbers that have exactly two discrete factors. Composites are natural numbers that have \> 2 discrete factors. And one is the natural number with only one factor. So there are not two classes of natural numbers, but three: composites, primes, and one.

Sheesh. If the definition of primes was as ambiguous as you say it is, then there is no way that computers could have calculated as many digits in the decimal expansion of pi as they have. Mathematicians know exactly what primes are, and 1 ain’t one of 'em.

-m

---

<div class="post-metadata">

### Author: ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)
#### Post date: [January 16, 2000, 9:39am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/10 "2000-01-16T09:39:00Z")

</div>

Sheesh is a nonmathematical term, and should be used carefully.

> [@](#):
>
> Primes are natural numbers that have exactly two discrete factors. Composites are natural numbers that have \> 2 discrete factors. And one is the natural number with only one factor. So there are not two classes of natural numbers, but three: composites, primes, and one.

What do you mean by “discrete?”

Since 7 = 7 x 1 x 1, you must mean that you throw out duplications in the factor list. What about 4 = 2 x 2 x 1? Apparently, under your definition, 4 is prime.

.

---

<div class="post-metadata">

### Author: ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)
#### Post date: [January 16, 2000, 10:22am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/11 "2000-01-16T10:22:00Z")

</div>

Sheesh on me. Posting too late at night, I guess. I found the answer to my question, also posted to this thread in the mailbag answers:  
[http://www.straightdope.com/ubb/Forum6/HTML/000222.html](http://www.straightdope.com/ubb/Forum6/HTML/000222.html)

Sorry.

.

---

<div class="post-metadata">

### Author: ![C\_K\_Dexter\_Haven](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@C\_K\_Dexter\_Haven](https://boards.straightdope.com/u/C_K_Dexter_Haven)
#### Post date: [January 16, 2000, 2:01pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/12 "2000-01-16T14:01:00Z")

</div>

Whoa, there, buckaroo. OK, I grant you, “m”, the word “ambiguous” was used incorrectly. Yes, mathematicians are all pretty much agreed that 1 is neither is prime nor composite (although I have seen some theorems that needed to include 1 with the primes for certain purposes: usually for the convenience of not having to write “1 or primes” all the time.)

When I got my Ph.D. in math, back in the pre-computer days, a prime was defined as an integer (or natural number) having no factors other than itself and 1, excluding 1. The definition is perfectly rigorous in its context. However, it was possible to define that context for various purposes – such as whether you were looking at natural numbers or integers.

This column is not meant to be mathematically rigorous. It is not designed for the budding math professor but for the Teeming Millions. Heck, if it was designed for the math geeks, we wouldn’t have posted this question at all, as being too obvious, and then we would have missed Dimitrius’s delicious non-mathematical solution.

---

<div class="post-metadata">

### Author: ![Polycarp](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@Polycarp](https://boards.straightdope.com/u/Polycarp)
#### Post date: [January 19, 2000, 9:00pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/13 "2000-01-19T21:00:00Z")

</div>

RM…I feel like the freshman physics student questioning how Einstein got **that** result, but:

> [@](#):
>
> Since 7 = 7 x 1 x 1, you must mean that you throw out duplications in the factor list. What about 4 = 2 x 2 x 1? Apparently, under your definition, 4 is prime.

Okay, how many discrete natural numbers can divide seven evenly? Two: seven and one.

How many discrete natural numbers can divide four evenly? Three: four, two, and one.

Just because you can set up a valid equation that includes only some of the factors of a number does not mean that they are not factors.

BTW, there are an infinite number of categories of natural number:  
\> Unities, consisting of one, with only one discrete factor  
\> Primes, with two discrete factors  
\> Perfect squares of primes, with three discrete factors  
\> Composites, type 1, with four discrete factors  
\> Cubes of primes, with four discrete factors  
\> Tesseractial numbers, which are primes raised to the fourth power, with five discrete factors  
…and so on.

---

<div class="post-metadata">

### Author: ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)
#### Post date: [January 20, 2000, 8:48am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/14 "2000-01-20T08:48:00Z")

</div>

> [@](#):
>
> I feel like the freshman physics student questioning how Einstein got _that_ result, but:

Thanks, I think. How? Look at the posting time. 'Course, I musta woke up a half hour later, but go ahead, rub it in.

😕

.

---

<div class="post-metadata">

### Author: ![John\_Kentzel-Griffin](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@John\_Kentzel-Griffin](https://boards.straightdope.com/u/John_Kentzel-Griffin)
#### Post date: [January 27, 2000, 6:01am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/15 "2000-01-27T06:01:00Z")

</div>

Something that **m** said bothers me.

> [@](#):
>
> There is only one definition of prime numbers, and that definition is generally accepted by mathematicians.

It seems to me that all definitions in math depend upon context, including the definition of a prime number. For example, 2 is prime over the natural numbers, but if you consider complex integers, 2 = (1+i)\*(1-i). 3 is prime, but 5 = (4+i)(4-i).

* * *

Virtually yours,

DrMatrix

---

<div class="post-metadata">

### Author: ![AWB](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AWB](https://boards.straightdope.com/u/AWB)
#### Post date: [January 27, 2000, 4:41pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/16 "2000-01-27T16:41:00Z")

</div>

A definition, from my Mathematics Dictionary, 4th Edition (James/James):

**PRIME,** _adj., n._ An integer _p_ which is not 0 or +1 and is divisible by no integers except +1 and +_p, e.g.,_ +2, +3, +5, +7, +11. Sometimes a prime number is required to be positive. There ane an infinite number of prime numbers, but no general formula for these primes. More generally, a prime can mean any member of an integral domain that is not a unit and can not be written as the product of two members that are not units.

* * *

Judges 14:9 - So [Samson] scraped the honey into his hands and went on, eating as he went. When he came to his father and mother, he gave some to them and they ate it; but he did not tell them that he had scraped the honey out of the body of the lion.

---

<div class="post-metadata">

### Author: ![Zorblak](https://avatars.discourse-cdn.com/v4/letter/z/c2a13f/32.png) [@Zorblak](https://boards.straightdope.com/u/Zorblak)
#### Post date: [March 20, 2000, 8:08pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/17 "2000-03-20T20:08:00Z")

</div>

DrMatrix wrote:

> [@](#):
>
> It seems to me that all definitions in math depend upon context, including the definition of a prime number. For example, 2 is prime over the natural numbers, but if you consider complex integers, 2 = (1+i)\*(1-i). 3 is prime, but 5 = (4+i)(4-i).

Yes, primality is contextual. A number whichi is prime in one set of numbers is not necessarily prime in another.

I’m going to throw a little wrinkle into this discussion: An alternate definition of prime. This is the definition of primality that mathematicians apply to any set; when applied to the natural numbers, you end up with the more familiar definition, but on some sets, the common definition does not follow.

(The symbol “|” means “divides” in the following definition.)

Let p be a number. p is prime iff the following is true:

For any numbers a and b, if p | ab, then p | a or p | b.

Consider a few integers, and compare them to this definition. Take 2. Find any two numbers whose product is divisible by 2, and I can guarantee you that one of them is divisible by 2 itself. 7_4 = 28, and 2 | 4. 1815_5712=10367280, and 2|10367280. And so on. Same with any other prime number.

Now take 6, a composite number. 6 | 24, as an example. Now, sure, you can factor 24 into 2_12, and 6 | 12, but you can also factor 24 into 3_8, and 6 does not divide either 3 or 8. Thus, 6 is not prime.

Now, as I’ve written it, this would imply that 1 is prime. After all, since 1 divides every integer, it will divide both a and b for any a and b. However, 1 is a unit, and so is disqualified from contention. The actual definition of primality reads as above, except it has the stipulation “Let p be a non-unit number.”

(You can also apply this definition to sets of non-numeric elements, but I don’t want to get into that… I’ve probably already given you more information than you wanted.)

-Joe

---

<div class="post-metadata">

### Author: ![MattStL](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@MattStL](https://boards.straightdope.com/u/MattStL)
#### Post date: [March 28, 2000, 11:43pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/18 "2000-03-28T23:43:00Z")

</div>

> [@](#):
>
> It seems to me that all definitions in math depend upon context, including the definition of a prime number.  
> For example, 2 is prime over the natural numbers, but if you consider complex integers, 2 = (1+i)\*(1-i). 3 is  
> prime, but 5 = (4+i)(4-i).

But the complex numbers are a superset of the reals. So there are no primes in that context. Every number has an infinite number of factors.  
E.g., 2 = 0.25 \* 8.0

---

<div class="post-metadata">

### Author: ![John\_Kentzel-Griffin](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@John\_Kentzel-Griffin](https://boards.straightdope.com/u/John_Kentzel-Griffin)
#### Post date: [March 31, 2000, 1:59am UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/19 "2000-03-31T01:59:00Z")

</div>

**MattStL**  
I meant the complex integers - numbers of the form a+bi where a and b are integers.

I should note that by the “common” definition of prime (having only itself and one as divisors) there are not complex primes. But by **Zorblak** ’s alternate definition we are allowed to have primes. It is left as an exercise for the reader to show that over the (real) integers that the two definitions are equivalent.

* * *

Virtually yours,

DrMatrix

---

<div class="post-metadata">

### Author: ![bup](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bup](https://boards.straightdope.com/u/bup)
#### Post date: [March 31, 2000, 5:22pm UTC](https://boards.straightdope.com/t/definition-of-a-prime-number/1695/20 "2000-03-31T17:22:00Z")

</div>

> [@](#):
>
> Originally posted by DrMatrix:  
> \*\ ***MattStL**  
> It is left as an exercise for the reader to show …  
> \*\*

LOLQ\*

Wow, that takes me back. Thanks.

\*quietly

[Next page](https://boards.straightdope.com/t/definition-of-a-prime-number/1695.md?page=2)
