Epic fail trying to solve π(x)

  • Thread starter tanus5
  • Start date
In summary, Ralph Ritoch attempted to solve the pi function but was unsuccessful. He looked at prime number theory and found that x/lnx will approach π(x) as x grows larger, and so he built a formula to adjust the curl so that it would curl to π(x) at some value largely above. However, his final error was much larger than he anticipated and so he is sharing his findings in hope that someone can finish where he left off and solve the pi function.
  • #1
tanus5
52
0
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.

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
 
Last edited:
Physics news on Phys.org
  • #2
http://www.claymath.org/millennium/Riemann_Hypothesis/1859_manuscript/EZeta.pdf

You may be interested in this paper. Riemann was a very stark writer, and leaves little explanation. Most of his work was in geometry, but his single foray into analytic number theory, the paper I have posted a link to, yielded an explicit formula for the nth prime number. This formula appears at the top of page 8. It is extremely complicated, but exact, and useful and interesting from a theoretical standpoint.

Also, regarding your point 4: the prime counting function is *not* always less than x/lnx. Whether this was true was an open for a long time, but it has been proven that there exists a number for which x/lnx is greater than the prime counting function. There are two fascinating things about this number:
1. It has not been computed exactly - only its existence have been proved, and some crude upper and lower bounds. These lower bounds place it on the order of magnitude of the number of particles in the universe. This is interesting because while the problem was open, there were two approaches: one was to compute values using massive computers and brute-force techniques, looking for a counterexample, and one was the theoretical work that ultimately succeeded. Since it is not possible even in theory to compute numbers that large on a physical computer, the proof in fact shows that the other technique would never has succeeded.
2. It was further proved that x/lnx grows larger again, eventually, and then smaller, and then larger, and that the two alternate infinitely often as x goes to infinity.
 
Last edited by a moderator:
  • #3
My point is that this is a deep area of mathematics that's been studied for thousands of years. The last couple of centuries have seen incredible advances, and they have usually required extremely complicated and advanced theoretical techniques from complex analysis, modern algebra, and a whole slew of other fields.

If this is something you're interested in learning about, pick up a book. John Derbyshire's Prime Obsession is a great introduction for the layman to the Riemann hypothesis, one extremely important open problem in number theory. It presupposes no mathematical background, but covers many of the technical aspects of the field quite comprehensively. The book would be great way to get some context for how such theoretical methods can be applied to these problems, and context can make it much much easier to grapple with theoretical ideas should you decide to study them more technically.
 
  • #4
Alexfloo,

Thank you for the information. I will certainly look into that book. I've been toying with the Pi function on and off for about 15 years. This is the first time I thought I had found a solution by chasing x/ln(x) but I wasn't aware of the information you provided about it. There is a very large probability that processing error had a lot to do with the error rates I was getting for extremely large numbers because I was simply using "double" floating point numbers.
 

1. How is π(x) calculated and why is it difficult to solve?

π(x) is calculated using various mathematical methods, such as the Riemann zeta function or the prime counting function. It is difficult to solve because there is no known simple formula for calculating π(x) and it involves complex mathematical concepts.

2. What are some common mistakes made when trying to solve π(x)?

Some common mistakes include using incorrect formulas, not considering all possible cases, and not accounting for certain mathematical principles such as prime number gaps.

3. Is there a definitive solution for π(x) or is it an ongoing research topic?

There is currently no definitive solution for π(x) and it is an ongoing research topic. Many mathematicians continue to work on finding a solution and improving existing methods.

4. Can computers be used to solve π(x) and how accurate are their calculations?

Yes, computers can be used to calculate π(x) and their calculations are generally highly accurate. However, due to the complexity of the problem, there may still be some margin of error in the calculation.

5. How does solving π(x) contribute to mathematical research?

Solving π(x) has important implications for number theory and prime number distribution, which are important areas of mathematical research. It also has practical applications in fields such as cryptography and data encryption.

Similar threads

Replies
2
Views
1K
  • Calculus
Replies
8
Views
1K
  • Calculus
Replies
7
Views
1K
Replies
3
Views
320
Replies
3
Views
1K
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
972
Replies
1
Views
926
Replies
4
Views
2K
Back
Top