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 A082997 #32 Jun 25 2022 00:44:41 %S A082997 0,0,0,0,0,1,1,1,1,2,2,3,3,4,5,5,5,6,6,7,8,9,9,10,10,11,11,12,12,12, %T A082997 12,12,13,14,15,16,16,17,18,19,19,19,19,20,21,22,22,23,23,24,25,26,26, %U A082997 27,28,29,30,31,31,31,31,32,33,33,34,34,34,35,36,36,36,37,37,38,39,40,41 %N A082997 a(n) = card{ x <= n : omega(x) = 2 }. %D A082997 G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990. %H A082997 Daniel Suteu, <a href="/A082997/b082997.txt">Table of n, a(n) for n = 1..10000</a> %F A082997 a(n) ~ (n/log(n))*log(log(n)). %F A082997 a(A007774(n)) = n. - _Daniel Suteu_, Jul 21 2021 %p A082997 a:= proc(n) option remember; `if`(n=0, 0, %p A082997 a(n-1)+`if`(nops(ifactors(n)[2])=2, 1, 0)) %p A082997 end: %p A082997 seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 23 2021 %t A082997 a[n_] := Count[PrimeNu[Range[n]], 2]; %t A082997 Array[a, 100] (* _Jean-François Alcover_, Mar 02 2022 *) %o A082997 (PARI) a(n)=sum(i=1,n,if(omega(i)-2,0,1)) %o A082997 (PARI) a(n) = my(s = sqrtint(n), p = 2, j = 1, count = 0); while(p <= s, my(r = nextprime(p+1)); my(t = p); while (t <= n, my(w = n\t); if(r > w, break); count += primepi(w) - j; my(r2 = r); while(r2 <= w, my(u = t*r2*r2); if(u > n, break); while (u <= n, count += 1; u *= r2); r2 = nextprime(r2+1)); t *= p); p = r; j += 1); count; \\ _Daniel Suteu_, Jul 21 2021 %o A082997 (Python) %o A082997 from sympy import factorint %o A082997 from itertools import accumulate %o A082997 def cond(n): return int(len(factorint(n))==2) %o A082997 def aupto(nn): return list(accumulate(map(cond, range(1, nn+1)))) %o A082997 print(aupto(77)) # _Michael S. Branicky_, Jul 21 2021 %Y A082997 Cf. A001221, A007774, A025528, A072000, A082998, A346621. %Y A082997 Partial sums of A215480. %K A082997 nonn %O A082997 1,10 %A A082997 _Benoit Cloitre_, May 30 2003