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 A146167 #13 Jul 23 2024 15:46:03 %S A146167 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,3,3, %T A146167 4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,7,7,8,8,8,8,8,8,8,8,9,9,9,9, %U A146167 10,10,10,10,10,10,10,10,11 %N A146167 Number of odd squarefree semiprimes (A046388) <= n. %C A146167 A346622 is a different although very similar sequence. - _N. J. A. Sloane_, Aug 23 2021 %F A146167 a(n) = A072000(n) - A000720(floor(sqrt(n))) - A000720(floor(n/2)) + 1. %e A146167 a(33)= 3. The semiprimes <=33 are 15, 21 and 33. Formula gives 11-pi(5)-pi(16)+1 = 3. %t A146167 Accumulate[Table[If[OddQ[n]&&SquareFreeQ[n]&&PrimeOmega[n]==2,1,0],{n,0,100}]] (* _Harvey P. Dale_, Feb 08 2016 *) %o A146167 (Python) %o A146167 from math import isqrt %o A146167 from sympy import prime, primepi %o A146167 def A146167(n): return int(sum(primepi(n//prime(k))-k+1 for k in range(2,primepi(isqrt(n))+1)))-primepi(isqrt(n))+1 if n>3 else 0 # _Chai Wah Wu_, Jul 23 2024 %Y A146167 Cf. A046388, A001358 (semiprimes), A072000 (Number of semiprimes <= n), A000720 (pi(n), the number of primes <= n). %Y A146167 Cf. also A346622. %K A146167 nonn %O A146167 1,21 %A A146167 _Washington Bomfim_, Oct 27 2008