login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A065682
Number of primes <= prime(n) which begin with a 3.
2
0, 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, 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
OFFSET
1,11
LINKS
EXAMPLE
a(1) = 0, a(2) = 1. a(664579) = 75290 (A000040(664579) = 9999991 is the largest prime < 10^7).
MATHEMATICA
Accumulate@ Array[Boole[First@ IntegerDigits@ Prime@ # == 3] &, 87] (* Michael De Vlieger, Jun 14 2018 *)
PROG
(PARI) lista(n) = { my(a=[p\10^logint(p, 10)==3 | p<-primes(n)]); for(i=2, #a, a[i]+=a[i-1]); a} \\ Harry J. Smith, Oct 26 2009
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Reinhard Zumkeller, Nov 13 2001
STATUS
approved