An approximate sum of prime numbers smaller than a given number 'n' can be found by the following formula $$\frac{n^{2}}{4\log_{2.75+\frac{0.325}{\log_{5}(\sqrt{n})}}(\sqrt{n})}$$ for example if n=1000,my formula will give value 77425, or another example, if n = 50021 will give value 120958226 (the real sum should be 120811273) I have a few questio,the first how the formula behaves with very large numbers,the second, is there a formula with a better approximate value and the third question (for enthusiasts) is, the approximate sum of prime numbers less than a million, by my formula is 37594116211,, which is the real result, and what is the value of the error
Asked
Active
Viewed 184 times
0

Related: https://math.stackexchange.com/questions/28238/sumsofprimepowers and https://math.stackexchange.com/questions/419804/whatisthemathematicalformulatofindthesumofthefirst1000primenumbers?rq=1 . – Adam Rubinson May 12 '21 at 12:48

37551402026 is the sum of prime numbers less than a million. The error is 42714184 (0.11375%) For $10^7$ 3203334994375 vs 3210454595322 with error 7119600947 (0.2222%) For $10^8$ 279209890387283 vs 280131327310962 with error 921436923679 (0,32%) – pietfermat May 12 '21 at 17:56

1@Srb An identical question was posted about $2$ hours later by [srbin](https://mathoverflow.net/users/176294/srbin) on MathOverflow (MO) at [Approximate sum of prime numbers](https://mathoverflow.net/q/392597/129887). I assume that user is you. Crossposting is generally frowned on, especially so relatively quickly. I've seen several references that you should wait at least a week before doing so to MO, and you should also check if your post is appropriate to post there. Regardless, if you do so, please include links in each post to the other one to help avoid duplication of effort. – John Omielan May 12 '21 at 18:14

Asymptotically, this formula is wrong, but only by about 1%, so probably the discrepancy won’t be apparent until $n$ is really really large. The actual asymptotic is simply $n^2 / (2 \log n)$, but it’s quite possible your approximation is a better fit for small $n$. – Erick Wong May 20 '21 at 07:57