Ask your own question, for FREE!
Mathematics 17 Online
ganeshie8 (ganeshie8):

proof of nth prime formula

ganeshie8 (ganeshie8):

the \(n\)th prime \(p_n\) is given by : \[p_n = 1+\sum\limits_{k=1}^{2^n} \left\lfloor \sqrt[n]{\dfrac{n}{1+\pi(k)}}\right\rfloor\] where \(\pi(x) \) = number of primes not exceeding \(x\)

ganeshie8 (ganeshie8):

I know it is a pretty useless formula. I am just trying to prove the formula... Do you know how to prove it or got any nice references for the proofs ?

ganeshie8 (ganeshie8):

I found the formula from here http://mathworld.wolfram.com/PrimeFormulas.html

OpenStudy (dan815):

it kinda looks like a geometric relationship with the nth root thing

OpenStudy (dan815):

geometric mean stuff coming in for these number of primes

imqwerty (imqwerty):

what i know is -> \(n^{th}\) prime can be written like this- \(\large p_n=p_1.p_2.p_3....p_{n-1}+1\) \[p_n=\prod_{i=1}^{n-1}p_i+1\] so basically we need to prove that the part under the sigma notation is nothing but the product of \(1^{st}\) n-1 primes

OpenStudy (dan815):

what noo it cant xD

OpenStudy (serenity74):

No Qwerty you are wrong smh

OpenStudy (dan815):

that might be or not be a prime, but it is not that nth prime

ganeshie8 (ganeshie8):

yeah that expression cannot be a prime because it is even

OpenStudy (dan815):

well it is still odd because there is a 2 which is a prime in there

OpenStudy (dan815):

that expressionj is from the euler thing to show infinite prime

OpenStudy (dan815):

or euclid i forgot who showed that

ganeshie8 (ganeshie8):

Oh, right!

OpenStudy (serenity74):

i am lost

OpenStudy (serenity74):

u lost me with that ec-word

imqwerty (imqwerty):

this expression- \(\large p_n=p_1.p_2.p_3....p_{n-1}+1\) ?? it has to be a prime because (B there is no factor of it except 1 and itself can u write this expression in factored form?

ganeshie8 (ganeshie8):

right, it is a prime, but it cannot give the nth prime

ganeshie8 (ganeshie8):

\(p_3 = 2*3+1 = 7\) is wrong

imqwerty (imqwerty):

oh yeah i get your point like we cannot get 13 and more yeahh

OpenStudy (dan815):

it doesnt haev to even be a prime technically be cause say the product is huge... there can be other primes not considered that might factor it

ganeshie8 (ganeshie8):

true, i should really think before typing haha

OpenStudy (dan815):

(2*3*5*7*11*13*17*19)+1=9699690+1 there are so many primes inbetween we didnt see

OpenStudy (dan815):

ahh hehe i do it all the time its fun

OpenStudy (serenity74):

lol danny you have a different idea of fun dan most of us do XD JJKJKJK I do calculus problems when i am bored..........is dat weird?

ganeshie8 (ganeshie8):

It isn't weird, calculus is so much fun

OpenStudy (serenity74):

: ) I love you ganeshie :p u made feel un-weird XD

ganeshie8 (ganeshie8):

Wilson's theorem : \(\dfrac{(n-1)!+1}{n}\) is an integer if and only if \(n\) is a prime.

ganeshie8 (ganeshie8):

Using above theorem, we can express \(\pi(x)\) as \[\pi(n) = \sum\limits_{k=2}^{n}\cos^2\pi\dfrac{(k-1)!+1}{k}\]

imqwerty (imqwerty):

dan it will be prime suppose \(\large p_n=p_1.p_2.p_3....p_{n-1}+1\) suppose its not a prime and it has some prime factors then that factor must divide this expression lets call that factor as -> \(p_{\alpha}\) \(p_{\alpha}\) is clearly smaller than \(p_n\) and thus it will come into that expression like this somewhere- \(\large p_n=p_1.p_2.p_3..p_{\alpha}..p_{n-1}+1\) now \(p_{\alpha}\) must divide \(p_n\) so- \[\large p_n=\underbrace{\frac{p_1.p_2.p_3...p_{apha}.p_{n-1}}{p_{\alpha}}}+\frac{1}{p_{\alpha}}\] \(p_{\alpha}\) will divide this but \(p_{\alpha}\) will not divide 1 so it has no prime factors thus \(p_n\) is prime

ganeshie8 (ganeshie8):

That doesn't work you're assuming that your expression gives the \(n\)th prime, which is wrong.

imqwerty (imqwerty):

oh okay i get ur point completely now

ganeshie8 (ganeshie8):

here is a counterexample http://www.wolframalpha.com/input/?i=factor+2*3*5*7*11*13%2B1

ganeshie8 (ganeshie8):

