Once again I've faced a complete dead end in trying to solve the pi function so I thought I may share my work so if anyone else wants to go down this road they can either know better, or finish what I couldn't.(adsbygoogle = window.adsbygoogle || []).push({});

1. I wanted this graph to be continuous so I started under the assumption that π(0)=0 π(1)=1 π(2) =2 π(3) =3 π(4)=5 π(5)=7 etc.

2. I built a linear calculator of π(x) which calculated all primes up to a target and indexed them, then to calculate a value for π(x) in a linear way I used a line function from π(floor(x)) to π(ceil(x)) and used that line to identify approximately where the real π(x) is.

3. I took the possibility that π(x) could equal x^n so I attempted to calculate this n. The value was not constant so I chose n as 0.8427 . Visually this value when multiplied by a constant to adjust the angle would wrap around the actual value nicely for a short amount of time and would then curl downwards.

4. After many failures in correcting this value I looked back at the prime number theory. According to the prime number theory as x->infinity x/ln(x) will approach the value of π(x). Since the accepted value of π(x) for this theory doesn't include 1 as a prime the graph of x/ln(x) should always be less than my function. So I built a formula to adjust the curl so that it would curl to x/ln(x) at some value largely above. I believe I tried (10^log(x)+1) so that for 10^3 the curl adjustment would cause my function to reach x/ln(x) when x - 10^4. The results looked promising. Up to 10^5 my error was less than +/- 50, and more amazingly the resulting error appeared to be a combination of sine waves.

After reviewing the FFT of the final error I came to the assumption that I may have run into a cosine integral and therefore be unable to repair the remaining error. To clarify this, lower frequencies had higher amplitudes and fell off at a rate visually similar to 1/x as the frequency increased. I also ran extremely high known values through my formula such as 10^24 and found my error at that order had climbed to as high as 50%. While my method of calculating π(x) seemed promising in the end I was left with a formula which was two pages long and failed horribly for extremely large values. I believe that the reason my function had such a high error for extremely large values is due to the high amplitude of low frequency values which was showing in the FFT but since I was unable to identify a formula to adjust for this error I am sharing my findings in hope that someone can finish where I left off and solve the Pi function.

- Ralph Ritoch

**Physics Forums - The Fusion of Science and Community**

# Epic fail trying to solve π(x)

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: Epic fail trying to solve π(x)

Loading...

**Physics Forums - The Fusion of Science and Community**