This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A053543 Distance to closest prime in sequence of composites. 0
 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 2, 1, 1, 1, 2, 3, 2, 1, 1, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 4, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 1, 2, 1, 1, 2, 3, 2, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 LINKS FORMULA Beginning at 2, list consecutive numbers. Measure distance of each composite to nearest prime. EXAMPLE Fourth composite number is 9; distance to nearest prime, 7 or 11, is 2, so a(4) = 2. MATHEMATICA Min[NextPrime[#]-#, #-NextPrime[#, -1]]&/@Select[Range[140], CompositeQ] (* Harvey P. Dale, Aug 31 2015 *) CROSSREFS Sequence in context: A115362 A277872 A161100 * A161099 A118663 A205119 Adjacent sequences:  A053540 A053541 A053542 * A053544 A053545 A053546 KEYWORD easy,nonn AUTHOR Enoch Haga, Jan 16 2000 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 17 15:28 EDT 2019. Contains 324194 sequences. (Running on oeis4.)