cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A336299 (Least prime > prime(n)/2) - (greatest prime < prime(n)/2).

Original entry on oeis.org

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
Offset: 3

Views

Author

Clark Kimberling, Nov 16 2020

Keywords

Examples

			Prime(3)/2 = 2.5, so that a(3) = 3 - 2 = 1.
Prime(4)/2 = 3.5, so that a(4) = 5 - 3 = 2.
		

Crossrefs

Programs

  • Mathematica
    z = 120; t = Table[NextPrime[Prime[n]/2], {n, 3, z}]; (* cf. A039734, A079953 *)
    u = NextPrime[t, -1]  (* A336298 *)
    t - u  (* A336299 *)
  • PARI
    a(n) = my(x=prime(n)/2); nextprime(x) - precprime(x); \\ Michel Marcus, Nov 18 2020
Showing 1-1 of 1 results.