Calculating Prime Number Counts Using PI(N) Formula up to 10^23

  • Thread starter Thread starter jillbones
  • Start date Start date
  • Tags Tags
    Counting Prime
jillbones
Messages
2
Reaction score
0
PI(N) = N /{A * LOG(N)^2 +B * LOG(N) + C}. Note: LOG(N) is the common log.

This formula works for N up to 10^23. The accuracy depends on the number of digits
after the decimal point in the coefficients A, B & C. I used a Lotus123 spreadsheet to
calculate them. My calculated values are;

A = -0.000223480708389211732
B = 2.31221822291801513
C = -1.12554500288863357

The correct value of PI(10^23) = 1,925,320,391,606,803,968,923. The calculated value is
1,925,400,258,044,147,870,000


Not exact, but within .005%

I think that better approximations could be attained if the accuracy of the coefficients was
increased. But I have no way of testing this hypothesis

Bill J
 
Physics news on Phys.org
Almost exactly n/ln(n).
 
jillbones said:
PI(N) = N /{A * LOG(N)^2 +B * LOG(N) + C}. Note: LOG(N) is the common log.

This formula works for N up to 10^23. The accuracy depends on the number of digits
after the decimal point in the coefficients A, B & C. I used a Lotus123 spreadsheet to
calculate them. My calculated values are;

A = -0.000223480708389211732
B = 2.31221822291801513
C = -1.12554500288863357

Borek suggests that (A, B, C) = (0, 1/log e, 0) is a reasonable approximation, which is true. The best values are actually (0, 1/log e, -1/log e) which was proved (as I recall) in the early-mid 1800s. For base-10 logs, that's (0, 2.302585, -2.302585), so your numbers are fairly close.
 
CRGreathouse said:
Borek suggests that (A, B, C) = (0, 1/log e, 0) is a reasonable approximation, which is true. The best values are actually (0, 1/log e, -1/log e) which was proved (as I recall) in the early-mid 1800s. For base-10 logs, that's (0, 2.302585, -2.302585), so your numbers are fairly close.
I used the values of PI(N) from the table in the Wikipedia article "Prime Number Theorem" to calculate A, B & C.

I did a simple data regression analysis of N / PI(N) vs LOG(N) & LOG(N)^2. If the function was truly a straight line; A would be 0.000000000000 ... !

My results suggest that up to N = 10^23, the ratio N / PI(N) is not exactly a straight
line; but curves imperceptibly to the right. It may straighten out above 10^23, who
knows?

N / PI(N) is the ideal function; N, PI(N), LOG(N) and LOG(N)^2 can all be exact integers.
The problem is that N / PI(N), A, B & C cannot be precisely calculated with only 18 digit accuracy.

Was the early-mid 1800's proof purely theoretical or was it based on empirical data?

When you calculated PI(N) using the formula I suggested, what sort of errors did
you get?

p
 
http://primes.utm.edu/howmany.shtml#table

Consider reading section #2. There are no perfectly straight lines, as the graph shows.
 
jillbones said:
I did a simple data regression analysis of N / PI(N) vs LOG(N) & LOG(N)^2. If the function was truly a straight line; A would be 0.000000000000 ... !

If the function was a line, A and B would be 0. You're free to pick any values you choose, but if you choose anything other than the ones I gave, beyond some (large) N, my function will always be more accurate than yours. But that shouldn't be particularly surprising in your case: it's clear that beyond N = 10^4494 or so, your formula predicts a negative number of primes...

jillbones said:
My results suggest that up to N = 10^23, the ratio N / PI(N) is not exactly a straight
line; but curves imperceptibly to the right.

Correct.

jillbones said:
It may straighten out above 10^23, who
knows?

Hadamard (1896) and de la Vallée-Poussin (1896) proved that it does not.

jillbones said:
Was the early-mid 1800's proof purely theoretical or was it based on empirical data?

It was a proof (hence theoretical), not a conjecture. The original conjecture (late 1700s, I think) was based on empirical evidence, though.
 
##\textbf{Exercise 10}:## I came across the following solution online: Questions: 1. When the author states in "that ring (not sure if he is referring to ##R## or ##R/\mathfrak{p}##, but I am guessing the later) ##x_n x_{n+1}=0## for all odd $n$ and ##x_{n+1}## is invertible, so that ##x_n=0##" 2. How does ##x_nx_{n+1}=0## implies that ##x_{n+1}## is invertible and ##x_n=0##. I mean if the quotient ring ##R/\mathfrak{p}## is an integral domain, and ##x_{n+1}## is invertible then...
The following are taken from the two sources, 1) from this online page and the book An Introduction to Module Theory by: Ibrahim Assem, Flavio U. Coelho. In the Abelian Categories chapter in the module theory text on page 157, right after presenting IV.2.21 Definition, the authors states "Image and coimage may or may not exist, but if they do, then they are unique up to isomorphism (because so are kernels and cokernels). Also in the reference url page above, the authors present two...
I asked online questions about Proposition 2.1.1: The answer I got is the following: I have some questions about the answer I got. When the person answering says: ##1.## Is the map ##\mathfrak{q}\mapsto \mathfrak{q} A _\mathfrak{p}## from ##A\setminus \mathfrak{p}\to A_\mathfrak{p}##? But I don't understand what the author meant for the rest of the sentence in mathematical notation: ##2.## In the next statement where the author says: How is ##A\to...
Back
Top