We can only say this : the expression \(p_1.p_2.p_3....p_{n-1}+1\) is not divisible by any of the primes \(p_1, p_2, \ldots, p_{n-1}\).

OpenStudy (empty):

I was thinking since we are using \(\pi(n)\) instead of trying to figure it out I was thinking maybe I could just use this to come up with my own prime function since it has all the information we need. I came up with this _almost_ formula. \[f(n) = (n+1)^{\pi(n)-\pi(n-1)} -1\] It doesn't really give the nth prime, instead it essentially takes the backwards difference \(\Delta \pi(n)\) which is 1 if n is prime and 0 if n isn't prime. So really f(n) is equal to n if n is prime and it's equal to 0 if it's not prime. Or simpler, I could have written it as: \[f(n) = n^{\Delta \pi(n)} \] Where f(n)=n when n is prime and 1 otherwise. Clearly this sorta thing isn't just for primes, we could have something like \(s(n)\) which counts the number of Fibonacci numbers less than n instead of \(\pi(n)\) and then f(n) either equals a Fibonacci number or 1. --- My other attempt as something similar, but also didn't quite work, it ends up just regenerating the same prime counting function haha: \[\pi(n) = \sum_{k=1}^n \frac{1-(-1)^{\Delta \pi(n)}}{2}\] Example: remember \(\Delta \pi(n) = \pi(n)-\pi(n-1)\), \[\pi(4) = \frac{1-(-1)^{\Delta \pi(1)}}{2} + \frac{1-(-1)^{\Delta \pi(2)}}{2} + \frac{1-(-1)^{\Delta \pi(3)}}{2}+ \frac{1-(-1)^{\Delta \pi(4)}}{2} \] \[\pi(4) = \frac{1-(-1)^{0}}{2} + \frac{1-(-1)^{1}}{2} + \frac{1-(-1)^{1}}{2}+ \frac{1-(-1)^{0}}{2} \] \[\pi(4) = 0+1+1+0 = 2\] Anyways, just some fun ideas in trying to recreate the formula that end up seeming to really just be more or less specific cases of functions that describe arbitrary sequences. Heh. I'll keep playing with this original problem though.

ganeshie8 (ganeshie8):

Very interesting! In the nth prime formula, \(\pi(n)\) is defined as : \[\pi(n) =\sum\limits_{k=2}^{n}\cos^2\pi\dfrac{(k-1)!+1}{k} \] which is as useless as the actual nth prime formula. it is just another version of wilson's theorem. doesn't tell us anything new...

ganeshie8 (ganeshie8):

Does this work ? \[\pi(n) = \sum\limits_{k=1}^n \frac{1-(-1)^{\Delta \pi(n)}}{2} =\sum\limits_{k=1}^n \Delta \pi(n) \]

ganeshie8 (ganeshie8):

Ahh telescoping !

ganeshie8 (ganeshie8):

I feel all these so called formulas for nth primes/prime counting are just expressing the problem in sum notation. They are not really formulas... They are not reducing any effort hmm

OpenStudy (perl):

I am confused on how to read this formula, for the characteristic function of the prime numbers. http://mathworld.wolfram.com/images/equations/PrimeFormulas/Inline23.gif the formula comes from this page http://mathworld.wolfram.com/PrimeFormulas.html There are two types of brackets, and the outer one looks like floor, the inner one I am not sure

ganeshie8 (ganeshie8):

Oh right, we need the outer to be floor so that we get 0 when cos^2 is not 1 : \[\pi(n) =\sum\limits_{k=2}^{n}\left\lfloor\cos^2\pi\dfrac{(k-1)!+1}{k} \right\rfloor\]

OpenStudy (perl):

the inner bracket is just a bracket, like a parenthese

OpenStudy (perl):

i got confused, some people use that as a floor symbol as well :)

OpenStudy (perl):

by the way i found this interesting formula $$ \large p_n=1+\sum_{r=1}^{2^n}\left\lfloor \sqrt[n]{n}-\sqrt[n]{\sum_{s=1}^{r}\left(\cos\left(\pi\frac{(s-1)!+1}{s}\right)\right)^2}\right\rfloor$$

ganeshie8 (ganeshie8):

Yeah, baiscally \(\dfrac{(k-1)!+1}{k}\) is integer only when \(k\) is a prime therefore \(\cos^2 \pi \dfrac{(k-1)!+1}{k} \) evaluates to \(1\) when \(k\) is a prime and it evaluates to something between 0 and 1 when \(k\) is composite

OpenStudy (perl):

i see, thats using wilson's theorem

ganeshie8 (ganeshie8):

Your formula looks interesting! it looks like a simplified version..

OpenStudy (perl):

yes. though, if we could find a computationally simple formula, it would render encryption obsolete

OpenStudy (perl):

nice :)

OpenStudy (perl):

I neglected to post the link from which I obtained that formula. http://math.stackexchange.com/questions/1257/is-there-a-known-mathematical-equation-to-find-the-nth-prime

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!