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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213902 Number of integers of the form 6*k+1 and 6*k-1 between prime(n) and prime(n+1). 2
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 4, 0, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 2, 0, 0, 0, 3, 3, 0, 0, 0, 1, 0, 2, 1, 1, 1, 0, 1, 0, 0, 2, 4, 0, 0, 0, 4, 1, 2, 0, 0, 1, 2, 1, 1, 0, 1, 2, 0, 2, 2, 0, 2, 0, 1, 0, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,24

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

MATHEMATICA

nn = 100; t = Join[{3}, Union[6*Range[nn] - 1, 6*Range[nn] + 1]]; cnt = 0; t2 = {}; Do[If[PrimeQ[t[[i]]], AppendTo[t2, cnt]; cnt = 0, cnt++], {i, Length[t]}]; t2 (* T. D. Noe, Jun 26 2012 *)

Module[{nn=90, k61}, k61=Flatten[#+{1, 5}&/@(6Range[0, Prime[nn+1]])]; Table[ Count[ k61, _?(Prime[n]<#<Prime[n+1]&)], {n, nn}]] (* Harvey P. Dale, Mar 11 2019 *)

PROG

(Python)

# primes=[2, 3, 5, 7, 11, 13, 17, ...]

for i in range(777):

    prime = primes[i]

    nextp = primes[i+1]

    k = nextp//6 - prime//6

    if k:

        k = (k-1)*2 + (prime%6==1) + (nextp%6==5)

    print str(k)+', ',

CROSSREFS

Cf. A001223.

Sequence in context: A005929 A005871 A005888 * A170770 A107499 A123298

Adjacent sequences:  A213899 A213900 A213901 * A213903 A213904 A213905

KEYWORD

nonn,easy

AUTHOR

Alex Ratushnyak, Jun 24 2012

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 January 19 21:47 EST 2020. Contains 331066 sequences. (Running on oeis4.)