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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065684 Number of primes <= prime(n) which begin with a 5. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,16

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..1000

EXAMPLE

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

MATHEMATICA

Accumulate@ Array[Boole[First@ IntegerDigits@ Prime@ # == 5] &, 103] (* 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) == 5, a++); p=nextprime(p+1)); write("b065684.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 26 2009

CROSSREFS

Cf. A065680, A000040.

Sequence in context: A244919 A158799 A157532 * A065683 A065682 A065681

Adjacent sequences:  A065681 A065682 A065683 * A065685 A065686 A065687

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 27 20:33 EDT 2021. Contains 346308 sequences. (Running on oeis4.)