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.

A229989 Number of primes in the interval [floor(n/2), floor(3n/2)].

Original entry on oeis.org

0, 2, 2, 3, 4, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 7, 7, 7, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 14, 15, 16, 16, 16, 17, 18, 18, 18
Offset: 1

Views

Author

Clark Kimberling, Oct 09 2013

Keywords

Comments

Conjectures:
(1) a(n+1) - a(n) = 1 for infinitely many n;
(2) a(n+1) - a(n) = -1 for infinitely many n;
(3) a(n+1) - a(n) = -1 if and only if n = 2*prime(m+1) - 1.

Examples

			a(5) = 4 counts the primes in the interval [2,7].
		

Crossrefs

Programs

  • Maple
    with(numtheory): A229989 := proc(n) return pi(floor((3/2)*n))-pi(floor(n/2)-1): end proc: seq(A229989(n), n=1..75); # Nathaniel Johnston, Oct 11 2013
  • Mathematica
    z = 1000; c[n_] := PrimePi[Floor[3 n/2]] - PrimePi[Floor[n/2]-1];
    t = Table[c[n], {n, 1, z}];            (* A229989 *)
    Flatten[Position[Differences[t], -1]]  (* A076274? *)
    Flatten[Position[Differences[t], 1]]   (* A229990 *)