OFFSET
0,2
COMMENTS
As lim {n->oo} p_n/(n log n) = 1 is equivalent to the prime number theorem, a good first approximation (without having done any detailed analysis) should be a(n)=floor(log_10((10^n)*log(10^n))), which correctly generates all the first 22 terms and predicts that the sequence will continue 24,25,...,43,44,46,47,...,435,436,438,439,...,4344,4345,4347,4348,...,4503,4504 through the first 4500 terms (with only 5,45,437,4346 not appearing - compare with the digits of log_10(e) in A002285).
Many terms of this sequence can be determined exactly using Dusart's bounds. The first missing terms are 5, 44, 435, 4344, 43430, 434295, 4342946, 43429449, 434294483, 4342944820, ....
LINKS
EXAMPLE
a(4) = 6 because A006988(4) = prime(10^4) = 104729 has six decimal digits.
MATHEMATICA
Table[IntegerLength[Prime[10^n]], {n, 0, 75}] (* Harvey P. Dale, Dec 11 2020 *)
PROG
(PARI) a(n)=if(n<3, return(n+1)); my(l=n*log(10), ll=log(l), lb=ceil(log(l+ll-1+(ll-2.2)/l)/log(10)), ub=ceil(log(l+ll-1+(ll-2)/l)/log(10))); if(lb==ub, n+lb, error("Cannot determine a("n")"))
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Rick L. Shepherd, Oct 10 2004
EXTENSIONS
Extension, comment, link, and Pari program from Charles R Greathouse IV, Aug 03 2010
STATUS
approved