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!)
A336299 (Least prime > prime(n)/2) - (greatest prime < prime(n)/2). 2
1, 2, 2, 2, 4, 4, 2, 4, 4, 2, 4, 4, 6, 6, 2, 2, 6, 6, 6, 4, 2, 4, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 4, 6, 6, 8, 8, 8, 8, 4, 4, 4, 4, 14, 14, 14, 14, 14, 14, 4, 6, 6, 6, 2, 10, 10, 10, 6, 6, 6, 6, 4, 6, 6, 6, 6, 2, 10, 10, 10, 2, 4, 2, 12, 12, 12, 12, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,2
LINKS
EXAMPLE
Prime(3)/2 = 2.5, so that a(3) = 3 - 2 = 1.
Prime(4)/2 = 3.5, so that a(4) = 5 - 3 = 2.
MATHEMATICA
z = 120; t = Table[NextPrime[Prime[n]/2], {n, 3, z}]; (* cf. A039734, A079953 *)
u = NextPrime[t, -1] (* A336298 *)
t - u (* A336299 *)
PROG
(PARI) a(n) = my(x=prime(n)/2); nextprime(x) - precprime(x); \\ Michel Marcus, Nov 18 2020
CROSSREFS
Sequence in context: A192095 A363710 A105080 * A206424 A117728 A172309
KEYWORD
nonn
AUTHOR
Clark Kimberling, Nov 16 2020
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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)