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

%I #9 Apr 28 2016 15:08:21

%S 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,

%T 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,

%U 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

%N Distance from n-th composite number (A002808) to next prime.

%F Beginning with 2, make sequence of composites; measure distances to next prime

%e a(1)=4, composite; distance to next prime, 5, is 1.

%t Table[NextPrime[n]-n,{n,Select[Range[150],CompositeQ]}] (* _Harvey P. Dale_, Apr 28 2016 *)

%Y Cf. A002808.

%K easy,nonn

%O 1,3

%A _Enoch Haga_, Jan 16 2000

%E Edited by _N. J. A. Sloane_, Sep 09 2011

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 September 15 15:25 EDT 2024. Contains 375938 sequences. (Running on oeis4.)