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.
%I A074990 #20 Feb 28 2024 11:56:04 %S A074990 2,2,2,3,3,4,4,5,5,6,6,6,6,7,8,9,8,9,8,9,10,10,10,11,12,12,13,14,13, %T A074990 14,13,13,14,15,16,17,17,18,18,18,17,17,17,18,18,19,19,19,19,20,21,21, %U A074990 21,21,22,23,23,24,23,24,24,24,24,25,26,27,27,27,27,27,27,27,26,26,27,28 %N A074990 Number of primes in the interval (n,3n]. %C A074990 Differences a(n+1)-a(n) are 0, 1 or -1. %H A074990 Alois P. Heinz, <a href="/A074990/b074990.txt">Table of n, a(n) for n = 1..10000</a> %H A074990 M. Das, G. Paul, <a href="https://arxiv.org/abs/1710.09891">Generalization of Bertrand's Postulate and Upper Bounds on the Number of Primes in Certain Intervals</a>, arXiv:1710.09891 [math.NT], 2017. %F A074990 a(n) = A000720(3n) - A000720(n). %F A074990 a(n) = Sum_{j=n+1..3*n} A010051(j). %e A074990 a(4) = 3 because between 4 and 12 there are 3 primes: 5, 7, 11; a(7) = 4 because between 7 and 21 there are 4 primes: 11, 13, 17, 19. %p A074990 A074990 := proc(n) %p A074990 numtheory[pi](3*n)-numtheory[pi](n) ; %p A074990 end proc: # _R. J. Mathar_, Nov 03 2017 %t A074990 s=3; a[n_] := PrimePi[s*n]-PrimePi[n] %Y A074990 Cf. A000040, A000720, A010051, A108954, A075699. %K A074990 nonn %O A074990 1,1 %A A074990 _Zak Seidov_, Oct 02 2002