login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of decimal digits in (10^n)-th prime number.
2

%I #8 Dec 12 2020 17:09:55

%S 1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,

%T 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,

%U 51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75

%N Number of decimal digits in (10^n)-th prime number.

%C 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).

%C 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, ....

%H Pierre Dusart, <a href="http://arxiv.org/abs/1002.0442">Estimates of Some Functions Over Primes without R.H.</a>

%e a(4) = 6 because A006988(4) = prime(10^4) = 104729 has six decimal digits.

%t Table[IntegerLength[Prime[10^n]],{n,0,75}] (* _Harvey P. Dale_, Dec 11 2020 *)

%o (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")"))

%Y Cf. A006988 ((10^n)-th prime), A006880 (pi(10^n)), A099261 (bit lengths).

%K nonn,base,nice

%O 0,2

%A _Rick L. Shepherd_, Oct 10 2004

%E Extension, comment, link, and Pari program from _Charles R Greathouse IV_, Aug 03 2010