login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A098968
Record values for size of sea of composite numbers surrounding primes.
2
0, 1, 2, 4, 8, 10, 12, 16, 22, 26, 38, 40, 42, 46, 48, 54, 56, 70, 74, 78, 80, 98, 112, 114, 124, 136, 138, 158, 188, 198, 232, 234, 244, 246, 268, 304, 326, 328, 334, 338, 370
OFFSET
0,3
COMMENTS
For a prime p let s(p) (essentially A046930) denote the number of composite numbers less than p and greater than max{1, previous prime} or greater than p and less than the next prime. Sequence gives record values of s(p).
MATHEMATICA
a = {1, 2}; b = {0, 1}; d = 1; p = 2; q = 3; Do[ r = Prime[n]; c = r - p - 2; If[c > d, Print[{n + 1, c}]; d = c; AppendTo[a, n - 1]; AppendTo[b, c]]; p = q; q = r, {n, 3, 10^9}]; b (* Robert G. Wilson v, Oct 27 2004 *)
CROSSREFS
Records in A046930 (if initial term is 0 not 1). Cf. A098969, A046931.
Sequence in context: A166245 A276623 A121519 * A032368 A134533 A089953
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 24 2004
EXTENSIONS
More terms from Robert G. Wilson v and Olaf Voß, Oct 27 2004
STATUS
approved