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

Number of primes between n and 3n.
1

%I #18 Mar 21 2017 08:49:51

%S 2,3,3,3,4,4,5,5,5,6,7,6,7,7,8,9,9,9,9,9,10,10,11,11,12,12,13,14,14,

%T 14,14,13,14,15,16,17,18,18,18,18,18,17,18,18,18,19,20,19,19,20,21,21,

%U 22,21,22,23,23,24,24,24,25,24,24,25,26,27,28,27,27,27,28,27,27,26,27,28

%N Number of primes between n and 3n.

%H John Cerkan, <a href="/A037037/b037037.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000720(3n) - A000720(n-1). - _Wesley Ivan Hurt_, Jun 15 2013

%e For example a(5)=4 because between 5 and 15 there are 4 primes: 5, 7, 11 and 13.

%t Array[Count[Range[#, 3 #], k_ /; PrimeQ@ k] &, 76] (* _Michael De Vlieger_, Mar 20 2017 *)

%o (PARI) a(n) = primepi(3*n) - primepi(n-1); \\ _Michel Marcus_, Sep 28 2013

%Y Cf. A014085.

%K nonn

%O 1,1

%A _Felice Russo_

%E More terms from _Erich Friedman_