What is he best method to find prime number between two numbers?
Answers
Answered by
0
every prime no.(except 2)can be written of the form 4k±1!
so,let there be a inteval [a,b]
then list all the no.s that can be written in this form!
i.e start with 4*[a/4]+1,then 4*[a/4+1]±1 and so on!
Then,you have to discard some no.s as there are no ways find the next prime no.!but all the no.s will belong in your list!
so,let there be a inteval [a,b]
then list all the no.s that can be written in this form!
i.e start with 4*[a/4]+1,then 4*[a/4+1]±1 and so on!
Then,you have to discard some no.s as there are no ways find the next prime no.!but all the no.s will belong in your list!
Similar questions