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.

A376761 Number of primes between the n-th composite number c(n) and 2*c(n).

Original entry on oeis.org

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, 10, 10, 11, 12, 12, 13, 13, 14, 14, 13, 12, 12, 13, 13, 14, 13, 14, 15, 14, 13, 14, 15, 15, 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
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2024

Keywords

Comments

Obviously the endpoints are not counted (since they are composite).

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

  • Mathematica
    MapIndexed[PrimePi[2*#] + #2[[1]] - # + 1 &, Select[Range[100], CompositeQ]] (* Paolo Xausa, Oct 22 2024 *)
  • Python
    from sympy import composite, primepi
    def A376761(n): return n+1-(m:=composite(n))+primepi(m<<1) # Chai Wah Wu, Oct 22 2024

Formula

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