From: Apple Pi on 7 Aug 2005 07:49 Is there a formula that gives me the amount of Prime numbers in a Finite subset of N? In other words, is there a formula that, for every n (Natural number), gives us the number of primes < n? Thanks in advance, Apple Pi
From: Apple Pi on 7 Aug 2005 08:22 This looks like the answer I was looking for: http://en.wikipedia.org/wiki/P rime_number_theorem Cheers, Apple Pi
From: David C. Ullrich on 7 Aug 2005 08:39 On 7 Aug 2005 04:49:44 -0700, "Apple Pi" <apple3.1415926535897932384626(a)gmail.com> wrote: >Is there a formula that gives me the amount of Prime numbers in a >Finite subset of N? > >In other words, is there a formula that, for every n (Natural number), >gives us the number of primes < n? One "formula" for this is just pi(n). But that's not what you want, that's just a definition. Is there an "algebraic" formula for pi(n)? No. There is a well-known formula that gives a good _approximation_ to pi(n) for large n; that formula is n/log(n). The "prime number theorem" says that pi(n) ~ n/log(n) as n -> infinity (here f(n) ~ g(n) means that f(n)/g(n) -> 1.) >Thanks in advance, >Apple Pi ************************ David C. Ullrich
From: Apple Pi on 7 Aug 2005 09:01 That's brilliant David. Exactly what I was looking for. Cheers, Apple Pi
From: Roger Bagula on 7 Aug 2005 10:03
The Ramanujan formula is: PrimePi[n]~Sum[(-1)^(k-1)*k*(Log[x]/(2*Pi))^(2*k+1)/B(2*k,2*k-1),{k=1,Infinity}]/(Pi/4) B(2*k,m] are Bernoulli numbers The better approximation of the Prime number theorem is: PrimePi[n]~Integrate[1/Log[x],{x,2,Infinity}] Apple Pi wrote: > Is there a formula that gives me the amount of Prime numbers in a > Finite subset of N? > > In other words, is there a formula that, for every n (Natural number), > gives us the number of primes < n? > > Thanks in advance, > Apple Pi > |