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!)
A033559 a(n) = (q - p)/2, where p is the largest prime < n and q is the smallest prime > n. 2

%I #11 Mar 16 2014 03:06:51

%S 1,2,1,3,2,2,2,3,1,3,2,2,2,3,1,3,2,2,2,5,3,3,3,3,3,4,1,4,3,3,3,3,3,5,

%T 2,2,2,3,1,3,2,2,2,5,3,3,3,3,3,6,3,3,3,3,3,4,1,4,3,3,3,3,3,5,2,2,2,3,

%U 1,4,3,3,3,3,3,5,2,2,2,5,3,3,3,3,3,7,4,4,4,4,4,4,4,6,2,2,2

%N a(n) = (q - p)/2, where p is the largest prime < n and q is the smallest prime > n.

%H Jean-François Alcover, <a href="/A033559/a033559.txt">Frequency distribution up to 10^6 terms.</a>

%t a[n_] := (NextPrime[n] - NextPrime[n, -1])/2; Table[a[n], {n, 4, 100}] (* _Jean-François Alcover_, Apr 16 2013 *)

%K nonn

%O 4,2

%A _N. J. A. Sloane_

%E More terms from _Ben Paul Thurston_, Mar 30 2007

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 April 25 09:56 EDT 2024. Contains 371967 sequences. (Running on oeis4.)