A073784 Number of primes between successive composite numbers.
1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0
Offset: 1
Examples
a(7) = 0 since there are no primes between the 7th and the 8th composites (14 and 15).
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Mathematica
Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; Table[ PrimePi[Composite[n + 1]] - PrimePi[Composite[n]], {n, 105}] (* Robert G. Wilson v, Dec 20 2004 *) Differences[Select[Range[300],CompositeQ]]-1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 01 2021 *)