Question:
How to test a prime number formula?
noonehomebutlightsareon
2007-03-10 07:07:47 UTC
I have an algabraic formula which (I believe) generates only prime numbers. Is there a method to test this?
(it doesn't generate EVERY prime, but I believe if I enter any number, I get a prime back)

Along the same lines, is there a list anywhere of formulas for generating primes, so I could judge whether it's unique or not?
Three answers:
anonymous
2007-03-10 07:18:45 UTC
It has been rigorously proved that there can be no such formula as the one which you claim to have.



There are formulas which generate either a positive prime value or a negative value, but you cannot control which.



The page below introduces the topic. It is part of the best mathematical resource on the whole world-wide web.
Oz
2007-03-10 07:25:10 UTC
There will never be a formula for generating primes as there is, and has been proven, to be infinitely many primes!



The only way to test if it generates prime number is to plug is numbers until you find a counterexample ie your formula not generating a prime number.



But seeing that you can't have a formula to produce each prime number, there will be numbers/a number that will generate a non prime number in formula.
williamh772
2007-03-10 09:23:53 UTC
Here is an interesting site you should look at:

http://secamlocal.ex.ac.uk/people/staff/mrwatkin/zeta/ss-a.htm



About 35 years ago, I developed formulas to generate prime numbers (generators of rings), but they required a huge number of calculations and were not practical.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...