# Fourier complex series for Pi(x)

1. Dec 12, 2005

### eljose

i,m working on a method to obtain the Fourier series of the prime number counting function in the form :

$$\pi(x)=\sum_{n=-\infty}^{\infty}c_{n}e^{in\pi{x}/L}$$

the question is..would be this series useful?....we know that the prime number counting function is always an integer, so we only would need to know the function pi through the series with an error of 0.1 or 0.01 (so we shouln,t not take infinite terms), also with the aid of the series we could locate primes (as at x=p prime) the series exhibit Gib,s Phenomenon, also we could give asymptotic expressions for the sums:

$$\sum_{p}^f(x)$$ sum over all the primes p<L with L big.

2. Dec 12, 2005

### fourier jr

um... not sure what this means. does it even make sense?

3. Dec 12, 2005

### matt grime

That doesn't make sense but then on a more basic level fourier series are defined for periodic functions, or those defined on bounded intervals. well, just because it has such a fatal flaw doesn't mean that we shouldn't look, does it?

i wonder if at the end of this thread eljose will have some earth shattering discovery that we snobbish mathematicians can reject?

4. Dec 12, 2005

### CRGreathouse

Cipola (1902) gives an asymptotic formula for p_n which is good -- the error is on the order of $$\left(\frac{\lg\lg k}{\lg k}\right)^3$$. Dusart gives excellent bounds for pi(n).

I have no idea what your sum would even do; which variables are bound and to what?

5. Dec 13, 2005

### eljose

I refer to the fact that you could obtain an easy way to compute PI(x) by calculating the coefficients in the equation:

$$\pi(x)=\sum_{n}c_{n}e^{in\pi{x}/L}$$ let,s put L big so:

$$\pi(L)=Li(L)$$ where "Li" is the logarithmic integral, then the fourier series will give a representation of PI(x) on the interval (0,L) so we could calculate the values of Pi(x) for x going from 0 upto L.

sorry for my notation in my first post i wanted to say: $$\sum_{p}f(x)$$ where the sum is extended over all the primes p<L another good consequence of the Fourier series and Parseval indentity is:

$$\int_{0}^{L}dx[ \pi(x)]^2=\sum_{n}|c_{n}|^2$$ where the sum in n in all cases is over all the integers

Last edited: Dec 13, 2005
6. Dec 13, 2005

### Hurkyl

Staff Emeritus
If he does, then it will be closed or deleted. No point egging him on! :tongue2:

eljose: As matt said, $\pi(x)$ cannot be represented that way because it is not a periodic function. But I'm going to ignore that for a moment...

But we can only know that if we know that the sum of all of the terms we are not using add up to less than 0.1 or 0.01!

In other words, approximating $\pi(x)$ via:

$$\pi(x) \approx \sum_{n = -N}^N c_n e^{i n \pi x / L}$$

only works if

$$0 \approx \sum_{n = -\infty}^{-N-1} c_n e^{i n \pi x / L} + \sum_{n = N+1}^{+\infty} c_n e^{i n \pi x / L}$$

. Do you agree?

So the real question is how do you know that this latter approximation is good, for a given N?

In other words, to use this series to approximate $\pi(x)$, we absolutely, positively, must know a good way to know if the latter approximation is good. (That is, the sum of the tails is sufficiently small)

Do you agree?

If this was a power series, we have useful theorems about how they converge. However, I don't know any similarly useful criterion for a Fourier series. So, one might appeal to a common, generic technique that would prove

$$0 \approx \sum_{n = -\infty}^{-N-1} c_n e^{i n \pi x / L} + \sum_{n = N+1}^{+\infty} c_n e^{i n \pi x / L}$$

by proving

$$0 \approx \sum_{n = -\infty}^{-N-1} |c_n e^{i n \pi x / L}| + \sum_{n = N+1}^{+\infty} |c_n e^{i n \pi x / L}|$$

, as you might recall from your calculus classes. In our case, this reduces to

$$0 \approx \sum_{n = -\infty}^{-N-1} |c_n| + \sum_{n = N+1}^{+\infty} |c_n|$$

but we know that this cannot be true, because these are divergent sums! You could either see this directly from the original sum because the exponential term is bounded, and $\pi(x)$ is unbounded, or from your observation that:

$$\int_{0}^{L}dx[ \pi(x)]^2=\sum_{n}|c_{n}|^2$$

(assuming it was right).

Do you agree?

