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.

A065684 Number of primes <= prime(n) which begin with a 5.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 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, 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, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 13 2001

Keywords

Examples

			a(i) = 1 for 2 < i < 16 and a(16) = 2 as 53 = A000040(16) is the second prime beginning with 5. a(664579) = 72951 (A000040(664579) = 9999991 is the largest prime < 10^7).
		

Crossrefs

Programs

  • Mathematica
    Accumulate@ Array[Boole[First@ IntegerDigits@ Prime@ # == 5] &, 103] (* Michael De Vlieger, Jun 14 2018 *)
  • PARI
    lista(n) = { my(a=[p\10^logint(p,10)==5 | p<-primes(n)]); for(i=2, #a, a[i]+=a[i-1]); a} \\ Harry J. Smith, Oct 26 2009