%I #19 Oct 22 2024 13:00:46
%S 0,1,2,2,4,4,5,6,6,6,8,8,10,11,11,11,13,14,15,16,16,16,18,18,19,20,20,
%T 21,23,23,24,25,26,26,27,27,28,29,30,30,32,32,34,35,35,36,38,39,39,40,
%U 40,40,42,42,42,43,43,44,46,47,49,50,51,51,52,52,54,55,55,55,57,58,60,61,61,61,62,63,64,65,66,66,68,68,69,70,70,71,73,73,73,74,75,76,77,77
%N Number of composite numbers c with n < c <= 2*n.
%C This completes the set of four: A307912, A376759, A307989, and A075084. Since it is not clear which ones are the most important, and they are easily confused, all four are now in the OEIS.
%H N. J. A. Sloane, <a href="/A376759/b376759.txt">Table of n, a(n) for n = 1..20000</a>
%F a(n) = A000720(n) - A000720(2*n) + n. - _Paolo Xausa_, Oct 22 2024
%p chi := proc(n) if n <= 3 then 0 else n - numtheory:-pi(n) - 1; fi; end; # A065855
%p A376759 := proc(n) chi(2*n) - chi(n); end;
%p a := [seq(A376759(n),n=1..120)];
%t Table[PrimePi[n] - PrimePi[2*n] + n, {n, 100}] (* _Paolo Xausa_, Oct 22 2024 *)
%o (Python)
%o from sympy import primepi
%o def A376759(n): return n+primepi(n)-primepi(n<<1) # _Chai Wah Wu_, Oct 20 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,3
%A _N. J. A. Sloane_, Oct 20 2024