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 A376762 #28 Oct 29 2024 12:12:30 %S A376762 2,5,6,11,11,16,16,21,28,25,33,35,35,41,47,51,50,59,60,61,69,71,78,85, %T A376762 84,85,91,92,98,117,111,117,115,131,126,134,140,142,150,154,152,168, %U A376762 162,168,168,187,196,192,192,197,205,203,219,220,225,232,230,240,242,242,258,271,264,265,271,290,288,300,295,301,309,317,320,325,327,334,344,344,355,364,358 %N A376762 Number of composite numbers c in the range prime(n) < c <= 2*prime(n+1). %H A376762 N. J. A. Sloane, <a href="/A376762/b376762.txt">Table of n, a(n) for n = 1..20000</a> %F A376762 a(n) = 2*q - pi(2*q) - p + n, where p = prime(n), q = prime(n+1), and pi() = A000720(). %F A376762 a(n) = A210497(n) - A020900(n+1) + n. - _Paolo Xausa_, Oct 29 2024 %e A376762 a(2) = 5 because there are 5 composite numbers c in the range 3 < c <= 10, namely 4, 6, 8, 9, and 10. %t A376762 A376762[n_] := n - Prime[n] + 2*Prime[n+1] - PrimePi[2*Prime[n+1]]; %t A376762 Array[A376762, 100] (* _Paolo Xausa_, Oct 29 2024 *) %o A376762 (Python) %o A376762 from sympy import prime, nextprime, primepi %o A376762 def A376762(n): return int(n-(p:=prime(n))+(q:=nextprime(p)<<1)-primepi(q)) # _Chai Wah Wu_, Oct 29 2024 %Y A376762 Cf. A000720, A020900, A065855, A210497, A376759. %K A376762 nonn %O A376762 1,1 %A A376762 _N. J. A. Sloane_, Oct 29 2024