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!)
A065681 Number of primes <= prime(n) which begin with a 2. 2
1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,9
LINKS
EXAMPLE
After 2 and 23, 29 is the third prime beginning with 2: A000040(10) = 29, therefore a(10) = 3. a(664579) = 77025 (A000040(664579) = 9999991 is the largest prime < 10^7).
MATHEMATICA
Accumulate@ Array[Boole[First@ IntegerDigits@ Prime@ # == 2] &, 87] (* Michael De Vlieger, Jun 14 2018 *)
PROG
(PARI) digitsIn(x)= { local(d); if (x==0, return(1)); d=1 + log(x)\log(10); if (10^d == x, d++, if (10^(d-1) > x, d--)); return(d) } MSD(x)= { return(x\10^(digitsIn(x)-1)) } { a=0; p=2; for (n=1, 1000, q=prime(n); while (p <= q, if(MSD(p) == 2, a++); p=nextprime(p+1)); write("b065681.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 26 2009
CROSSREFS
Sequence in context: A065684 A065683 A065682 * A121242 A185436 A025794
KEYWORD
base,nonn
AUTHOR
Reinhard Zumkeller, Nov 13 2001
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 28 00:43 EDT 2024. Contains 371235 sequences. (Running on oeis4.)