# 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:** 1

<div class="post-metadata">

**Author:** ![mla3](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mla3](https://boards.straightdope.com/u/mla3)\
**Post date:** [October 15, 2013, 10:42am UTC](https://boards.straightdope.com/t/primes/671296/1 "2013-10-15T10:42:00Z")

</div>

Is it possible to prove. (4n+1)^2+4n/2

Can never produce a prime number?

---

<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, 11:25am UTC](https://boards.straightdope.com/t/primes/671296/2 "2013-10-15T11:25:54Z")

</div>

Yes. It can be factorized (easily) with two terms so that it will always be the product of two numbers.

---

<div class="post-metadata">

**Author:** ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)\
**Post date:** [October 15, 2013, 1:10pm UTC](https://boards.straightdope.com/t/primes/671296/3 "2013-10-15T13:10:05Z")

</div>

You didn’t put in enough parentheses to allow us to understand what you’re talking about. Is that this?:

Multiply n by 4.  
Add 1.  
Square it.

Then multiply n by 4.  
Divide it by 2.

Add those two results.

Or is it this?:

Multiply n by 4.  
Add 1.  
Square it.  
Then multiply n by 4.  
Add those two numbers.

Divide the result by 2.

(Yes, I know how to express this with parentheses. I’m just not sure mla3 does.)

---

<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, 1:15pm UTC](https://boards.straightdope.com/t/primes/671296/4 "2013-10-15T13:15:44Z")

</div>

In my opinion (4n+1)^2+4n/2 is not ambiguous and is the same as

(4n/2) + (4n+1)^2

---

<div class="post-metadata">

**Author:** ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)\
**Post date:** [October 15, 2013, 1:17pm UTC](https://boards.straightdope.com/t/primes/671296/5 "2013-10-15T13:17:54Z")

</div>

Why would mla3 write (4n/2) instead of 2n?

---

<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, 1:28pm UTC](https://boards.straightdope.com/t/primes/671296/6 "2013-10-15T13:28:21Z")

</div>

> [@Wendell\_Wagner](#):
>
> Why would mla3 write (4n/2) instead of 2n?

My guess is that it is homework and that is why I did not give the complete answer but your guess is as good as mine.

---

<div class="post-metadata">

**Author:** ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)\
**Post date:** [October 15, 2013, 1:33pm UTC](https://boards.straightdope.com/t/primes/671296/7 "2013-10-15T13:33:22Z")

</div>

So what is the factorization?

---

<div class="post-metadata">

**Author:** ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)\
**Post date:** [October 15, 2013, 1:35pm UTC](https://boards.straightdope.com/t/primes/671296/8 "2013-10-15T13:35:56Z")

</div>

Hmm, I guess you don’t want to give the factorization because that would be doing the homework for mla3.

---

<div class="post-metadata">

**Author:** ![mla3](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mla3](https://boards.straightdope.com/u/mla3)\
**Post date:** [October 15, 2013, 1:42pm UTC](https://boards.straightdope.com/t/primes/671296/9 "2013-10-15T13:42:39Z")

</div>

This isn’t homework don’t be silly. I get 90% for maths thank you. When you multiply it out you get. 16n^2 + 10n +1.

When n is a multiple of three you get a number which is equal to 6p+1. (All elements in these equations are whole numbers.) This of course does not not mean that the number has to be prime only that it may be prime. The trouble I am having is that when I run this on an excel spreadsheet. None of the numbers that are produced from the equation result in a prime number. I was wondering if there was anything that I had missed.

---

<div class="post-metadata">

**Author:** ![mla3](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mla3](https://boards.straightdope.com/u/mla3)\
**Post date:** [October 15, 2013, 1:44pm UTC](https://boards.straightdope.com/t/primes/671296/10 "2013-10-15T13:44:42Z")

</div>

When its factorized you get the following.  
(8x+1)(2x+1)

---

<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, 1:51pm UTC](https://boards.straightdope.com/t/primes/671296/11 "2013-10-15T13:51:47Z")

</div>

There’s your answer.

---

<div class="post-metadata">

**Author:** ![mla3](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mla3](https://boards.straightdope.com/u/mla3)\
**Post date:** [October 15, 2013, 2:07pm UTC](https://boards.straightdope.com/t/primes/671296/12 "2013-10-15T14:07:46Z")

</div>

The question wasn’t how you factorize. The question was why does

16n^2 +10n + 1

never produce a prime number when n is a a whole number?

When you subtract one from the statement you get a multiple of 6 only when n is a multiple of 3. When n is a multiple of 3 and larger than 3 you will get a multiple of four when you subtract one from the above statement. So I can think of no logical reason why the above statement will never result in a prime number.

---

<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, 2:11pm UTC](https://boards.straightdope.com/t/primes/671296/13 "2013-10-15T14:11:05Z")

</div>

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

I think you’re having a bit of a cognitive disconnect here.

If you can factor a number, it’s obviously not prime. That’s basically the definition of prime, whose only factors are 1 and itself.

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.

And this is a very popular method for showing something isn’t prime - by providing a factorization. Providing a factorization is precisely equivalent to showing something isn’t prime.

ETA: The (2x+1) part is a particularly good one. This term means there is always an odd number that divides the number, as odd numbers can generally be expressed as 2n+1.

---

<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, 2:13pm UTC](https://boards.straightdope.com/t/primes/671296/14 "2013-10-15T14:13:19Z")

</div>

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

The fact that you can factor it means it’s not prime. Whatever number your equation produces will factor to at least those two factors.

---

<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, 2:19pm UTC](https://boards.straightdope.com/t/primes/671296/15 "2013-10-15T14:19:40Z")

</div>

Actually, to clarify what I meant by (2n+1), it’s pretty neat, since it means that the N-th number you generate with this polynomial will always be divisible by the (N+1)-th odd number.

So, the n = 1 number will be divisible by 3, the n= 2 number will be divisible by 5, the n=3 number will be divisible by 7, and so on.

---

<div class="post-metadata">

**Author:** ![mla3](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mla3](https://boards.straightdope.com/u/mla3)\
**Post date:** [October 15, 2013, 2:29pm UTC](https://boards.straightdope.com/t/primes/671296/16 "2013-10-15T14:29:42Z")

</div>

Thanks didn’t thin k of that

---

<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:21pm UTC](https://boards.straightdope.com/t/primes/671296/17 "2013-10-15T15:21:34Z")

</div>

Okay, I feel dumb for asking this since I should really know this, but how does this prove it’s not prime for all rationals?

It’s obvious it proves it for all integers. And I’m pretty sure that if x is irrational it will never be prime since none of the coefficients are irrational (and thus it probably will never be whole). However, I’m not clear how we can be sure that the product will never be prime for a rational-but-not-integral x. Can somebody explain it?

---

<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:30pm UTC](https://boards.straightdope.com/t/primes/671296/18 "2013-10-15T15:30:14Z")

</div>

Yeah, I worked something out on paper. Take this factorization:

(x + 1)(2x + 1)

Let x = 1/2

(1/2 + 1)(2 \* 1/2 + 1)  
(3/2)(1+1)  
(3/2)(2)

= 3

Which is prime.

---

<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:35pm UTC](https://boards.straightdope.com/t/primes/671296/19 "2013-10-15T15:35:04Z")

</div>

> [@Jragon](#):
>
> Okay, I feel dumb for asking this since I should really know this, but how does this prove it’s not prime for all rationals?
> 
> It’s obvious it proves it for all integers. And I’m pretty sure that if x is irrational it will never be prime since none of the coefficients are irrational (and thus it probably will never be whole). However, I’m not clear how we can be sure that the product will never be prime for a rational-but-not-integral x. Can somebody explain it?

Primes are whole numbers by definition, not rationals.

---

<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, 3:35pm UTC](https://boards.straightdope.com/t/primes/671296/20 "2013-10-15T15:35:14Z")

</div>

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

If it can be factorized it cannot be prime, by definition of prime. Now, if you can find a number which can and cannot be factorized at the same time you really got something there. I would first try selling it to the US military because they could make heads explode with something like that 🙂

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