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).

This page as a plain text file.
%I A298071 #9 Jan 12 2018 23:52:23
%S A298071 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 A298071 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 A298071 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 A298071 Number of primes between floor(3*n/2) and 2*n (inclusive).
%t A298071 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 A298071 (Sage)
%o A298071 A298071 = lambda n: len([p for p in (3*n//2..2*n) if is_prime(p)])
%o A298071 print([A298071(n) for n in (1..97)]) # _Peter Luschny_, Jan 11 2018
%Y A298071 Cf. A000040, A035250, A056171.
%K A298071 nonn
%O A298071 1,7
%A A298071 _Bruno Berselli_, Jan 11 2018