cp's OEIS Frontend

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.

A376759 Number of composite numbers c with n < c <= 2*n.

Original entry on oeis.org

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, 21, 23, 23, 24, 25, 26, 26, 27, 27, 28, 29, 30, 30, 32, 32, 34, 35, 35, 36, 38, 39, 39, 40, 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
Offset: 1

Views

Author

N. J. A. Sloane, Oct 20 2024

Keywords

Comments

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.

Crossrefs

Related sequences:
Primes (p) and composites (c): A000040, A002808, A000720, A065855.
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.
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.

Programs

  • Maple
    chi := proc(n) if n <= 3 then 0 else n - numtheory:-pi(n) - 1; fi; end; # A065855
    A376759 := proc(n) chi(2*n) - chi(n); end;
    a := [seq(A376759(n),n=1..120)];
  • Mathematica
    Table[PrimePi[n] - PrimePi[2*n] + n, {n, 100}] (* Paolo Xausa, Oct 22 2024 *)
  • Python
    from sympy import primepi
    def A376759(n): return n+primepi(n)-primepi(n<<1) # Chai Wah Wu, Oct 20 2024

Formula

a(n) = A000720(n) - A000720(2*n) + n. - Paolo Xausa, Oct 22 2024