# What is the average prime numbers we've found till now?

When you count from 0 to 100 you have 25% prime numbers. Till now the largest prime consists of $2^{74,207,281}-1$ numbers. But is known what the average is till now?

With average I just mean the amount of prime numbers comparing to the total numbers till the value of the last prime number. So from 1 to 100 there are 25 prime numbers. Probably the average is decreasing. I don't know how many prime numbers there are between 100 and 200 but imagine that there are 15 prime numbers. So from 1 to 200 we have an average of 25+15=40 on a total of 200 numbers so the average is dropped to 20%. If you go on till the last known prime number (2^{74,207,281}-1) what would then be the average on the total numbers till that last prime number.

I suppose because there is an infinite amount of prime numbers the average will drop close to zero, supposing too that the amount of prime numbers is more and more decreasing

I don't think this is a soft question because I think there is an objective answer on it possible. But how to calculate?

• Average what? Frequency or value? – user237392 May 5 '16 at 19:26
• Try looking up the prime number theorem. – almagest May 5 '16 at 19:27
• This is arguably a duplicate of the following old question: math.stackexchange.com/q/194/137524 (though I haven't marked it as such as yet). – Semiclassical May 5 '16 at 19:36
• Correct,a duplicate. – user242559 May 5 '16 at 20:01
• It seems like the question has two parts: "What is the largest prime for which we know all the primes less than it and how many primes are there actually less than it?" Then one could compute an average for primes less than or equal to that prime number. I would be curious what the answer is as well as the source for such information. – Frank Hubeny May 5 '16 at 20:28

We do not have $2^{74,207,281} − 1$ prime numbers by now. Instead, the largest number about which we know that it is a prime is $p=2^{74,207,281} − 1$. The actual number of primes of to $p$ should be around $p/\ln p$, but we do not "know" all of these in the sense that each of them has been computed by someone. Rather, those record-breaking primes are found by trying numbers matching patterns that are much rarer than being prime 8and that's also why we can even write done the 22,338,618 digit number $p$ with just a handful of symbols). Even if we had managed to write a prime on every single particle of the known Universe, that would mean we "know" only $10^{80}$ primes. Even then, the largest known prime $p$ contributes $p/10^{80}\approx 10^{22,338,538}$ to the average. On the other hand, the next largest known prime number today is $2^{57,885,161} – 1$, which is smaller than $p$ by a factor so much larger that $10^{80}$ that for all practical purpuses we can say that the average of all known primes is just $2^{74,207,281} − 1$ divided by the number of known primes and hence it is a number somewhere between $10^{22,338,538}$ and (because certainly more than $10^8$ primes are known) $10^{22,338,610}$.

There have been various attempts at approximating the Prime Counting Function $\pi(x)$ which gives the number of primes $\leq x$. A simple approximation is

$$\pi(x)\sim \frac{x}{\ln x}$$

We can get an approximation of the long-run frequency of primes by looking at:

$$\lim_{n \to \infty} \frac{\pi(n)}{n} \approx \lim_{n \to \infty} \frac{n}{n\ln(n)} = \lim_{n \to \infty} \frac{1}{\ln n} = 0$$

Since the number of primes grows at a sub-linear rate (at least asymptotically), then they become exceedingly rare as a fraction of the numbers up to $N$.

As for the "average value" of the primes, it has been shown that there are infinitely many primes, so the average value of all primes is $\infty$.

• In agreement with the last sentence, the Mathworld entry on Prime Sums notes that it was shown (Bach and Shallit, 1996) that $\sum_i^n p_i \sim \frac12 n^2 \ln n$ where $p_i$ is the $i$th prime. Consequently the average value of the first $n$ primes diverges like $n\ln n$. – Semiclassical May 5 '16 at 19:53
• @Semiclassical great link to getting an actual rate for divergence. I was just using the fact that primes are positive unbounded, so a strict average of primes would diverge. – user237392 May 5 '16 at 23:52