login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A298071
Number of primes between floor(3*n/2) and 2*n (inclusive).
1
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,7
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Bruno Berselli, Jan 11 2018
STATUS
approved