Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #29 Apr 26 2020 09:06:40
%S 1,2,14,107,103,851,6931,59557,518971,4585526,41368791,375232730,
%T 3441863700,31843327587,295907384843,2761221438054,25890141962275,
%U 244138314690159,2306482418751769,21874074143081175,208132164249925671,1983046852246630734,18946883921641542673
%N Number of n-digit primes beginning with prime(n).
%C Subsidiary sequence suggested in A088104.
%H Tomás Oliveira e Silva, <a href="http://sweet.ua.pt/tos/primes.html">Tables of values of pi(x) and of pi2(x)</a>
%e a(2) = 2 since 31 and 37 are the only two 2-digit primes beginning with prime(2) = 3.
%o (PARI) A088754(n)={ local (resul,sdig,p,lo,hi) ; sdig=prime(n) ; lo=sdig ; hi=sdig+1 ; while( lo < 10^(n-1), lo *= 10 ; hi *= 10 ; ) ; resul=0 ; p=nextprime(lo) ; while(p < hi, resul++ ; p=nextprime(p+1) ; ) ; return(resul) ; }
%o { for(n=1,11, print(A088754(n)); ) } \\ _R. J. Mathar_, Sep 25 2006
%o (Python)
%o from sympy import prime, primepi
%o def A088754(n):
%o p = prime(n)
%o m = n-len(str(p))
%o return primepi((p+1)*10**m)-primepi(p*10**m) # _Chai Wah Wu_, Jun 18 2019
%Y Cf. A077504, A077505, A088104, A088105, A088755.
%K nonn,base
%O 1,2
%A _Ray Chandler_, Oct 15 2003
%E a(10) from _R. J. Mathar_, Sep 25 2006
%E a(11)-a(14) from Floris P. van Doorn and Jasper Mulder (florisvandoorn(AT)hotmail.com), Oct 12 2009
%E a(15)-a(22) from _Donovan Johnson_, Apr 24 2013
%E a(23) from _Chai Wah Wu_, Jun 19 2019