login
A376761
Number of primes between the n-th composite number c(n) and 2*c(n).
17
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,1
COMMENTS
Obviously the endpoints are not counted (since they are composite).
LINKS
FORMULA
a(n) = A000720(2*A002808(n)) - A002808(n) + n + 1. - Paolo Xausa, Oct 22 2024
MATHEMATICA
MapIndexed[PrimePi[2*#] + #2[[1]] - # + 1 &, Select[Range[100], CompositeQ]] (* Paolo Xausa, Oct 22 2024 *)
PROG
(Python)
from sympy import composite, primepi
def A376761(n): return n+1-(m:=composite(n))+primepi(m<<1) # Chai Wah Wu, Oct 22 2024
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.
Sequence in context: A144000 A306284 A318816 * A085202 A096009 A000224
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 22 2024.
STATUS
approved