login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 01:38 EDT 2024. Contains 375082 sequences. (Running on oeis4.)