login
A082998
a(n) = card{ x <= n : omega(x) = 3 }.
2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10
OFFSET
1,42
REFERENCES
G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.
LINKS
FORMULA
a(n) ~ (1/2)*(n/log(n))*log(log(n))^2.
a(A033992(n)) = n. - Daniel Suteu, Jul 21 2021
PROG
(PARI) a(n)=sum(i=1, n, if(omega(i)-3, 0, 1))
(PARI) a(n, k = 3, m = 1, p = 2, s = sqrtnint(n\m, k), j = 1) = my(count = 0); if (k==2, while(p <= s, my(r = nextprime(p+1)); my(t = m*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); return(count)); while(p <= s, my(r = nextprime(p+1)); my(t = m*p); while(t <= n, my(s = sqrtnint(n\t, k-1)); if(r > s, break); count += a(n, k-1, t, r, s, j+1); t *= p); p = r; j += 1); count; \\ Daniel Suteu, Jul 21 2021
(Python)
from sympy import factorint
from itertools import accumulate
def cond(n): return int(len(factorint(n))==3)
def aupto(nn): return list(accumulate(map(cond, range(1, nn+1))))
print(aupto(105)) # Michael S. Branicky, Jul 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 30 2003
STATUS
approved