OFFSET
1,3
FORMULA
Beginning with 2, make sequence of composites; measure distances to next prime
EXAMPLE
a(1)=4, composite; distance to next prime, 5, is 1.
MATHEMATICA
Table[NextPrime[n]-n, {n, Select[Range[150], CompositeQ]}] (* Harvey P. Dale, Apr 28 2016 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Jan 16 2000
EXTENSIONS
Edited by N. J. A. Sloane, Sep 09 2011
STATUS
approved