A prime generator I discovered

In summary, the conversation discusses a formula that can generate more primes than Mersenne's method, but it requires knowledge of all primes up to the Nth prime. The formula may also produce only primes and has been used to prove the infinity of primes. However, it is not a new discovery and has been previously explored.
  • #1
Loren Booda
3,125
4
Somewhere between brute force and Mersenne derivation of primes is the formula I found,

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

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.
 
Physics news on Phys.org
  • #2
Loren Booda said:
Somewhere between brute force and Mersenne derivation of primes is the formula I found,

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

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.
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.
 
  • #3
2*3*5*7*11*17-1 = 107*367

(you are not the first one with this idea :wink:)
 
  • #4
See http://www.research.att.com/~njas/sequences/A005265 and related sequences.
 
Last edited by a moderator:

1. What is a prime generator?

A prime generator is a mathematical algorithm or process that generates prime numbers. Prime numbers are positive integers that are only divisible by 1 and itself, making them important in many areas of mathematics and computer science.

2. How does your prime generator work?

My prime generator works by using a specific algorithm or formula to identify and generate prime numbers. This algorithm may involve techniques such as sieving, trial division, or other mathematical operations.

3. What makes your prime generator unique?

My prime generator is unique because it uses a novel approach or algorithm to generate prime numbers. It may also have specific features or optimizations that make it faster or more efficient compared to other prime generators.

4. Can your prime generator generate all prime numbers?

No, my prime generator may have limitations in terms of the maximum size or range of prime numbers it can generate. However, it can generate a large number of prime numbers within its capabilities.

5. How can your prime generator be useful?

My prime generator can be useful in many areas of mathematics, computer science, and cryptography. It can be used to generate large prime numbers for encryption or to test the primality of numbers in various mathematical problems.

Similar threads

  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
6
Views
3K
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Linear and Abstract Algebra
Replies
16
Views
3K
  • Linear and Abstract Algebra
Replies
8
Views
4K
Replies
1
Views
948
Replies
1
Views
3K
  • Linear and Abstract Algebra
Replies
7
Views
3K
  • Linear and Abstract Algebra
Replies
7
Views
4K
  • Linear and Abstract Algebra
Replies
8
Views
3K
Back
Top