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.
%I A378905 #12 Dec 23 2024 01:50:50 %S A378905 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, %T A378905 17,20,21,22,22,25,25,26,28,28,28,29,29,32,32,32,32,36,41,41,41,41,43, %U A378905 43,45,46,47,49,49,49,49,49,51,56,57,57,57,62,63,65,65,65,66 %N A378905 a(n) is the number of odd squarefree semiprimes (A046388) < prime(n). %H A378905 Michael De Vlieger, <a href="/A378905/b378905.txt">Table of n, a(n) for n = 1..10000</a> %e A378905 a(11) = 2 because 15 and 21 are the 2 terms of A046388 < prime(11) = 31; %e A378905 a(12) = 4: 2 additional terms 33 and 35 of A046388 are < prime(12) = 37. %t A378905 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 *) %o A378905 (Python) %o A378905 from math import isqrt %o A378905 from sympy import primepi, prime, primerange %o A378905 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 %Y A378905 Cf. A000720, A046388, A292785. %K A378905 nonn %O A378905 1,9 %A A378905 _Hugo Pfoertner_, Dec 22 2024