lichess.org
Donate

Is ln(x) x a better estimate than log(x) for prime numbers.

The formula is a long term approximation, so it's no sense to try apply it short term.
The log(x) and the ln(x) are similars, so log(x)=ln(x)/ln(10), but in general, it's more used ln(x), called natural logarithm, cause its derivate and integral are more simple; the other logarithm have the same derivate and integral, but multiplied or divided by a constant (ln(10)).
A more precise aproximation formula is this:
wikimedia.org/api/rest_v1/media/math/render/svg/634207ec58031d50f5cf982262683ac54300c7de

The last term O(...) means a small number of the order of that expression, the "error" of using that formula.
If you apply the first formula, n*ln(n), to 2*10^10 the result is: 4,7438*10^11
If you apply the second formula, n*log(n), to 2*10^10 the result is: 2,06021*10^11
If you apply the more precise formula given above to 2*10^10 the result is : 5,18689*10^11 with an error of the order of 356397743, (3*10^8), so the formula n*ln(n) gives a better approximation.
But you can see that both formulas give the same order of magnitude (10^11) and the digits are no significance.
It's the order of magnitude of the error commited using the formula.
So, in that case 10^8 , that means that the 3 first digits (518) are corrects, but the next (6) can be 6 or 7 and the rest of the digits are not significance.
You can say the 2*10^10 -th number prime is a number of 12 digits and it starts: 518....
An example of what? Big O notation?
For instance, in a Taylor series: e^x=1+x+x^2/2!+x^3/3!+x^4/4!+...
That developement is true but only if infinite.
For practical purposes, you can slip it in the third term, for example: e^x=1+x+x^2/2 , but in that case, the sign equal it's not true, so you are stopping the calculations at one point. But, if x is small, the x elevates to n is more small when n is growing, so you can say that all the powers are disregarding compared to the last one we are keeping.
That could written e^x=1+x+x^2/2+O(x^3) which means that the error comitted stopping in the term x^2/2 is of the order of magnitude of x^3
If we use that formula for stimate e^0,001 the result is 1,0010005 and the error is in the order of magnitude of 0,001^3=0,000000001, so the first nine digits are true and the next ones we cannot know.
As you can calculate e^0,001 with the precision you want, you can check it's true.

This topic has been archived and can no longer be replied to.