login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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), end=', ')
CROSSREFS
Cf. A001223.
Sequence in context: A005929 A005871 A005888 * A170770 A107499 A123298
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:58 EDT 2024. Contains 371906 sequences. (Running on oeis4.)