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.

A298071 Number of primes between floor(3*n/2) and 2*n (inclusive).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 3, 3, 4, 4, 3, 4, 3, 3, 3, 4, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 4, 5, 4, 5, 6, 6, 6, 7, 6, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 7, 6, 7, 7, 7, 6, 6, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 8, 9, 8, 8, 9, 10, 9
Offset: 1

Views

Author

Bruno Berselli, Jan 11 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimePi[2*n] - PrimePi[Floor[3*n/2]] + If[PrimeQ[Floor[ 3*n/2]], 1, 0]; Array[a, 100] (* Jean-François Alcover, Jan 11 2018 *)
  • Sage
    A298071 = lambda n: len([p for p in (3*n//2..2*n) if is_prime(p)])
    print([A298071(n) for n in (1..97)]) # Peter Luschny, Jan 11 2018