Is there any formula or function to express a prime as the nth prime?
For example, if I have "7", I can say it's the 4th prime number. (2,3,5,7)
If I have a large prime number, like 8161 or something, how can I find which numbered prime it is (without going through and counting all the primes)?
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
@Vinayak Srivastava, @Frisk Dreemurr, @Yajat Shamji @Páll Márton LOLOLOLOLOLOL
@Akshaj Gopalakrishnan - Don't mind my antics, here's a link :)
Log in to reply
There are some function to calculate approximately how many prime numbers are in a given intervall. But there is no fomrula to calculate the nth prime number. Maybe a good dream yet :) We are waiting for @Percy Jackson lol
Log in to reply
formula and not fomrula
Log in to reply
Log in to reply
Log in to reply
@Páll Márton ???
Really??? What is the 345th prime number Mr.Log in to reply
Log in to reply
@Páll Márton
Ok, its 2333 :)Log in to reply
Log in to reply
Log in to reply
nth prime=1+m=1∑2n[[1+π(m)n]n1]
Log in to reply
Log in to reply
mmax=2325?
So if n=345, thenLog in to reply
Log in to reply
@Páll Márton
Log in to reply
I gave a link. Mr. Sir pinky(sierpinsky) has made a formula :) @Páll Márton
Oh wow that's complicated. Thanks! That helps!
Log in to reply
No prob :)
lmgtfy lol
Log in to reply
lmgtfy always doesn't help
Log in to reply
It did now :)
I wasn't sure what to ask google lol. I don't remember what exactly I googled, but I just got algorithms to find the nth prime.
Have you tried the prime-counting function?:
π(x)
@Akshaj Gopalakrishnan
Log in to reply
That's exactly what I needed! Thanks!
Log in to reply
No problem!
Here is an example:
π(4)=1,2,3,4=2,3=2
Log in to reply
Log in to reply
Log in to reply
Log in to reply