%I #25 Oct 22 2024 12:59:42
%S 2,2,2,3,4,4,3,4,5,4,4,5,6,6,6,6,7,7,7,7,7,8,8,9,9,9,10,10,9,10,10,9,
%T 10,10,11,12,12,13,13,14,14,13,12,12,13,13,14,13,14,15,14,13,14,15,15,
%U 15,15,15,16,16,16,16,17,17,17,18,18,18,18,18,19,19,20,21,20,19,19,20,19,18,18,19,19,20,20,21,21,21,22,23,23,23,23,23,24,23,24,24,24,24,24,25
%N Number of primes between the n-th composite number c(n) and 2*c(n).
%C Obviously the endpoints are not counted (since they are composite).
%H N. J. A. Sloane, <a href="/A376761/b376761.txt">Table of n, a(n) for n = 1..20000</a>
%F a(n) = A000720(2*A002808(n)) - A002808(n) + n + 1. - _Paolo Xausa_, Oct 22 2024
%t MapIndexed[PrimePi[2*#] + #2[[1]] - # + 1 &, Select[Range[100], CompositeQ]] (* _Paolo Xausa_, Oct 22 2024 *)
%o (Python)
%o from sympy import composite, primepi
%o def A376761(n): return n+1-(m:=composite(n))+primepi(m<<1) # _Chai Wah Wu_, Oct 22 2024
%Y Related sequences:
%Y Primes (p) and composites (c): A000040, A002808, A000720, A065855.
%Y Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
%Y Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.
%K nonn,new
%O 1,1
%A _N. J. A. Sloane_, Oct 22 2024.