Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A prime generator I discovered

  1. May 13, 2009 #1
    Somewhere between brute force and Mersenne derivation of primes is the formula I found,


    I guess it would generate more primes pZ than Mersenne in a given interval, but requires knowledge of all primes to pN, the Nth prime. It may produce only primes, rather than Mersenne's hit-or-miss search. The pn here are supposed to follow 2, 3, 5, 7, 11, 13, 17...pN, but the formula might work somewhat with an incomplete sequence of primes.

    Have I discovered anything new here? The equation is so simple and effective that it must have already been found.
  2. jcsd
  3. May 13, 2009 #2
    The above formula has been used to prove that there are an infinite number of primes and is well known. Unfortunately I believe the larger n is the less chance that the number is prime even though it is clear that all primes up through the Nth prime do not divide this number.
  4. May 13, 2009 #3


    User Avatar

    Staff: Mentor

    2*3*5*7*11*17-1 = 107*367

    (you are not the first one with this idea :wink:)
  5. May 13, 2009 #4


    User Avatar
    Science Advisor
    Homework Helper

    See http://www.research.att.com/~njas/sequences/A005265 [Broken] and related sequences.
    Last edited by a moderator: May 4, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook