# Integration over primes

Sorry i don't know if this thread should be or in the "Number theory" forum, in fact if you want to calculate the series over all primes:

$$\sum_{p} f(x)$$ this can be very confusing as you don't know the "density" of primes my question is if we can approximate such series by the integral:

$$\int_ {2}^{\infty}dx P(x)f(x)$$ where $$P(x)\sim 1/log(x)$$. (since for x<2 there are no primes )

The definition for P(x) is the "probability" of a random integer to be a prime (obviously x>0 ), the integral above could be then considered as the "sum" of the series as an approximation..is this possible or coherent?.   Last edited:

## Answers and Replies

There are two approaches that I can think of off the top of my head on how you might be able to do this:

One is based on the link you showed me that relates prime numbers to quantum physics. http://en.wikipedia.org/wiki/Hilbert-Pólya_conjecture.

Below is an excerpt from the link above that states that the distribution of the zeros of the zeta function obey statistics of the, and I quote, “so-called Gaussian Unitary Ensemble.” Since the Riemann zeta function is related to the distribution of primes, you might study the statistics of the Gaussian Unitary Ensemble to see if you might be able to apply them to creating the probability function you are looking for.

Code:
“Dyson saw that the statistical distribution found by Montgomery was exactly the same as the pair correlation distribution for the eigenvalues of a random Hermitian matrix. Subsequent work has strongly borne out this discovery, and the distribution of the zeros of the Riemann zeta function is now believed to satisfy the same statistics as the eigenvalues of a random Hermitian matrix, the statistics of the so-called Gaussian Unitary Ensemble.”

The second approach I would take, which you might want to start with, is based on the following well known result in Number Theory. Namely, it was proved that for any integer n greater than or equal to 2, there exists at least one prime number between n and 2n. Starting with the integer n = 2, and create a sequence consisting of intervals as follows:

I_1 = (2 < p < 2*2) = (2 < p < 4)

I_2 = (3 < p < 2*3) = (3 < p < 6)
.
.
I_n = (n+1<p <2n+2)

The probability that 1 prime will exist in each of the intervals is 100%.

Similarly, the probability that 2 primes will exist in the union of any two intervals above will also be 100%..etc. The chances that a random number picked out of one of these intervals is prime is 1/(the number of elements in the double open interval).

For I_1, the probability is 100% because only 1 number exists in this interval, namely the number 3, and thus it must be a prime number.

Other questions one might ask is “what is the probability that 3 primes will exist in the union of two intervals above?” Does this probability increase with the size of the two prospective intervals? (The answer to the second question I think is yes) …etc.

Similarly, you could study z(x,y) = sin(pi*x)^2 + sin(pi*y/x)^2 = 0.

When ever y is an integer, the only way for z(x,y) to be zero is for x to be an integer and to divide y evenly. So, the level curves of the function for z = 0 must run through all points (x,y) that satisfy the condition y/x = an integer, and x is an integer. You might be able to extract some useful information by analyzing such functions.

I hope some of this helps.

Best Regards,

Edwin

Actually, I should make one slight correction:

Code:
The chances that a random number picked out of one of these intervals is prime is 1/(the number of elements in the double open interval).
is not entirely correct. Actually, the chances that a random number picked out of one of these intervals is prime is "atleast" 1/(the number of elements in the double open interval). This is because the chances that a number picked at random out of an interval is prime increases with the size of the interval chosen.

Just another thought.

Best Regards,

Edwin

Edwin said:
Actually, I should make one slight correction:

Code:
The chances that a random number picked out of one of these intervals is prime is 1/(the number of elements in the double open interval).
is not entirely correct. Actually, the chances that a random number picked out of one of these intervals is prime is "atleast" 1/(the number of elements in the double open interval). This is because the chances that a number picked at random out of an interval is prime increases with the size of the interval chosen.

Just another thought.

Best Regards,

Edwin

well that's not quite right either. As you correctly point out the probability that n is prime if $2<n<4$ is 1, while, for example, the probability that n is prime if $16<n<32$ is only 1/3 (there are 5 primes in there). In fact the prime number theorem will tell you that

$$\lim_{n\rightarrow \infty} \frac{\pi (2n) - \pi (n)}{n} = 0.$$

(and in fact $\lim_{n\rightarrow \infty} \pi (n)/n = \lim_{n \rightarrow \infty} 1/\ln{n} = 0$).

This is true: "Actually, the chances that a random number picked out of one of these intervals is prime is 'atleast' 1/(the number of elements in the double open interval)."

The reason is simply that you can have more than one prime in the intervals. The probability doesn't get larger for larger intervals (in general) though.

Last edited:
That's interesting. You've shown that the density of primes in an interval (n, 2n) decreases without bound as the size of the interval (n,2n) approaches infinity. Is this correct?

Inquisitively,

Edwin

as I said, it follows from the prime number theorem:

$$\pi(n) \sim \frac{n}{\ln{n}},$$

or even better, $\pi(n) \sim \mbox{Li}(n)$

($\sim$ just means that as n gets large the ratio of the two goes to 1)

or in other words that the density of primes, $\pi(n) / n$ is asymptotic to 1/ln(n), which goes to 0. What I said in the last post follows from that pretty trivially.

If you want to read some qualitative stuff just check out the mathworld page: http://mathworld.wolfram.com/PrimeNumberTheorem.html

Last edited:
Well my question is if taking into account PNT theorem then we would have that either $$\sum _ p f(x) \sim \int_ 2 ^{\infty} dx \frac{f(x)}{log(x)}dx$$ or $$\sum _ p f(x) =O(\int_ 2 ^{\infty} dx \frac{f(x)}{log(x)}dx)$$

Where in both cases the sum is extended over all primes and the notation used here is "asymptotic equality" or "Big-O notation"....this could be useful to deal with Goldbach-conjecture as:

$$I(N)=\int_{0}^{1} dx T^3 (x) e^{-2\pi i N x}$$ where the T(x) function is the sum over all primes less or equal than N (odd number) for the function $$f(x)=e^{2 \pi i x}$$ or something similar..

Last edited:
your notation is a little misleading, you're asking whether various limits (so, either numbers or limits that don't exist) are asymptotic to each other!

I am going to assume that what you really mean is something like "can we say that

$$\sum_{x \in \mathbb{P}_n} f(x) \sim \int_2^{p_n} \frac{f(x)}{\ln{x}}dx$$

where $\mathbb{P}_n$ is the set of the first $n$ primes and $p_n$ is the nth prime (for suitably well-behaved $f$)."

If that's a correct interpretation of what you mean then I don't think you're going to be able to say too much about it easily. In order for it to be true the restrictions on $f$ are going to have to be pretty strict (if $f$ is constant it's true of course, but I don't know what other functions will work - try some examples with things like $e^x$ or $e^{-x}$ for large $n$ [with a computer], and you'll see that the ratio doesn't seem to be getting anywhere near 1 - as a matter of fact if $f(x)=e^{-x}$ then the sum over the first $n$ terms quickly exceeds the integral over all $x$, so that's an honest-to-goodness counterexample, even if you restrict $f$ to be continuous and positive and monotone).

Last edited:
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
Define:

$$r(x) := \frac{x}{\ln x}$$

and let q be the inverse of r. Then, roughly speaking:

$$n = \pi(p_n) \sim \frac{p_n}{\ln p_n} = r(p_n)$$

so that

$$p_n \sim q(n)$$

Then,

$$\sum_{i = 1}^n f(p_i) \sim \sum_{i = 1}^n f(q(i)) \sim \int_1^n f(q(x)) \, dx \sim \int_{q(1)}^{q(n)} f(u) \frac{\ln u - 1}{(\ln u)^2} \, du \sim \int_{2}^{p_n} \frac{f(u)}{\ln u} \, du$$

But let me emphasize that I said roughly speaking.

With the right conditions on f, each step of this is something you should be able to handle rigorously. You can replace all of those hand-waving "~" with an actual theorem and obtain something that will actually be correct.

Let me get you started. We can replace the intuitive

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

with the accurate

$$\frac{7 n}{8 \ln n} < \pi(n) < \frac{9 n}{8 \ln n}$$

Last edited:
Uh..then i was wrong in fact sometimes i have several problems to distinguish the sum over all primes less than x $$\sum_{p<x}f(x)=S(x)$$ and the sum over the first n-primes as you pointed $$\sum_{i=1}^{N} f(p_i )$$ although i think that $$\sum_{i=1}^{N} f(p_i ) =S(p_N)$$

shmoe
Science Advisor
Homework Helper
Treating the primes as a random sequence gets done all the time for heuristic arguments, this is the Cramer model where you consider the probabilities any given numbers are prime as independant. This is of course not true in a few ways, the primes aren't random, and the probabilities aren't independant, we know one of n or n+1 is not prime for example. You often get the right answer for this approach (consider the sum of the reciprocals of the primes), but it does not always work (known to fail for primes in 'short' intervals) and this can't be considered a proof of any kind.

There are numerous ways to handle sums over primes, you might want to start with Iwaniec and Kowalski's analytic number theory text (I've mentioned a few times) with the chapter appropriately titled "Sums Over Primes" for an overview.