Basically, there is no obvious method to working out how many terms you need to add together in order to get an approximation of $\pi(x)$.

There's a general principle here, as I understand it: oscillating sums, such as this one, tend to converge very slowly. Thus, I would not expect this to be a good approach.

Incidentally, a keyword that you might remember is absolutely convergent. "Nice" sums are absolutely convergent. Your sum is not.

7. Dec 13, 2005

### shmoe

I'm almost afraid to ask, what is your "easy way" to get the coefficients? You can represent pi(x) by a fourier series on a finite interval, but how do you propose to find the fourier coefficients on this interval without a prior knowledge of pi(x) on this interval? You can find them knowing pi(x) on the interval, but this fourier series will of course be worthless outside this finite interval so it's not going to have any predictive power.

No matter how big L is, this equality is not guaranteed to hold. The prime number theorem gives an asymptotic approximation to pi(x), not an equality.

8. Dec 13, 2005

### matt grime

I'd prefer to state that as: no matter what Lis this equality will never hold. Size has nothing to do with it. But then eljose has never seemed to notice the difference between something and an *asymptotic* approximation...

9. Dec 13, 2005

### shmoe

I was trying to be careful with my wording because equality actually holds infinitely often. littlewood showed that pi(x)-Li(x) takes on positive and negative values for arbitrarily large values of x, so it has to equal 0 when it changes from positive to negative (always the slim possibility that a sign change the other way happens at a point of discontinuity)

If we repeat "it's an asymptotic enough times" we might not have to say it again.

10. Dec 14, 2005

### matt grime

Ah, but, I was using the "never holds" in the sense of measure theory (cough, no, honest...)

11. Dec 14, 2005

### shmoe

It's definitely true in an almost everywhere sense, given that pi(x)-li(x) is discontinuous at primes and steadily decreasing everywhere else.

To kick this "equality" thing in the pants one more time, pi(x)-li(x) attains values as large as we please. More precisely there exists a positive constant c where pi(x)-li(x)>c*sqrt(x)*log(log(log(x)))/log(x) for arbitrarily large values of x, and a corresponding result for arbitrarily large values of li(x)-pi(x). (this is also due to Littlewood).

12. Dec 15, 2005

### CRGreathouse

Huh? Pi(x)-Li(x) changes sign infinitely often, in that there's an increasing sequence n_1, n_2, ... with Pi(x)-Li(x) positive at even terms and negative at odd terms. How is it steadily decreasing? Am I confused here?

13. Dec 16, 2005

### matt grime

locally decreasing.

14. Dec 16, 2005

### eljose

from the series for Pi(x) we could calculate Pi(L) by setting x=L in the series:

$$\pi(x)=\sum_{n}C_{n}e^{in\pi/L}$$ with x=L we get:

$$\pi(L)=\sum_{n}C_{n}(-1)^n$$ of course L appears inside the

coefficients, so we get the equation:

$$\pi(L)=\sum_{n}C_{n,\pi(L)}(-1)^n$$ from this we could obtain Pi(L)

15. Dec 16, 2005

### shmoe

li(x) is monotonic, pi(x) is a step function with jumps at the primes. pi(x)-li(x) will be monotic decreasing on intervals between consecutive primes.

Not suprisingly you've given no indication on how you hope to find the coefficients for the fourier series on a given interval [0,L] (ignoring for now the fact that you seem to think the coefficients depend only on the value pi(L)). Tell you what, how about you find the fourier series for pi(x) on the interval [0,100] as a demonstration of how you think this is going to work.I won't hold my breath.

16. Dec 19, 2005

### eljose

Of course to calculate the coefficients you need to know the sum:(over primes)

$$\sum_{p}e^{iax}=\sum_{n}(\pi(n)-Pi(n-1))e^{ina}$$

where $$\pi(x)=\sum_{n}c_{n}e^{in\pi{x}/L}$$ from this you wold get a system of linear equations in the form:

$$c_{m}=\sum_{n}B(n,m)c_{n}$$

of course you need to solve a linear system to calculate the C,s in order to obtain the Fourier expression of Pi(x)

17. Dec 19, 2005

### shmoe

I don't understand these sums. What variable are you summing over? what range are you summing it over? How do you hope to evaluate them? How does this lead to a linear system like you claim?

You necessarily have infinitely many of the c's non-zero (fourier series converging almost everywhere to a function that's not continuous). How do you hope to solve this system? Just go ahead and do an example. Go on, try it, it will be good for you.