cp's OEIS Frontend

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.

A082998 a(n) = card{ x <= n : omega(x) = 3 }.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, May 30 2003

Keywords

References

  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Programs

  • 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

Formula

a(n) ~ (1/2)*(n/log(n))*log(log(n))^2.
a(A033992(n)) = n. - Daniel Suteu, Jul 21 2021