OFFSET
2,1
COMMENTS
The purpose of this sequence is to encourage experimentation. The number of primes at each power of 10 through 10^23 is now known exactly. Using this information, I created, by trial and error, an algorithm to check its accuracy against known counts (see UBASIC program) and to predict rough approximate values for those counts yet to be discovered. At increasing powers of 10 this program approaches 100% accuracy.
In the algorithm below, the value 9.14615 may be changed to 10 or to any other value between 9.1 and 10. With value 9.14615 the predicted value at 10^21 is ~100% accurate and with value 9.1151 the predicted value at 10^23 is also ~100% accurate and at some point the correct value may converge to a value of 9.1.
Starting at 10^2, the percent accuracy is less than the next at 10^3 and the values undulate alternately between <, >, <, >, ... thereafter.
Using 9.14615 (accurate for a limit of 10^21) in the program and beginning at 10^2, the estimate compared to the true value - the percent accuracy (truncated, not rounded) is: 10^2 - 87.9%, 10^3 - 98.8%, 10^4 - 90.0%, 10^5 - 96.1%, 10^6 - 93.9%, 10^7 - 97.1%, 10^8 - 96.0%, 10^9 - 97.9%, 10^10 - 97.2%, 10^11 - 98.5%, 10^12 - 98.0%, 10^13 - 98.9%, 10^14 - 98.6%, 10^15 - 99.3, 10^16 - 99.0%, 10^17 - 99.5%, 10^18 - 99.4%, 10^19 - 99.8%, 10^20 - 99.6%, 10^21 - ~100.0%.
Using 9.1151 (accurate for a limit of 10^23) in the program, at 10^22 - 99.7% and 10^23 - 99.9% or ~100%.
pi(10^n) ~ 10^n / log(10^n). The divisor Y in this sequence is floor(n^2/2), so the sequence varies as 10^n/n * 0.442666605... while pi(10^n) varies as (10^n/n) * 0.434294481....
Refit to target 10^29, the coefficient reduces to ~9.0466. - Bill McEachen, Dec 12 2022
REFERENCES
Perri O'Shaughnessy, Case of Lies. NY, Dell, 2006. A rare legal mystery incorporating some fascinating reading on encryption, prime numbers and related topics specifically relevant to this sequence (see Epilogue).
David Wells, Prime Numbers, The Most Mysterious Figures in Math. NJ, Wiley, 2005. Pages 183-185. At the time, 10^21 was the limit. See especially page 185, estimating p(n).
LINKS
Bill McEachen, Table of n, a(n) for n = 2..29
C. Caldwell's Prime Pages, How many primes are there?
Enoch Haga, UBASIC Program
FORMULA
N=(log(9.14615^X)*10^(X-1))/Y where X=power of 10 and Y=divisor beginning at 2 and thereafter by differencing two successive terms so that we have y = 0, 2, 4, 8, 12, 18, 24 with differences 2,2,4,4,6,6,8,8, etc. Above a(1)=0 because at 10^1 x=1 and y=0 so is omitted.
a(n) = round(log(9.14615^n)*10^(n-1)/floor(n^2/2)).
a(n) ~ 0.442666605... * 10^n/n.
EXAMPLE
a(4)=1107 because when X=4 and Y=8, then N=(log(9.14615^X)*10^(X-1))/Y = 1107.
PROG
(PARI) a(n)=round(log(9.14615^n)*10^(n-1)/(n^2\2))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Jun 25 2008
EXTENSIONS
Correction, comment, program, formulas, and editing from Charles R Greathouse IV, Nov 02 2009
STATUS
approved