## Number of primes...

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

taby
Posts: 154
Joined: Thu Nov 01, 2007 8:39 pm UTC

### Number of primes...

Where [imath]p_k[/imath] is the [imath]k[/imath]th prime number, the following ratio [imath]x[/imath] seems to settle toward some non-zero number:

[imath]\lim_{k \to \infty} \frac{k}{p_k} = x[/imath].

For example:
[imath]k = 1e0[/imath], [imath]p_k = 2[/imath], [imath]x = 0.5[/imath],
[imath]k = 1e1[/imath], [imath]p_k = 29[/imath], [imath]x \approx 0.344828[/imath],
[imath]k = 1e2[/imath], [imath]p_k = 541[/imath], [imath]x \approx 0.184843[/imath],
...
[imath]k = 1e10[/imath], [imath]p_k = 252097800623[/imath], [imath]x \approx 0.039667[/imath],
[imath]k = 1e11[/imath], [imath]p_k = 2760727302517[/imath], [imath]x \approx 0.036222[/imath],
[imath]k = 1e12[/imath], [imath]p_k = 29996224275833[/imath], [imath]x \approx 0.033338[/imath].

That is... For the integers 1 through 2 inclusive, 0.5 of them are prime. Likewise, for the integers 1 through 29996224275833, approximately 0.03 of them are prime.

Is anyone familiar with what [imath]x[/imath] settles on as [imath]k \to \infty[/imath]? What is this constant called? Does anyone have access to [imath]k > 1e12[/imath]?

Thanks for any help!
Last edited by taby on Wed Feb 25, 2009 8:58 pm UTC, edited 1 time in total.

Buttons
Posts: 858
Joined: Wed May 02, 2007 3:27 pm UTC
Location: Somerville

### Re: Number of primes...

I believe the constant is called "zero", and its decimal expansion begins 0.00000....

It is odd that the ratio would appear to remain "high" for such large values, but primes do not have positive density on the naturals, so it cannot converge to a positive number.

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

### Re: Number of primes...

The Prime Number Theorem says that the relative error of approximating [imath]p_k[/imath] with [imath]k \log k[/imath] is asymptotically zero, so:
$\lim_{k\rightarrow\infty} \frac k {p_k} = \lim_{k\rightarrow\infty}\frac 1 {\log k} = 0.$
It just goes to zero rather slowly.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

taby
Posts: 154
Joined: Thu Nov 01, 2007 8:39 pm UTC

### Re: Number of primes...

I see. Thank you stephentyrone for linking the concepts together for me.

Matterwave1
Posts: 226
Joined: Wed Aug 20, 2008 7:01 pm UTC

### Re: Number of primes...

I don't think k/pk is the number of primes in the first pk-integers that are prime. pk is the k'th prime number, not the number of primes below k...or have I missed something? Buttons
Posts: 858
Joined: Wed May 02, 2007 3:27 pm UTC
Location: Somerville

### Re: Number of primes...

Of the first pk integers, k of them are prime, namely p1 through pk.

taby
Posts: 154
Joined: Thu Nov 01, 2007 8:39 pm UTC

### Re: Number of primes...

Here [imath]p_k[/imath] is the [imath]k[/imath]th prime number. Here [imath]n[/imath] would denote any positive integer. In terms of the prime counting function [imath]\pi(n)[/imath], where [imath]n = p_k[/imath], it is simplified to [imath]\pi(p_k) = k[/imath]. The "long" version would be:

[imath]\lim_{k \to \infty} \frac{\pi(p_k)}{p_k} = 0[/imath].

So the equation I wrote was basically a ratio involving the number of primes and the number of positive integers. As pointed out by the others, this ratio is 0 for an infinitely large [imath]n[/imath] (or [imath]p_k[/imath], in this case).

I'm not sure if that's what you're referring to.

Matterwave1
Posts: 226
Joined: Wed Aug 20, 2008 7:01 pm UTC

### Re: Number of primes...

Buttons wrote:Of the first pk integers, k of them are prime, namely p1 through pk.

oh, got it. thanks. PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

### Re: Number of primes...

I recently posted a C program here that approximates the prime counting function, if you're interested. Can I have your prime number?

Here is the function compared to some actual values of Pi(x):
Spoiler:

Code: Select all

        The distribution of primes       --------------------------   x            Pi(x)      Riemann(x) 1E1                4               5 1E2               25              26 1E3              168             168 1E4            1,229           1,227  1E5            9,592           9,587 1E6           78,498          78,527 1E7          664,579         664,667 1E8        5,761,455       5,761,552 1E9       50,847,534      50,847,455 1E10     455,052,511     455,050,683