OFFSET
1,2
COMMENTS
A 7-smooth number is a number of the form 2^x*3^y*5^z*7^u, (x,y,z,u) >= 0.
In other words, a 7-smooth number is a number with no prime factor greater than 7. - Peter Munn, Nov 20 2021
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Card{ k | A002473 (k) <= n }.
EXAMPLE
a(11) = 10 as there are 10 7-smooth numbers <= 11. Namely 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. - David A. Corneth, Apr 19 2021
PROG
(PARI) for(n=1, 100, print1(sum(k=1, n, if(sum(i=5, n, if(k%prime(i), 0, 1)), 0, 1)), ", "))
(Python)
from sympy import integer_log
def A071604(n):
c = 0
for i in range(integer_log(n, 7)[0]+1):
i7 = 7**i
m = n//i7
for j in range(integer_log(m, 5)[0]+1):
j5 = 5**j
r = m//j5
for k in range(integer_log(r, 3)[0]+1):
c += (r//3**k).bit_length()
return c # Chai Wah Wu, Sep 16 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Jun 02 2002
EXTENSIONS
Name corrected by David A. Corneth, Apr 19 2021
STATUS
approved