login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A378905
a(n) is the number of odd squarefree semiprimes (A046388) < prime(n).
1
0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 4, 5, 5, 5, 6, 8, 8, 9, 10, 10, 11, 11, 13, 16, 16, 16, 16, 16, 17, 20, 21, 22, 22, 25, 25, 26, 28, 28, 28, 29, 29, 32, 32, 32, 32, 36, 41, 41, 41, 41, 43, 43, 45, 46, 47, 49, 49, 49, 49, 49, 51, 56, 57, 57, 57, 62, 63, 65, 65, 65, 66
OFFSET
1,9
LINKS
EXAMPLE
a(11) = 2 because 15 and 21 are the 2 terms of A046388 < prime(11) = 31;
a(12) = 4: 2 additional terms 33 and 35 of A046388 are < prime(12) = 37.
MATHEMATICA
nn = 360; c = 0; n = 1; {0}~Join~Reap[Until[n > nn, If[And[SquareFreeQ[n], PrimeNu[n] == 2], c++]; If[PrimeQ[n], Sow[c]]; n += 2] ][[-1, 1]] (* Michael De Vlieger, Dec 22 2024 *)
PROG
(Python)
from math import isqrt
from sympy import primepi, prime, primerange
def A378905(n): return 0 if n<3 else int(1-((t:=primepi(s:=isqrt(p:=prime(n))))*(t+1)>>1)+sum(primepi(p//k) for k in primerange(3, s+1))) # Chai Wah Wu, Dec 22 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Dec 22 2024
STATUS
approved