Number of Primes between two integers

In summary, there is no exact formula for calculating the number of primes between two integers. However, as the numbers approach infinity, the Prime Number Theorem provides a good estimation. The use of pi(n) can also help construct a formula for the number of primes, but it may be classified as an algorithm. The quest for a formula that accurately represents the distribution of primes using only two integer limits continues.
  • #1
Cheung
3
0
Is there a formula to calculate the EXACT number of primes between two integers? There are many very good ways of ESTIMATING the number but I have found very few that give the EXACT number, and those that do essentially require the knowledge of primes before hand (Legendre and Miessel.) While those are all nice I am looking for a formula (not an algorithm) that will spit out the EXACT number of primes by knowing only the two boundaries. Has it been done?
 
Mathematics news on Phys.org
  • #2
Exact? No. But as the numbers in question approach infinity, they behave more accordingly to the Prime Number Theorem.
 
  • #3
With the use of pi(n) you could easily construct a forumula for the number of primes between two integers i and j. However, I imagine that you would classify pi(n) as being an "algorithm" rather than a "formula".

http://mathworld.wolfram.com/PrimeCountingFunction.html
 
  • #4
Thank you both for your reply's and to jbriggs444 I would consider using the logarithmic pi(x) an algorithm. I am looking for a formula/ function that would shed more light on the distribution of primes by solving for the number of primes using only the two integer limits.
 
  • #5


Thank you for your question. The exact number of primes between two integers is a well-studied and challenging problem in mathematics. While there are many ways to estimate the number of primes between two integers, there is currently no known formula that can give the exact number of primes without prior knowledge of primes.

As you mentioned, the Legendre and Meissel formulas are two well-known methods for estimating the number of primes between two integers. These formulas rely on the prime counting function, which counts the number of primes less than or equal to a given number. However, both of these formulas require prior knowledge of primes, so they cannot give the exact number of primes without this information.

There are also other methods, such as the Riemann zeta function and the prime number theorem, that can be used to estimate the number of primes between two integers. However, these methods also require prior knowledge of primes and cannot give the exact number.

In conclusion, while there are various methods for estimating the number of primes between two integers, there is currently no known formula that can give the exact number without prior knowledge of primes. This is an active area of research in mathematics, and it is possible that a formula for the exact number of primes may be discovered in the future.
 

1. How do you determine the number of primes between two integers?

The number of primes between two integers can be determined by using the Sieve of Eratosthenes algorithm. This involves creating a list of all the numbers between the two integers and crossing out all multiples of each prime number until only prime numbers remain. The remaining numbers are then counted to determine the number of primes between the two integers.

2. Is there a formula to calculate the number of primes between two integers?

No, there is no known formula to directly calculate the number of primes between two integers. However, the Prime Number Theorem states that the number of primes less than a given number n is approximately n/ln(n). This can be used as an estimate, but it is not a precise formula.

3. Can the number of primes between two integers be negative?

No, the number of primes between two integers cannot be negative. Primes are defined as positive integers that are only divisible by 1 and themselves. Therefore, the number of primes between two integers will always be a positive integer or zero.

4. How does the size of the two integers affect the number of primes between them?

The size of the two integers does not necessarily affect the number of primes between them. However, as the integers become larger, the number of primes between them will also increase. This is because there are more numbers to be considered and more potential prime numbers within that range.

5. Can there be an infinite number of primes between two integers?

It is possible for there to be an infinite number of primes between two integers. This is because there are an infinite number of prime numbers in general, and as the two integers become larger, the likelihood of there being more prime numbers between them also increases.

Similar threads

Replies
6
Views
774
Replies
8
Views
1K
Replies
9
Views
2K
  • Programming and Computer Science
Replies
14
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
32
Views
3K
  • General Math
Replies
2
Views
3K
  • General Math
Replies
7
Views
3K
Replies
4
Views
253
Back
Top