This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A053542 Distance from n-th composite number (A002808) to next prime. 1
 1, 1, 3, 2, 1, 1, 3, 2, 1, 1, 3, 2, 1, 5, 4, 3, 2, 1, 1, 5, 4, 3, 2, 1, 3, 2, 1, 1, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 1, 5, 4, 3, 2, 1, 3, 2, 1, 1, 5, 4, 3, 2, 1, 3, 2, 1, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 3, 2, 1, 1, 3, 2, 1, 1, 3, 2, 1, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 3, 2, 1, 5, 4, 3, 2, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS 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 Cf. A002808. Sequence in context: A010268 A181657 A172254 * A087284 A262311 A242950 Adjacent sequences:  A053539 A053540 A053541 * A053543 A053544 A053545 KEYWORD easy,nonn AUTHOR Enoch Haga, Jan 16 2000 EXTENSIONS Edited by N. J. A. Sloane, Sep 09 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 20 05:01 EDT 2019. Contains 324229 sequences. (Running on oeis4.)