cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A065687 Number of primes <= prime(n) which begin with an 8.

Original entry on oeis.org

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
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 13 2001

Keywords

Examples

			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).
		

Crossrefs

Programs

  • Mathematica
    Accumulate[If[First[IntegerDigits[#]] == 8, 1, 0]&/@Prime[Range[100]]] (* Vincenzo Librandi, Nov 28 2016 *)
  • PARI
    lista(n) = { my(a=[p\10^logint(p,10)==8 | p<-primes(n)]); for(i=2, #a, a[i]+=a[i-1]); a} \\ Harry J. Smith, Oct 26 2009