# Primes

**URL:** <https://boards.straightdope.com/t/primes/671296>\
**Category:** Factual Questions\
**Created:** [October 15, 2013, 10:42am UTC](https://boards.straightdope.com/t/primes/671296 "2013-10-15T10:42:00Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [October 15, 2013, 3:37pm UTC](https://boards.straightdope.com/t/primes/671296/21 "2013-10-15T15:37:42Z")

</div>

> [@aNewLeaf](#):
>
> Primes are whole numbers by definition, not rationals.

Yes? The OP’s question is “how can you prove this will never **produce** a prime?” The OP says nothing about the domain of **n**. Obviously the prime number has to be whole, but that’s the result of f(n), n itself is not constrained to be integral.

---

<div class="post-metadata">

**Author:** ![aNewLeaf](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@aNewLeaf](https://boards.straightdope.com/u/aNewLeaf)\
**Post date:** [October 15, 2013, 3:43pm UTC](https://boards.straightdope.com/t/primes/671296/22 "2013-10-15T15:43:03Z")

</div>

I guess I’m having a hard time with terms. I’ll do what I can.  
Whatever kind of number you put in, what you get out will be the same type- rational, integer, etc.  
Some rational results may have values equivalent to whole numbers, but those won’t be any numbers we haven’t already addressed- it’ll be factorable.

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [October 15, 2013, 4:02pm UTC](https://boards.straightdope.com/t/primes/671296/23 "2013-10-15T16:02:42Z")

</div>

> [@Jragon](#):
>
> Yes? The OP’s question is “how can you prove this will never **produce** a prime?” The OP says nothing about the domain of **n**. Obviously the prime number has to be whole, but that’s the result of f(n), n itself is not constrained to be integral.

On the other hand given the statement of the question I find it only natural to assume that **n** represents a natural number. Obviously the OP did not state the problem completely correctly but I think most math students would understand it correctly with the assumption that n is natural. Not to mention the common convention of using n for natural numbers, q for rational, R for real, etc.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [October 15, 2013, 4:08pm UTC](https://boards.straightdope.com/t/primes/671296/24 "2013-10-15T16:08:51Z")

</div>

Okay, I’m sorry guys, but some of the information in this thread is erroneous, and I have a counterexample to prove this.

**Conjecture:** providing a factorization of a function into the product of two integers will never be prime.

This is not true, take the simple counterexample:

(x+1)(x-1)

Let x = 2

(2+1)(2-1)  
(3)(1)  
= 3

3 is prime. Providing a factorization did nothing to show that the output of f(x) could not be prime. I’m not 100% sure of this, but **assuming integral x** , I think I’ve found the constraints for showing a factorized quadratic equation cannot be prime.

Let f(x) = (ax + b)(cx + d); where x is integral and a,b,c, and d are integers not equal to zero.

We can also express f(x) in a different way, f(x)= g(x)h(x), where g(x)=(ax+b) and h(x)=(cx+d).

To show that f(x) may not produce a prime, the following must be true:

Constraint one is that, when h(x) = 1, g(x) must not be prime. Constraint two is the reverse: when g(x)=1 h(x) must not be prime.

The final constraint is this: b \* d must not be prime. This is more or less the same as constraints 1 and 2. If b = 1, d must not be prime and vice verse. Otherwise, when x=0, b\*d will be prime. Take, for instance:

(5x + 2)(9x + 1), when x = 0 you get (5_0+2)(9_0+1) = (0+2)(0+1)= 2\*1 = 2; 2 is prime.

**In the general case where x is real** , f(x) **must** be able to produce a prime or f(x) would be a discontinuous function. So, if constraints are not put on the domain of x, it is impossible to prove that f(x) will never produce a prime (since it is false).

> [@sailor](#):
>
> On the other hand given the statement of the question I find it only natural to assume that **n** represents a natural number. Obviously the OP did not state the problem completely correctly but I think most math students would understand it correctly with the assumption that n is natural. Not to mention the common convention of using n for natural numbers, q for rational, R for real, etc.

That’s true, and given that I figured out that a real x must produce a prime at some point for a quadratic equation, it’s the only sane statement of the problem.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [October 15, 2013, 4:17pm UTC](https://boards.straightdope.com/t/primes/671296/25 "2013-10-15T16:17:09Z")

</div>

> [@Jragon](#):
>
> Constraint one is that, when h(x) = 1, g(x) must not be prime. Constraint two is the reverse: when g(x)=1 h(x) must not be prime.
> 
> The final constraint is this: b \* d must not be prime. This is more or less the same as constraints 1 and 2. If b = 1, d must not be prime and vice verse. Otherwise, when x=0, b\*d will be prime.

There’s another obvious constraint I missed involving negatives. If h(x) or g(x) is -1, then the other one must not be a negative prime. Same for b\*d.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [October 15, 2013, 4:31pm UTC](https://boards.straightdope.com/t/primes/671296/26 "2013-10-15T16:31:21Z")

</div>

> [@Jragon](#):
>
> Yes? The OP’s question is “how can you prove this will never **produce** a prime?” The OP says nothing about the domain of **n**. Obviously the prime number has to be whole, but that’s the result of f(n), n itself is not constrained to be integral.

OK, to be absolutely accurate:

(8x+1)(2x+1)

So, all values of X will produce a prime, except for those such that 8x+1 = 1 or 2x + 1 = 1. In other words, 0. That’s the only number that can produce a prime, since a prime is only divisible by itself and 1. And since 1 is not a prime by definition, any number inserted for X will produce a non-prime. I don’t see how it could be any other way.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [October 15, 2013, 4:38pm UTC](https://boards.straightdope.com/t/primes/671296/27 "2013-10-15T16:38:49Z")

</div>

> [@pulykamell](#):
>
> OK, to be absolutely accurate:
> 
> (8x+1)(2x+1)
> 
> So, all values of X will produce a prime, except for those such that 8x+1 = 1 or 2x + 1 = 1. In other words, 0. That’s the only number that can produce a prime, since a prime is only divisible by itself and 1. And since 1 is not a prime by definition, any number inserted for X will produce a non-prime. I don’t see how it could be any other way.

Any integer, not any number. You can produce 5, for instance, by setting x equal to

(1/16)(-5-sqrt(89)) or (1/16)(sqrt(89)-5)

My point (or rather, confusion, since I hadn’t thought about it enough to solidify what I was thinking at that point) is that you can only show a prime will never be produced unless you constrain x’s domain. (Or n’s domain, whatever). But I agree with sailor that the domain was implicitly constrained by choosing n as the variable name and the fact that the problem makes no sense otherwise.

Edit: And for integral n, the OP’s expression in specific will never produce a prime.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [October 15, 2013, 4:43pm UTC](https://boards.straightdope.com/t/primes/671296/28 "2013-10-15T16:43:03Z")

</div>

> [@Jragon](#):
>
> Any integer, not any number.

Sorry, yes. I meant “integer.”

> [@](#):
>
> Edit: And for integral n, the OP’s expression will never produce a prime, but in general you cannot say that “it has a factorization, therefore it cannot produce a prime”, even if x is integral. Additional constraints must be met in the general case.

That’s correct. The caveat about one side of the factorization equalling one should have been pointed out, given that a prime number cannot have one and itself as its factors.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [October 15, 2013, 4:49pm UTC](https://boards.straightdope.com/t/primes/671296/29 "2013-10-15T16:49:14Z")

</div>

Actually, I think it needs to be further constrained to positive integers, as one factor being set to -1 might also produce a prime.

(8x+1)(2x+1) = 7 when x = -1

---

<div class="post-metadata">

**Author:** ![Great\_Antibob](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Great\_Antibob](https://boards.straightdope.com/u/Great_Antibob)\
**Post date:** [October 15, 2013, 5:09pm UTC](https://boards.straightdope.com/t/primes/671296/30 "2013-10-15T17:09:33Z")

</div>

> [@Jragon](#):
>
> Yes? The OP’s question is “how can you prove this will never **produce** a prime?” The OP says nothing about the domain of **n**.

Actually (albeit in a later post):

> [@mla3](#):
>
> The question was why does
> 
> 16n^2 +10n + 1
> 
> never produce a prime number when n is a a whole number?.

As for the factorization when one of the factors is 1, I address that in my first post in the thread:

> [@Great\_Antibob](#):
>
> There is one exception here: if one of the factors is one. In this case, neither factor (8x+1) or (2x+1) equals 1 for a whole number value of x, so no problem.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [October 15, 2013, 5:20pm UTC](https://boards.straightdope.com/t/primes/671296/31 "2013-10-15T17:20:08Z")

</div>

Ah, somehow I missed that clarification. And I assume by “whole numbers” we mean “positive integers.”

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [October 15, 2013, 5:22pm UTC](https://boards.straightdope.com/t/primes/671296/32 "2013-10-15T17:22:01Z")

</div>

> [@pulykamell](#):
>
> Actually, I think it needs to be further constrained to positive integers,

AKA “natural numbers”😉

---

<div class="post-metadata">

**Author:** ![Great\_Antibob](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Great\_Antibob](https://boards.straightdope.com/u/Great_Antibob)\
**Post date:** [October 15, 2013, 5:25pm UTC](https://boards.straightdope.com/t/primes/671296/33 "2013-10-15T17:25:29Z")

</div>

> [@pulykamell](#):
>
> Ah, somehow I missed that clarification. And I assume by “whole numbers” we mean “positive integers.”

Most likely.

It generally means the set {1, 2, 3, 4, …}, though I’ve seen it contain the number zero from time to time.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 15, 2013, 6:51pm UTC](https://boards.straightdope.com/t/primes/671296/34 "2013-10-15T18:51:40Z")

</div>

I’ve also seen “whole numbers” used to include negative integers as well (after all, they’re “whole” in the sense that they lack a fractional part). It’s terribly ambiguous terminology…

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [October 15, 2013, 6:59pm UTC](https://boards.straightdope.com/t/primes/671296/35 "2013-10-15T18:59:49Z")

</div>

> [@Indistinguishable](#):
>
> I’ve also seen “whole numbers” used to include negative integers as well (after all, they’re “whole” in the sense that they lack a fractional part). It’s terribly ambiguous terminology…

[Wikipedia agrees.](http://en.wikipedia.org/wiki/Whole_number)

The terminology that I usually see in ~freshman-level college math textbooks is that given [here](http://www.mathsisfun.com/whole-numbers.html) (though, see the paragraph labeled “Confusing”): that the “whole numbers” are {0, 1, 2, …}, while the “counting numbers” or “natural numbers” are {1, 2, 3, …}.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 15, 2013, 7:24pm UTC](https://boards.straightdope.com/t/primes/671296/36 "2013-10-15T19:24:00Z")

</div>

It should be noted that any time we’re talking about primes, the space of numbers is assumed to be the integers, since whether or not something is a prime depends on what space of numbers you’re working with. If we’re allowing n to be 1/2, then you’re not getting the integer 3 (which is a prime), but the rational number 3 (which is not a prime). In fact, no rational number is prime: They’re all units (except for zero, which is its own thing).

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 15, 2013, 8:11pm UTC](https://boards.straightdope.com/t/primes/671296/37 "2013-10-15T20:11:10Z")

</div>

(The terminology where 0 is not a “counting number” is also terribly irksome, and always throws me. When I think of “counting”, I think of answering the question “How many…?”, and there most definitely are times when the answer is 0 (“How many Civil War veterans are still alive?”). But, charitably, I suppose how I should understand the terminology is “‘Counting numbers’ are the numbers you would announce out loud, one by one, in the process of counting items”, so that zero is disqualified on the grounds that you never get to the point of having to say it…)

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [October 16, 2013, 2:11am UTC](https://boards.straightdope.com/t/primes/671296/38 "2013-10-16T02:11:00Z")

</div>

> [@Chronos](#):
>
> It should be noted that any time we’re talking about primes, the space of numbers is assumed to be the integers, since whether or not something is a prime depends on what space of numbers you’re working with. If we’re allowing n to be 1/2, then you’re not getting the integer 3 (which is a prime), but the rational number 3 (which is not a prime). In fact, no rational number is prime: They’re all units (except for zero, which is its own thing).

I suppose this is just a matter of the terminology (or conceptualizations) one wishes to use. I tend to view the integers as a proper subset of rationals, which is a proper subset of reals, which is a proper subset of complex numbers. Thus, for example, I see every integer as a rational number, and _some rational numbers_ are prime numbers.

Similarly, the set of _functions_ is a proper subset of the set of _relations_ (in plainer English, every function is a special kind of relation), and every relation has an inverse. Therefore, every function has an inverse (although the inverse of a function might not be a function). More typically, a function is said to have an inverse only if that inverse is also a function. To me, that’s what makes the language sloppy and ambiguous.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 16, 2013, 2:32am UTC](https://boards.straightdope.com/t/primes/671296/39 "2013-10-16T02:32:31Z")

</div>

Sure, you can do that, but then you have to clarify the domain you’re talking about in some other way. For instance, is 5 a prime? Well, 5 is an integer, and in the integers it’s prime… But the integers are also a subset of the Gaussian integers, and in the Gaussian integers, 5 = (1+2i)(1-2i), and so 5 is composite.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 16, 2013, 8:30am UTC](https://boards.straightdope.com/t/primes/671296/40 "2013-10-16T08:30:56Z")

</div>

Everything is potentially ambiguous all the time, barring strenuous (and, for most purposes, excessive) effort otherwise… We ordinarily answer “Is 7 divisible by 2?” by saying “No, of course not”, though we might also in some contexts instead say “Sure, it’s 3.5”. And it’s not wrong to give the former answer even when the disambiguation of intended interpretation hasn’t been made explicit, relying on convention and implicit cues instead. Similarly, I think we can all agree that the OP was referring to “primes” in the ungeneralized sense of this term as meaning integers \> 1 admitting no further factorizations into integers \> 1, even though they did not state this explicitly.

[Previous page](https://boards.straightdope.com/t/primes/671296.md?page=1)

[Next page](https://boards.straightdope.com/t/primes/671296.md?page=3)
