We know that the number of prime numbers less than x tends to ln(x)x
Using this I have thought of a way of estimation of sum of prime numbers less than "n".
Using the formula above, we get that the number of prime numbers less than x is ln(x)x, so the number of prime numbers less than x+1 is ln(x+1)x+1.
So we can say that the probability of x+1 being prime is 1ln(x+1)x+1−ln(x)x
As x will grow bigger, 1 will become a very small value for it, so we can replace it with dx. Here dx is the small quantity we generally use in calculus.
Probability of x+dx being prime is dxln(x+dx)x+dx−ln(x)x
Solving the derivative, we get that the probability of x being prime is:- ln(x)1−(ln(x))21
We can generally say that the sum of prime numbers less than n is ∑i=2niP(i).
Here iP(i) is the probability of i being prime.
So we can rewrite this summation as an integration:- ∫2nx(ln(x)1−(ln(x))21)dx
Solving the integration, we get (Here β(n) represents sum of prime numbers less than "n"):- β(n)=ln(n)n2−li(n2)−[ln(2)4−li(4)]
Ignoring the constant value on the RHS, which would be too small as n grows bigger, we have:-
β(n)=ln(n)n2−li(n2)
Please read this and comment if there are any mistakes or about anything else regarding this derivation.
If you are good at coding, please check if this formula works for large numbers.
Thanks.
#NumberTheory
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
Your formula seems to approximate quite well even for huge values of n, see for yourself.
We can however simplify it by approximating pi(n) using the Prime Number Theorem :
π(n)≃ln(n)n
instead of li(n)
so that we have : β(n)≃ln(n)n2−ln(n2)n2 β(n)≃ln(n2)n2−2⋅ln(n)n2 Finally, β(n)≃2⋅ln(n)n2≃π(n2)
This gives better results, while being simpler. The accuracy for relatively big values of n (n > 10^3) can be enhanced by replacing back pi(n) with li(n) :
β(n)≃li(n2)
Below is the graph of the difference between your formulae and the actual values, up to n = 10^5.
Plot[ Sum[ nBoole[PrimeQ[n]], {n, 2, i}] - ((i^2)/Log[i] - LogIntegral[i^2]), {i, 2, 10^5}]
And here is the graph of the difference between li(n^2) and the actual values, up to n = 10^5.
Plot[LogIntegral[i^2] - Sum[nBoole[PrimeQ[n]], {n, 2, i}], {i, 2, 10^5}]
As we can see, your formulae tends to "go away" from the actual values but in a rather nice/smooth way while li(n^2) is generally closer to the actual values but the variations of the difference are looking more random.
This last approximation gets very close to the actual value as n gets big :
β(1012)li((1012)2)=β(1012)li(1024)=1.0000006083242533806771...
β(1012)2⋅ln((1012)2)(1012)2=β(1012)π(1024)=0.9815582161130313615399...
β(1012)ln(1012)1024−li(1024)=0.9631158239018093424027...
Log in to reply
Thanks a lot for the improvements!! :) Found it really helpful.
Log in to reply
You're welcome :)
I thought of a simpler way of getting the same result, although your reasoning is nice :
Directly from the Prime Number Theorem, we get :
π(n)≃ln(n)n
So, we have : P(n)≃nπ(n) ≃nln(n)n
P(n)≃ln(n)1
hence :
β(n)=i=2∑ni⋅P(i)≃∫ln(n)ndn
and ∫ln(n)ndn≃Ei(ln(n2))≃Ei(2⋅ln(n))
where Ei(n) is the exponential integral, however we know that : li(n)=Ei(ln(n))
So, we have : Ei(2⋅ln(n))=li(n2)
We end up with our nice formula : β(n)≃li(n2)
More generally, β(n,p)=i=2∑nip⋅P(i)≃li(np+1),∀(n,p)∈(R+)2,n=1
Your really smart.. which institutes your appearing for
I have tested this too, when I tried it for n=100, it gave 925 which is quite close to 1060, the actual answer.