Somewhere between brute force and Mersenne derivation of primes is the formula I found,(adsbygoogle = window.adsbygoogle || []).push({});

[tex]\prod_{n=1}^Np_n-1=p_Z[/tex]

I guess it would generate more primes p_{Z}than Mersenne in a given interval, but requires knowledge of all primes to p_{N}, the Nth prime. It may produceonlyprimes, rather than Mersenne's hit-or-miss search. The p_{n}here are supposed to follow 2, 3, 5, 7, 11, 13, 17...p_{N}, 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.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# A prime generator I discovered

**Physics Forums | Science Articles, Homework Help, Discussion**