OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(7) = 0 since there are no primes between the 7th and the 8th composites (14 and 15).
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 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lior Manor, Aug 11 2002
STATUS
approved