B Do Prime Numbers Follow a Pattern?

Hello everyone!

I was going through a simple high school level mathematics book and got to the following question:

n2 - n + 41 is a prime for all positive integers n.

You're supposed to find a counter-example and prove the statement false.

You could of course sit and enter different values for n until you get a composite number and then use that value of n as the counter-example.

But is there a way to find some pattern or rule for prime or composite numbers so that you don't have to do the work manually? This is probably a trivial question but I got curious. Thank you!
 

phyzguy

Science Advisor
4,060
1,083
There is no known pattern or rule for calculating prime numbers, but with a little thought you should be able to easily find a counter-example without laboriously going through numbers.
 
There is no known pattern or rule for calculating prime numbers, but with a little thought you should be able to easily find a counter-example without laboriously going through numbers.
Thank you!
 
32,108
3,993
I was going through a simple high school level mathematics book and got to the following question:

n2 - n + 41 is a prime for all positive integers n.

You're supposed to find a counter-example and prove the statement false.
It's pretty easy to find a counterexample for the formula above, if you think about it. A similar formula is the following: n2 + n + 41. This one also appears to generate prime numbers. It's a little harder than the first formula to spot why not all of its values are primes.
 
321
32
Uh? Simple proof? Hmm... how come... hmmm... hmmmmm...

Ah!! It's the same reason why ##n^2-n+11## also doesn't generate prime numbers!! Haha, smart problem!
 

phyzguy

Science Advisor
4,060
1,083
Try writing it as n(n-1) + 41. Is there a vale of n that makes it obvious this is not prime?
 

fresh_42

Mentor
Insights Author
2018 Award
9,491
6,502
I have once checked one of the polynomials up to ##n=100## and there are indeed disproportionately many primes as results. Does anyone know why? I mean in terms of Legendre symbols or so?
 
321
32
Try writing it as n(n-1) + 41. Is there a vale of n that makes it obvious this is not prime?
The way I thought of this was rewriting as ##n^2 + (41-n)##
 

DrClaude

Mentor
6,618
2,781
The way I thought of this was rewriting as ##n^2 + (41-n)##
That's what I thought also, but @phyzguy's approach allowed me to see the solution to
A similar formula is the following: n2 + n + 41. This one also appears to generate prime numbers. It's a little harder than the first formula to spot why not all of its values are primes.
 
321
32
Hmm... I'm kinda missing the ##n*(n-1)+41##... how does that make it non-prime... hmm... 21*20?... 11*10?...hmm... can't be that... 41*40?... oh.. .41*40+41!!! hahaha... I got it! :biggrin: ... I'm so slow

It's actually the same thing as ##n*(n+1)+41##, I guess!
 
32,108
3,993
Hmm... I'm kinda missing the ##n*(n-1)+41##... how does that make it non-prime... hmm... 21*20?... 11*10?...hmm... can't be that... 41*40?... oh.. .41*40+41!!! hahaha... I got it! :biggrin: ... I'm so slow

It's actually the same thing as ##n*(n+1)+41##, I guess!
Well, maybe.
As a hint, consider that ##n^2 + n + 41 = n^2 + n + 40 + 1##, where the latter expression can be written as a perfect square trinomial for some value of n.
 
34
3
10.

(Didn't read the other comments.)
 
34
3
I read it as "n^2 - n - 41".

-- The way it's written is more immediate, though.

Reduce the last two terms to zero by setting n equal to the quantity you're subtracting.
In this case, take:
N = 41
 
318
52
Just let n=41.
 

Want to reply to this thread?

"Do Prime Numbers Follow a Pattern?" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving

Top Threads

Top