The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A065687 Number of primes <= prime(n) which begin with an 8. 2
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,24 LINKS Harry J. Smith, Table of n, a(n) for n = 1..1000 EXAMPLE 83 = A000040(23) is the first prime beginning with an 8, so a(23) = 1 and a(i) = 0 for i < 23. a(664579) = 71038 (A000040(664579) = 9999991 is the largest prime < 10,000,000). MATHEMATICA Accumulate[If[First[IntegerDigits[#]] == 8, 1, 0]&/@Prime[Range[100]]] (* Vincenzo Librandi, Nov 28 2016 *) 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) == 8, a++); p=nextprime(p+1)); write("b065687.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 26 2009 CROSSREFS Cf. A000040, A065680. Sequence in context: A044932 A211662 A211669 * A300403 A077433 A211665 Adjacent sequences:  A065684 A065685 A065686 * A065688 A065689 A065690 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 8 20:37 EST 2021. Contains 349596 sequences. (Running on oeis4.)