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!)
A046930 Size of sea of composite numbers surrounding n-th prime. 7
1, 1, 2, 4, 4, 4, 4, 4, 8, 6, 6, 8, 4, 4, 8, 10, 6, 6, 8, 4, 6, 8, 8, 12, 10, 4, 4, 4, 4, 16, 16, 8, 6, 10, 10, 6, 10, 8, 8, 10, 6, 10, 10, 4, 4, 12, 22, 14, 4, 4, 8, 6, 10, 14, 10, 10, 6, 6, 8, 4, 10, 22, 16, 4, 4, 16, 18, 14, 10, 4, 8, 12, 12, 10, 8, 8, 12, 10, 10, 16, 10, 10, 10, 6, 8, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = A031131(n) - 2 for n > 1. - Reinhard Zumkeller, Dec 19 2013
EXAMPLE
23 is in a sea of 8 composites: 20,21,22,23,24,25,26,27,28.
MAPLE
[ seq(ithprime(i)-ithprime(i-2)-2, i=3..100) ];
MATHEMATICA
Table[ Prime[n + 2] - Prime[n] - 2, {n, 75}] (* Robert G. Wilson v Oct 27 2004 *)
Join[{1}, #[[3]]-#[[1]]-2&/@Partition[Prime[Range[90]], 3, 1]] (* Harvey P. Dale, Sep 26 2012 *)
PROG
(Haskell)
a046930 1 = 1
a046930 n = subtract 2 $ a031131 n -- Reinhard Zumkeller, Dec 19 2013
CROSSREFS
Sequence in context: A287393 A260085 A159461 * A302254 A160409 A035645
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from Michel ten Voorde
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 May 5 01:47 EDT 2024. Contains 372257 sequences. (Running on oeis4.)