OFFSET
1,2
COMMENTS
Range = primes 2 to 19. Input pn=19 in script below. Code below is much faster than the code for cross-reference. For input of n=200 13 times as fast and many times faster for larger input of n.
PROG
(PARI) smoothn(n, pn) = { for(m=1, n, pr=1; forprime(p=2, pn, pr*=p; ); ct=1; for(x=1, m, f=0; forprime(y=nextprime(pn+1), floor(x), if(x%y == 0, f=1; break) ); if(gcd(x, pr)<>1, if(f==0, ct+=1; )) ); print1(ct", "); ) }
(Python)
from sympy import integer_log, prevprime
def A080686(n):
def g(x, m): return sum((x//3**i).bit_length() for i in range(integer_log(x, 3)[0]+1)) if m==3 else sum(g(x//(m**i), prevprime(m))for i in range(integer_log(x, m)[0]+1))
return g(n, 19) # Chai Wah Wu, Sep 17 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 02 2003
STATUS
approved