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

%I #9 Jan 12 2018 23:52:23

%S 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,

%T 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,

%U 7,7,7,6,6,5,6,6,6,6,7,7,7,8,8,9,9,8,9,8,8,9,10,9

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

%t 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 *)

%o (Sage)

%o A298071 = lambda n: len([p for p in (3*n//2..2*n) if is_prime(p)])

%o print([A298071(n) for n in (1..97)]) # _Peter Luschny_, Jan 11 2018

%Y Cf. A000040, A035250, A056171.

%K nonn

%O 1,7

%A _Bruno Berselli_, Jan 11 2018