cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A046930 Size of sea of composite numbers surrounding n-th prime.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Examples

			23 is in a sea of 8 composites: 20,21,22,23,24,25,26,27,28.
		

Crossrefs

Programs

  • Haskell
    a046930 1 = 1
    a046930 n = subtract 2 $ a031131 n  -- Reinhard Zumkeller, Dec 19 2013
  • 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 *)

Formula

a(n) = A031131(n) - 2 for n > 1. - Reinhard Zumkeller, Dec 19 2013

Extensions

More terms from Michel ten Voorde