login
Least k such that prime(k) has n digits. Index of least n-digit prime.
4

%I #14 Apr 03 2023 10:36:10

%S 1,5,26,169,1230,9593,78499,664580,5761456,50847535,455052512,

%T 4118054814,37607912019,346065536840,3204941750803,29844570422670,

%U 279238341033926,2623557157654234,24739954287740861,234057667276344608,2220819602560918841,21127269486018731929

%N Least k such that prime(k) has n digits. Index of least n-digit prime.

%H Eduard Roure Perdices, <a href="/A090226/b090226.txt">Table of n, a(n) for n = 1..29</a>

%H C. Caldwell's Prime Pages, <a href="https://t5k.org/howmany.shtml#table">A Table of values of pi(x)</a>.

%H X. Gourdon, <a href="http://numbers.computation.free.fr/Constants/Primes/pixtable.html">A Table of values of pi(x)</a>.

%F a(1)=1; a(n) = pi(10^(n-1)) + 1 for n > 1 where pi(x) is the number of primes less than x. - C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 26 2004

%F a(n) = A006880(n-1) + 1, for n >= 1. - _Eduard Roure Perdices_, Apr 18 2021

%t Table[PrimePi[NextPrime[10^n]],{n,0,14}] (* This generates the first 15 terms of the sequence, but Mathematica cannot generate the 16th term using this program. *) (* _Harvey P. Dale_, May 12 2019 *)

%Y Cf. A003617 (values of prime(k)), A006880.

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Nov 25 2003

%E Corrected and extended by C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 26 2004

%E Extended by _Eduard Roure Perdices_, Apr 18 2021