OFFSET
1,2
COMMENTS
A 5-smooth number is a number of the form 2^x*3^y*5^z (x,y,z) >= 0.
FORMULA
a(n) = Card{ k | A051037(k) <= n }.
Asymptotically : let a = 1/(6*log(2)*log(3)*log(5)) and b = sqrt(30) then a(n) = a*log(b*n)^3 + O(log(n)).
a(n) = -Sum_{k=1,n} mu(30*k)*floor(n/k). - Benoit Cloitre, Jun 14 2007
a(n) = Sum_{i=0..floor(log_5(n))} Sum_{j=0..floor(log_3(n/5^i))} floor(log_2(2*n/(5^i*3^j))). - Ridouane Oudra, Jul 17 2020
MATHEMATICA
Accumulate[Table[If[Max[FactorInteger[n][[;; , 1]]]<6, 1, 0], {n, 80}]] (* Harvey P. Dale, Aug 04 2024 *)
PROG
(PARI) for(n=1, 100, print1(sum(k=1, n, if(sum(i=4, n, if(k%prime(i), 0, 1)), 0, 1)), ", "))
(PARI) a(n)=-sum(k=1, n, moebius(2*3*5*k)*floor(n/k)) \\ Benoit Cloitre, Jun 14 2007
(Python)
from sympy import integer_log
def A071520(n):
c = 0
for i in range(integer_log(n, 5)[0]+1):
for j in range(integer_log(m:=n//5**i, 3)[0]+1):
c += (m//3**j).bit_length()
return c # Chai Wah Wu, Sep 16 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 02 2002
EXTENSIONS
Title corrected by Rainer Rosenthal, Aug 30 2020
STATUS
approved