# An integral expression for Pi(x)

#### eljose

an integral expression for Pi(x)....

hello i have discovered a new method to calculate $$\pi(e^x)$$ it runs in O(x^d) operations d>0 it is very simple:
Forst of all we have the integral for Pi(x) as knows:

$$Ln\zeta(s)=s\int_0^{\infty}\frac{\pi(x)}{x^{s}-1}dx$$

we make the change of variable x=exp(exp(t)) and apply the integral transform to both sides:

$$\int_{-\infty}^{\infty}ds(2+is)^{-iw}$$

now we have a double integral we express 2+is as exp(ln(2+is) we make the change of variable t+ln(2+is)=u t=v so finallly we would have:

$$\int_{-\infty}^{\infty}ds(2+is)^{-iw-1}Ln\zeta(2+is)=\int_{-i\infty}^{i\infty}\frac{r^{-iw}}{exp(r)-1}*\int_{-\infty}^{\infty}g(v)e^{iwv}$$

that have the solution:(with g(t)=Pi(exp(exp(t))

$$g(t)=\frac{1}{2\pi}\int_{-\infty}^{\infty}dwe^{-iwt}F(w)/G(w)$$

where we call F(w) and G(w) to:

$$G(w)=\int_{-i\infty}^{i\infty}\frac{r^{-iw}}{exp(r)-1}$$

$$F(w)=\int_{-\infty}^{\infty}ds(2+is)^{-iw-1}Ln\zeta(2+is)$$

so we have an expression for $$\pi(e^{e^t})$$ so to calculate pi(x) we have to take Ln(Ln(t)) in our integral....

Edit:there are some integrals wich lacks on the dx simbol well the symbol is the same as the variable (if the integral appears r is dr ,if is s then is ds..and so on)...

why my method is better than other?..well i would say several things.....
a)it is an analityc method...you solve it by solving three integrals...
b)time employed:if the time to calculate the three integrals goes like O(x^d) d>0 it seems big but to calculate for example Pi(exp(exp(100) you only need to calculate the integral upto t=100 so is faster than other methods that give the equation for Pi(x).

Last edited:
Related Linear and Abstract Algebra News on Phys.org

#### matt grime

Homework Helper
I know you think we're just out to victimize you because we are snoobby mathematicians, but here is a link explaining why inegral transforms are not new:

and here is one that states that there is a method (probably by no means the best known) that runs in time x^{2/3}/logx. I realize you claim to have one that takes (logx)^d but i don't believe you, sorry, but you've cried wolf far too often.

here is the pdf of the paper that you have so far refused to read that shmoe told you about and whose contents you deny exist:

http://www.dtc.umn.edu/~odlyzko/doc/arch/analytic.pi.of.x.pdf

and bear in mind that that paper is nearly 20 years old.

and again we do not deny what you have is correct (though i am sceptical) but it is probably not new and I i wish you'd stop banging on about it and try publishing it in a place where it can be properly assessed, and this forum is no such place.

#### eljose

I have read Odlyzko paper,it gives an algorithm to compute pi(x) by means of a double integral, runs on O(x^3/5) time my method would run (if correct but when refused don,t tell you if is or not correct) in O(x^d) d>0 time but you only have to make the integrals for lnln(x) to obtain Pi(x)(check the steps i have made and you will decide if is correct or not)

i only want to expose my method to get the critics before sending for publication is it a crime? they refuse my work but give no reasons...i congratulate your comments but must say sometimes you are rude....

#### matt grime

Homework Helper
yes, i don't suffer fools gladly, especially those who have shown no inclination to listen to others and claim there is a conspiracy afoot to supress you potentially fields medal winning owrk.

you have several possible reasons for your work being refused:

0. you are sending it to the wrong journals (or failing to comminicate it through proper chanels.) I can assure you there is no desire to suppress original and interesting work from anybody, but produicing such is very hard.

1. it is not a new idea in general as the pdf i give shows

2. it is too short for a paper

3, you haven't acknowledged previous work or given references as would be standard in the introduction and given sifficient justification for why it is genuinely original

4 its presentation is not up to the journal's standards

5. it is not clear that what you have written is correct. there is no formal proof of the things you claim or references to places where we can check, eg, why can you numerically evaluate the integrand and integrate it in the time you state it takes?

6. it is up to you to justify if it is correct, not for us to prove it for you.

7. you haven't factored in any allowance for numberically estimating zeta or its logarithm.

Synthesizing all that we could just say that you proof is simply not rigorous enough even if it were new.

i cannot reconstruct the proof from what you have written; there are too many things missing.

#### shmoe

Homework Helper
If you're sending off work of this calibre to journals, don't be suprised if you fail to receive any response.

This is a serious mess to sort out, but here's one thing for you to think about. At one point you have (and I have no idea where it came from and don't care to try to figure that out):

$$\int_{-\infty}^{\infty}g(v)e^{iwv}$$

Which I assume is an integral over v. You then seem to get g(t) using an inverse Fourier transform. Did you stop to think if this is at all valid considering what g(v) is? Take a closer look and keep in mind the order of g (the "useless" asymptotic of the prime number theorem might be handy here)

#### eljose

but i got the equality:

$$F(w)/G(w)=\int_{-\infty}^{\infty}g(v)e^{iwv}dv$$

where F(w)/G(w) is defined for every w wo if you take the inversion formula you get my result...take a view to every step i made and you will be able to see it...

take the integral transform:

$$\int_{-\infty}^{\infty}F(w)/G(w)e^{-iwt}=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}g(v)e^{iwv-iwt}dvdw$$

$$\int_{-\infty}^{\infty}F(w)/G(w)e^{-iwt}=\int_{-\infty}^{\infty}g(v)\delta(v-t)=g(t)$$

you can check by yourself that F(w)/G(w) exist for every w and that the steps i have made are valid by the way $$G(w)=c((-1)^{-iw}+1)\zeta(iw)$$

Last edited:

#### matt grime

Homework Helper
why don't you clearly and from the begiinning explain your result, saying why, for instance, the fourier inversion (pr whatever inversere transrform it is) formula holds. for instance the fucntion you are inverting needs its absolute value to be lesbegue integrable over the whole region if it were the fourier inversion, do you know if that is true?. again, why don't you start from the beginning and carefully write out your result with references to all those things that soemone not an expert in the area such as me can understand? if it is indeed a simple result then you shld be able to do that.

#### eljose

Ok,ok i,m sorry the function $$\pi(e^{e^t})$$ has no Fourier inverse so i must have made a mistake in calculating F(w)/G(w) : ( so all my work is bad (fortunately i had not sent to any journal yet) another question what would be the inverse of the integral transform $$\int_{\infty-i\pi}^{\infty+i\pi}\pi(e^{-e^t})e^{iwt}dt$$ thanks...

i think we still have for the delta function $$\int_{\infty-i\pi}^{\infty+i\pi}f(x)\delta(x-t)dx=f(t)$$ but i am not sure....

Last edited:

#### matt grime

Homework Helper
So you had not actually checked that any of the hypotheses required for the inverse to exist were satisfied? And you wonder why you get rejections?

what even makes you think that the integral of pi(-e^e^t)e^{iwt} even exists? and it appers t has non-zero imaginary part, so what is pi of an imaginary input?

Last edited:

#### eljose

here you are another expression modified,yes is a triple integral so it seems to be worse than Odlyzko-Lagarias formula but is a formula for Pi(e^t) in fact we have that

$$\sum_{p}p^{-s}=\int_0^{\infty}\pi(e^t)e^{-st}dt$$

now using Abel,s sum formula you get that....

$$\sum_{p}p^{-s}=\frac{1}{2i\pi}\int_0^{\infty}\int_{c-i\infty}^{c+i\infty}dndqx^{q}D(ln\zeta(ns)/n)/q\zeta(q)$$

so finallly taking alll that into account we get an integral for PI(e^t) as:

$$\frac{-1}{4\pi^2}\int_{d-i\infty}^{d+i\infty}e^{st}/s\int_0^{\infty}\int_{c-i\infty}^{c+i\infty}dndqx^{q}D(ln\zeta(ns)/n)/q\zeta(q)=\pi(e^t)$$

why this formula should be better than others?..first of all is easier to obtain than Ozlydko Lagarias one and second as gives us values for Pi(e^t) you only need to evaluate the integral upto ln(x) so if the run time for my method is O(x^d) d>2/3 of course but you only need to calculate upto ln(x) for example to calculate Pi(10^300) with my method you only have to make the integral upto x=690.7755279 (just compare the time employed)...

Last edited:

#### matt grime

Homework Helper
Have you a reason why those integrals are valid (ie that they exist and are what you say they are)? You didn't last time. Now, given we are a nonspecialist audience you should write out why the subsitutions are valid. You must bear in mind we are not specialists in this area (in all probability) and it seems to me at least that you have simply magicked a formula from nowhere with no justification for its use.

Note that your final integral has all the s's vanishing yet there is no ds in the integral, and further that Re(s) must be greater than 1 or the sum in the first line diverges, ie your initial transform is only valid for Re(s)>1

Last edited:

#### eljose

for the first realtion, you will now pi(x) diverge as x/ln(x) so pi(e^t) will diverge as e^t/t so pi(e^t)=O(e^t)...

now from mathworld,(the part of riemann prime number counting function) you have the identity (check it at mathworld)...

$$\sum_{p}p^{-s}=Sum_1^{\infty}\frac{\mu(n)Ln\zeta(ns)}{n}$$

on the other hand we have Abel,s sum formula $$A(x)=\sum_1^x a(n)$$

$$\sum_1^{\infty}a(n)f(n)=-\int_1^{\infty}A(x)(f/dx)dx$$

that,s all,..in fact perhasp is the easiest derivation of a formula for PI(e^t) and in Phyisics (not know if the same applies to math) we always try to look the easiest formula or explanation for the phenomena.......

#### matt grime

Homework Helper
but you haven't addressed teh fact that those formulae are not valid for all s.

#### eljose

but Laplace trasnform exist for s>1 in the last integral (contour integral) we should specify d>1 so the integral converges.....the theory of Laplace functions..let,s wait what shmoe have to say about this fact.

Pi(e^t) is O(e^at) for a given a so its Laplace transform exist for s>a the other contour integral is just the Perron,s formula interpretation of Mertens function...

Last edited:

#### matt grime

Homework Helper
And the functions are definitely sich that the inverse transform exists is it? (it doesn't need shmoe to tell you this, jsut you to check some things.

Last edited:

#### shmoe

Homework Helper
eljose said:
here you are another expression modified,yes is a triple integral so it seems to be worse than Odlyzko-Lagarias formula but is a formula for Pi(e^t) in fact we have that

$$\sum_{p}p^{-s}=\int_0^{\infty}\pi(e^t)e^{-st}dt$$
Aren't you missing an s? What is the point of this e^t substitution anyway? I'll say more below what a waste of time this is.

eljose said:
now using Abel,s sum formula you get that....

$$\sum_{p}p^{-s}=\frac{1}{2i\pi}\int_0^{\infty}\int_{c-i\infty}^{c+i\infty}dndqx^{q}D(ln\zeta(ns)/n)/q\zeta(q)$$
This is a serious mess. It lookes like you are applying Abel summation to the form you have for the sum over primes in post 12 (which doesn't apper in the reference you suggest that I can see, but it's easy enough to prove anyways), then an inversion formula to the summation of the mobius function. I guess the $$D$$ is supposed to be a derivative with respect to n, but what is $$x^q$$? Where did the x come from? It looks like it should be $$n^q$$ judging from what you seem to be trying to do. I see the 1/s showed up.

Now to your attempt at Abel summation-the form you attempted to give in post #12 is on an infinite interval, have you bothered to check if it's valid here? Seems to me you're making some seriously strong claims on the growth of $M(x)=\sum_{n=1}^x\mu(n)$ that aren't known to be true. You know any bound of the form $$M(x)=O(x^{1-\epsilon})$$ for any $$\epsilon>0$$ is beyond what's currently provable- a bound of this form would give a non-trivial zero free half plane of zeta and hence a huge improvement in the error term of the prime number theorem.

eljose said:
why this formula should be better than others?..first of all is easier to obtain than Ozlydko Lagarias one and second as gives us values for Pi(e^t) you only need to evaluate the integral upto ln(x)
This is nonsense. You say "evaluate the integral upto ln(x)" as if x appears in one of the limits of integration. Using e^t instead of x did absolutely nothing. You now have an $$e^{st}$$ factor in the integrand instead of a $$x^s$$, so despite the fact that t is much smaller than x, the integrand hasn't changed and the time involved in calculating it to the nearest integer has not changed either.

eljose said:
so if the run time for my method is O(x^d) d>2/3 of course but you only need to calculate upto ln(x) for example to calculate Pi(10^300) with my method you only have to make the integral upto x=690.7755279 (just compare the time employed)...
Sigh. It was my naive hope that you would have picked up on several important ideas from the Lagarias-Odlyzko paper, but it was a fools dream. Analytic expressions for pi(x) are well known, but actually approximating the integrals involved in these things is not a simple thing to do. Their paper is not novel in that the basic equation it's based on is new, but that they've found a way to modify it into something that can be handle numerically.

I was also hoping you'd see what actually goes into an analysis of the computational complexity of something like this. "just compare the time employed" is not sufficient- they go into details about the error from truncating integrals, speed of the algorithms they use to approximate zeta, and so on. All things you seem determined to ignore and omit, prefering to cry foul at the mean mathematicians who don't give you the fame you think you deserve.

#### eljose

I have applied Abel,s sum formula..this is valid for every interval (a,b) check the theory...at it comes to the expression of M(x) by an integral i used Perron,s inversion formula (this two are valid),i don,t have a computer to get the integrals so i can not compute the error term....

the integral is a Laplace inverse transform,so you can calculate it numerically although you set e^t with t=ln(x) you still can modify it to calculate $$\pi(t^a)$$ with a>0 so the error would go as =(x^{d/a}) then just put a big a

#### matt grime

Homework Helper
somewhat miracuilously you have now got an algorithm whose error tends to a constant as we need to calculte pi(x) for bigger and bigger x... yeah, that makes sense.

What is D? Shmoe asked and you haven't said. NOr wehre the x^q came from, nor have you addressed the query about abel's sum formula for an *infinite* interval, rather than any finite interval. after the all, the integral of 1 exits over all intervals (a,b) in the reals yet doesn't over the real line

Last edited:

#### shmoe

Homework Helper
eljose said:
I have applied Abel,s sum formula..this is valid for every interval (a,b) check the theory
I suggest you check more carefully how it's derived. It's just integration by parts of a Stieltjes integral-there are 2 terms on the right hand side, one of which will drop out under certain conditions on the growth of A(x) vs f(x), but you seem willing to ignore this entirely.

edit-I may have been confused on what you were applying Abel summation to- how about you provide some details on why your expression is valid here?

edit2 I think I've sorted out what you're doing. This should be fine as long as you know $$n^{-1}\log{\zeta(ns)}=O({n^{-1-\epsilon})$$ as n->infinity (which is true for the values of s you should be considering).

eljose said:
i don,t have a computer to get the integrals so i can not compute the error term....
Where does a computer come into this? You do not need a computer to give bounds on the various errors that will be involved in approximating an integral. Yet another thing you've missed from Lagarias-Odlyzko's paper- you've complained many times about not having access to a powerful computer but read their paper again carefully and let me know where they needed a computer to prove their results. Ok I'll give you a hint where-they didn't need one.

eljose said:
the integral is a Laplace inverse transform,so you can calculate it numerically although you set e^t with t=ln(x) you still can modify it to calculate $$\pi(t^a)$$ with a>0 so the error would go as =(x^{d/a}) then just put a big a
awesome. Is there a limit to the number of times you'll say "you can calculate it numerically" and then make some unfounded claim about the error or how easily your method will give results?

Last edited:

#### eljose

i haven,t said the error of my algorithm tends to a constant but the error term is O(x^{d/a}), some in other post above yours explained that instead x^q is n^q (yes i made some mistakes in this too) i know that you will laugh until get unconscious but i have decided that i will send my work to professor Odlyzko to get his opinion although i don,t expect much to get an answer.

the limit A(x)f(x)->0 as x->oo must be satisfied for the Abel,s transform to exist.

Yes you both are right,i don,t know how to calculate this triple integral numerically.ç

well that,s all then folks,congratulations you both have ruined my math life the only thing i have left is a method to calculate sums of the form $$\sum_a^b [f(x)]$$ by calculating the fourier series for [f(x)] (the complex one) so we can get a method to compute this sums..but of course this will be already made.....:)

#### matt grime

Homework Helper
He, Olydzko, will say, I predict, "well done, good to see that you're thinking about this stuff. i have some observations....". Most mathematicians are appreciative if someone is interested enough to think abuot something in detail.

Since my contribution has been to point out that (on some web page it says that) there are certain constraints needed for the inverse fourier transform to exist, I thnk it misleading to imply I've shot down a hopeful young hotshot with some petty problem sfn "ruined you math life".

Stop whining about how everyone is unappreciative of your work and actually do something about it, for pity's sake. It shoudn't take me, a complete naif in this area, to be able to point out that you've not checked some blindingly obvious detail. Or at least, it would behove you not make ridiculous claims about it and be so sensitive about errors. we all make them. we make them all the time. however most of us have a sense of perspective about things. we all make wild sepcualtion and we all turn out to be wrong most of the time when someone wiser points out something obvious we've over looked. we don't, however, tend to say we deserve field's medals and that there is a conspiracy to supress our work because everyone else is a snob.

Look at that part about Abel. I cannot from this page even begin to guess what you think the A(x) and f(x) are in that statement in the last post, nnever mind if they do or don't satisfy some criterion about tending to zero as x tends to infinity.

you again state that the error is o(x^{d/a}) and earlier that we should take a large, well, arbitrarilty large and that is o(1) sicne you weren't clear about what a and d are/

Neither shmoe nor i care one jot about whather you can calculate any integral; actually calculating it is not important in the discussion. knowing the effort it takes to calculate is the issue.

why don't you now post you idea about evaluating a sum in terms of fourier series. there are several things extant about this that i can think of, though none exactly as you write there.

Last edited:

#### shmoe

Homework Helper
eljose said:
Yes you both are right,i don,t know how to calculate this triple integral numerically.
This wouldn't be a big deal if you weren't apparently unwilling to figure out how this could be done. How long have you known that you needed to learn some numerical integration techniques and how to estimate run-times and errors? Take the paper of Lagarias and Odlyzko as a starting point- study it until you understand their algorithm and the techniques used in creating and analyzing it backwards and forwards.

eljose said:
well that,s all then folks,congratulations you both have ruined my math life...
Give me a break. If I had given up mathematics everytime I had proven something that had been done already or made a mistake I would have quit thousands of times by now.

If you were to clean up what you've got here it really is nothing more than substituting one well known equation into another, you've just applied transform after transform. This is nothing novel, and you've so far been incapable of demonstrating why this particlar expression for pi(x) is at all usefull or interesting. You have managed to say things about an error term that don't make any sense at all and made claims about the runtime that you've made no attempts at justifying. Call me crazy but it looks far more complicated than the usual integral expression for pi(x) involving a single integral from the usual summation formulas.

If you really do bother sending this to anyone at all, do them a favour and take the time to polish it so it's at least readible. Take your time, there should be no typos and all your notation should be as clear as possible. It shouldn't be up to the reader to try to reverse engineer your sloppy notation to figure out what you're trying to say.

#### shmoe

Homework Helper
Just for kicks, here's a rundown of what eljose is doing:

Let

$$B(s)=\sum_{p\ \text{prime}}p^{-s}=\sum_{n=1}^{\infty}(\pi(n)-\pi(n-1))n^{-s}$$

where $$\pi(x)$$ is the usual prime counting function. This Dirichlet series is absolutely convergent for Re(s)>1. By Perron's formula (countless references, eg. A.8 in The Riemann-Zeta Function, Ivic or (2.4) in Lagarias-Odlyzko's paper linked to above), if x is not an integer (this is a minor technical point) we have:

$$\pi(x)=\frac{1}{2\pi i}\int_{(c)}B(s)x^ss^{-1}ds$$

where the limit (c) in the integral means integrate over a vertical line with real part=c. We need c>1 for this to be valid. For some reason eljose want to replace x with e^t, but nothing is gained from this. He also wants to go through a Laplace transform and inverse to get this, but there's no reason to do this either. Also, proving Perron's (or the form (2.4) in Lagarias-Odlyzko) is a nice residue calculation.

A small note:this B(s) function is not as 'nice' as zeta say. It's not really 'natural' to count primes- it's more natural to count prime powers, even more so with logarithmic weights. If you look in the something like the oft mentioned paper of Lagarias and Odlyzko you see they are counting prime powers with certain weights. One more thing-if we tried to estimate the above integral directly we'd want to estimate B(s) by truncating it's infinite sum. I expect this would be futile- if you needed to sum up over all primes less than x to get the desired accuracy for B(s) then you'd already know pi(x). Careful analysis of the integral at this stage might be a good exercise.

Next, we have:

$$B(s)=\sum_{p\ \text{prime}}p^{-s}=\sum_{n=1}^{\infty}\mu(n)\frac{\log{\zeta(ns)}}{n}$$

I'm sure I've seen this worked out in detail somewhere before, but I can't find a reference right now (it doesn't appear to be where eljose says, though I may have missed it). It's not too difficult to prove this is valid where Re(s)>1 using properties of the mobius function, specifically $$\sum_{d|n}\mu(d)=$$ 1 if n=1, 0 else, and say (2.3) of Lagarias-Odlyzko, though swapping the order of the summation signs might take some thought.

We can apply Abel summation to this, with A(x) in the notation in eljose's post being $A(x)=M(x)=\sum_{n\leq x}\mu(n)$ and f(x)=everything else. The trivial bound on M(x) and the bound on f I mentioned before justify Abel summation and we get:

$$B(s)=\int_1^{\infty}M(t)\left(\frac{s\zeta'(ts)}{t\zeta(ts)}-\frac{\log{\zeta(ts)}}{t^2}\right)dt$$

You can think of Abel summation as integration by parts-we've 'integrated' $$\mu(n)$$ over n from 1 to t to get M(t) and actually differentiated $$t^{-1}\log{\zeta(ts)}$$ with respect to t. You could change the lower bound of this integral to 0 if you liked, M(t)=0 if 0<t<1.

This doesn't look much better for estimating B(s)-an objection before was needing to know the primes- this objection remains as we have to know primes up to t to calculate M(t). Again using Perron's we can replace M(t) by an integral:

$$M(t)=\frac{1}{2\pi i}\int_{(d)}\frac{t^z}{z}{\zeta(z)}dz$$

(d) meaning the same thing as before, and we need d>1 for this to be true. May as well slap it all together:

$$\pi(x)=\frac{1}{2\pi i}\int_{(c)}\int_1^\infty\frac{1}{2\pi i}\int_{(d)}\frac{t^z}{z}{\zeta(z)}\left(\frac{s\zeta'(ts)}{t\zeta(ts)}-\frac{\log{\zeta(ts)}}{t^2}\right)x^ss^{-1}dz\ dt\ ds$$

I'm not sure why I bothered running through that, it was a reasonably intertaining exercise to sort things out and justify them to myself where needed. Having sorted things out more carefully I have a few additional comments:

-The inner integral over z is meant to give M(t). Now I believe that the techniques in Lagarias-Odlyzko can be adapted to give M(t) using this very integral, and I believe the complexity will be roughly equivalent to the time it takes their algorithm to find pi(t). I also believe their algorithm is the best currently available. This is from my faulty memory so it may be wrong. The end result is wholly destructive to the above as a useful computational tool, you'll need to calculate M(t) for many values and unless it turns out those values are small compared to the desired x, you're sunk.

-I would expect the t integral has to be taken pretty far to get accurate results, meaning you are actually sunk. I suspect this because I think the first term (the zeta prime over zeta term) is going to oscillate like an annoying wanker and this integral won't be very convergent, especially when s is large

-maybe changing the order of integration will be usefull, but I have my doubts. I don't see any obvious simplifications possible, and justifying this might be a nightmare.

-this really was just a combination of things you'd expect to see as exercises in an analytic number theory textbook.

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving