A099260 Number of decimal digits in (10^n)-th prime number.
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, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 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
Offset: 0
Examples
a(4) = 6 because A006988(4) = prime(10^4) = 104729 has six decimal digits.
Links
- Pierre Dusart, Estimates of Some Functions Over Primes without R.H.
Programs
-
Mathematica
Table[IntegerLength[Prime[10^n]],{n,0,75}] (* Harvey P. Dale, Dec 11 2020 *)
-
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")"))
Extensions
Extension, comment, link, and Pari program from Charles R Greathouse IV, Aug 03 2010
Comments