login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088754 Number of n-digit primes beginning with prime(n). 6
1, 2, 14, 107, 103, 851, 6931, 59557, 518971, 4585526, 41368791, 375232730, 3441863700, 31843327587, 295907384843, 2761221438054, 25890141962275, 244138314690159, 2306482418751769, 21874074143081175, 208132164249925671, 1983046852246630734, 18946883921641542673 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Subsidiary sequence suggested in A088104.
LINKS
EXAMPLE
a(2) = 2 since 31 and 37 are the only two 2-digit primes beginning with prime(2) = 3.
PROG
(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) ; }
{ for(n=1, 11, print(A088754(n)); ) } \\ R. J. Mathar, Sep 25 2006
(Python)
from sympy import prime, primepi
def A088754(n):
p = prime(n)
m = n-len(str(p))
return primepi((p+1)*10**m)-primepi(p*10**m) # Chai Wah Wu, Jun 18 2019
CROSSREFS
Sequence in context: A355362 A074618 A108436 * A103945 A111713 A144278
KEYWORD
nonn,base
AUTHOR
Ray Chandler, Oct 15 2003
EXTENSIONS
a(10) from R. J. Mathar, Sep 25 2006
a(11)-a(14) from Floris P. van Doorn and Jasper Mulder (florisvandoorn(AT)hotmail.com), Oct 12 2009
a(15)-a(22) from Donovan Johnson, Apr 24 2013
a(23) from Chai Wah Wu, Jun 19 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 05:48 EDT 2024. Contains 371265 sequences. (Running on oeis4.)