Existence of a function for the n-th prime

In summary, the conversation discusses the idea of finding a function for the nth prime and the challenges surrounding its efficiency. The existence of such a function is currently unknown, and there are some attempts and theories surrounding it, but no definite solution has been found. The conversation also mentions the function \pi(x) which calculates the number of primes less than or equal to x, but its calculation is not simple. Overall, the conversation raises the question of whether a more efficient prime finding function is possible and discusses some potential avenues for further exploration.
  • #1
clint222
36
0
Hello!

This question may seem silly. I'm a first year engineering and computer science student, not a mathematics student. I have only recently become interested in prime numbers, factorization algorithms, and prime number finding algorithms. I know only extremely elementary number theory, so forgive my ignorance.

I understand the idea behind the Sieve of Eratosthenes, and I realize that there are a variety of similar but more efficient, based on the same general idea.

I had been interested in the idea that a function for the nth prime exists. That is, a function which could be used to directly all of the prime numbers. For example, something of the form p(n), where p(1) = 2, p(2) = 3, etc. I mean one that doesn’t require knowing all of the primes before n, like integer sieves require.

A number theory textbook I have says that no such function has ever been found, and it is likely impossible for such a function to exist. It does discuss some recursive functions that can calculate the nth prime, but they are actually quite a bit less efficient to find prime numbers than a simple integer sieve.

I was wondering if there is any reason why a more efficient prime finding function is thought to be impossible. Or is it simply that evidence of such a thing hasn't been found so it probably isn't possible? I know that this type of function has been of interest for a very long time.

Thanks for helping me learn more about number theory!

Clint
 
Physics news on Phys.org
  • #2
Well, there is a function: Let p map from the natural numbers to the natural numbers, and let p(n) be defined as the nth prime. There it is.
The problem is: We have no idea how to calculate p(n) efficiently. And as all attempts so far failed - even for weaker requirements* - it might be impossible to find an efficient way to calculate it. In general, prime numbers do not follow any nice patterns.

*like a function p'(n) which just gives some primes in ascending order, not all. Even that would be a surprise.
 
  • #3
You might be interested in reading the Wikipedia article titled Formulas for Primes.
 
  • #4
has not been found does not necessarily mean does not exist. I suggest you try to come up with a formula and see what kind of problem you run into.
 
  • #5
There is a function [itex]\pi[/itex](x) that takes the natural numbers as its input and outputs the number of primes less than or equal to x.

There are some nice properties of this function. For instance, the growth rate as x approaches infinity approaches x/lnx
 
  • #6
Jack Jenkins said:
There is a function [itex]\pi[/itex](x) that takes the natural numbers as its input and outputs the number of primes less than or equal to x.

There are some nice properties of this function. For instance, the growth rate as x approaches infinity approaches x/lnx
Unless [itex]\pi[/itex](x) is viewed as an approximation only, there is no simple way known to calculate it, just as there is no known way to simply output the nth prime, given n.
 
  • #7

1. What is the n-th prime number?

The n-th prime number refers to the prime number that appears in the n-th position in the sequence of all prime numbers. For example, the 5th prime number is 11, as it is the 5th number in the sequence of prime numbers (2, 3, 5, 7, 11, etc.).

2. Why is the existence of a function for the n-th prime important?

The existence of a function for the n-th prime is important because it allows us to efficiently calculate the n-th prime number without having to list out all the preceding prime numbers. This can be useful in various mathematical and computational applications.

3. Is there a known function for the n-th prime?

No, there is currently no known function that can accurately calculate the n-th prime number for any given value of n. However, there are various algorithms and formulas that can approximate the n-th prime with increasing accuracy as n gets larger.

4. Why is it difficult to find a function for the n-th prime?

It is difficult to find a function for the n-th prime because prime numbers do not follow a simple pattern or formula. They are unpredictable and randomly distributed, making it challenging to find a function that can accurately calculate them for all values of n.

5. Are there any ongoing research or efforts towards finding a function for the n-th prime?

Yes, there are ongoing research and efforts towards finding a function for the n-th prime. Many mathematicians and computer scientists are actively working on developing algorithms and formulas that can better approximate the n-th prime number. However, due to the complexity of prime numbers, it is a challenging problem that has not yet been fully solved.

Similar threads

  • Linear and Abstract Algebra
Replies
11
Views
1K
Replies
5
Views
416
  • Programming and Computer Science
Replies
22
Views
757
  • Precalculus Mathematics Homework Help
Replies
9
Views
1K
  • Linear and Abstract Algebra
Replies
8
Views
897
  • Linear and Abstract Algebra
Replies
2
Views
1K
Replies
1
Views
765
Replies
10
Views
1K
  • Programming and Computer Science
Replies
14
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
32
Views
3K
Back
Top