Aren't There Any Formulas for Prime Numbers?

In summary, the conversation discusses various formulas that have failed to produce all prime numbers for any given whole number, and the question of whether there are any formulas that can do so. The concept of a formula for primes is explored and it is concluded that currently, there is no known formula that can efficiently generate all prime numbers. The discussion also touches on the fascination and difficulty of discovering prime numbers.
  • #1
79
9
Hello all,

We know that following formulas failed to produced all prime numbers for any given whole number ##n##:

  1. ##f(n) = n^2 - n - 41##, failed for ##n = 41~(f = 1681)##
  2. ##g(n) = 2^(2^n) + 1##, failed for ##n = 5~(g = 4,294,967,297)##
  3. ##m(n) = 2^n - 1##, failed for ##n = 67~(m = 147,573,952,588,676,412,927)##
The question is: Are there any formulas that produce prime numbers for any given ##n## (without non-prime results), or aren't they?

Bagas
 
Mathematics news on Phys.org
  • #2
bagasme said:
Hello all,

We know that following formulas failed to produced all prime numbers for any given whole number ##n##:

  1. ##f(n) = n^2 - n - 41##, failed for ##n = 41~(f = 1681)##
  2. ##g(n) = 2^(2^n) + 1##, failed for ##n = 5~(g = 4,294,967,297)##
  3. ##m(n) = 2^n - 1##, failed for ##n = 67~(m = 147,573,952,588,676,412,927)##
The question is: Are there any formulas that produce prime numbers for any given ##n## (without non-prime results), or aren't they?

Bagas

https://en.wikipedia.org/wiki/Formula_for_primes
 
  • Like
Likes Klystron, kith and fresh_42
  • #4
bagasme said:
I see the floor function recursivemethod interested.
I'm not sure what this means.
bagasme said:
In that case, why ##f_1## need to be irrational?
Look at the denominators of the terms of the series expansion. What do you see?

Also, look again at the derivation of ##f_1##. Do you think this is really an interesting method of generating primes, or just a method of encoding primes that are already known?

I provide a new constant ##P_{buk} = 0.203005000700011...##. Derivation of the related prime generating formula is left to the reader.
 
  • Love
Likes jbriggs444
  • #5
There is no useful formula for primes known, i.e. a formula that could be used to find new prime numbers more efficiently than clever trial and error.
 
Last edited:
  • Like
Likes Janosh89
  • #6
Did you mean to include the word "known" in that sentence?
 
  • #7
It's always the current status of knowledge, a future proof of a nonexistence of such a formula would be really remarkable, but I added it explicitly for clarity.
 
  • #8
Ignoring computational complexity for the sake of discussion, use of various 'sieves' seems to tell us that the interval between successive prime numbers should increase as we employ successively larger divisors. Then we encounter twin primes where the next higher odd number is also prime. Primes have fascinated me since I learned multiplication.

As pbuk and other posters have described, we do not so much generate prime numbers as discover them; like a miner finding a gold nugget in the next pan of gravel. As a student I attempted to compare intervals among prime numbers to square numbers, triangle, Catalan, and other sequences with instructive but inconclusive results.
 

1. What are prime numbers?

Prime numbers are positive integers that are divisible only by 1 and themselves. They have exactly two divisors, making them unique compared to other numbers.

2. Why are prime numbers important?

Prime numbers are important in many fields, including mathematics, computer science, and cryptography. They are used in various algorithms and calculations, and their unique properties make them useful in encryption and security.

3. Are there any formulas for generating prime numbers?

There is no known formula for generating all prime numbers. However, there are some methods and algorithms that can help identify and find prime numbers, such as the Sieve of Eratosthenes and the AKS primality test.

4. How many prime numbers are there?

There is an infinite amount of prime numbers. As the numbers get larger, the gaps between prime numbers become more frequent, but there is no largest prime number.

5. Can prime numbers be predicted?

While there is no formula for generating prime numbers, there are patterns and trends that can be observed. However, these patterns do not allow for accurate prediction of prime numbers. Prime numbers are considered to be random and unpredictable.

Similar threads

Replies
5
Views
1K
Replies
4
Views
850
Replies
5
Views
830
  • General Math
Replies
23
Views
3K
Replies
35
Views
3K
Replies
7
Views
1K
Replies
1
Views
1K
  • General Math
Replies
9
Views
1K
  • General Math
Replies
2
Views
940
Back
Top