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.

A051037 5-smooth numbers, i.e., numbers whose prime divisors are all <= 5.

This page as a plain text file.
%I A051037 #184 Feb 16 2025 08:32:41
%S A051037 1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,27,30,32,36,40,45,48,50,54,
%T A051037 60,64,72,75,80,81,90,96,100,108,120,125,128,135,144,150,160,162,180,
%U A051037 192,200,216,225,240,243,250,256,270,288,300,320,324,360,375,384,400,405
%N A051037 5-smooth numbers, i.e., numbers whose prime divisors are all <= 5.
%C A051037 Sometimes called the Hamming sequence, since Hamming asked for an efficient algorithm to generate the list, in ascending order, of all numbers of the form 2^i*3^j*5^k for i,j,k >= 0. The problem was popularized by Edsger Dijkstra.
%C A051037 Numbers k such that 8*k = EulerPhi(30*k). - _Artur Jasinski_, Nov 05 2008
%C A051037 Where record values greater than 1 occur in A165704: A165705(n) = A165704(a(n)). - _Reinhard Zumkeller_, Sep 26 2009
%C A051037 Also called "harmonic whole numbers", see Howard and Longair, 1982, Table I, page 121. - _Hugo Pfoertner_, Jul 16 2020
%C A051037 Also called ugly numbers, although it is not clear why. - _Gus Wiseman_, May 21 2021
%C A051037 Some woody bamboo species have extraordinarily long and stable flowering intervals that belong to this sequence. The model by Veller, Nowak & Davis justifies this observation from the evolutionary point of view. - _Andrey Zabolotskiy_, Jun 27 2021
%C A051037 Also those integers k for which, for every prime p > 5, p^(4*k) - 1 == 0 (mod 240*k). - _Federico Provvedi_, May 23 2022
%C A051037 As noted in the comments to A085152, Størmer's theorem implies that the only pairs of consecutive integers that appear as consecutive terms of this sequence are (1,2), (2,3), (3,4), (4,5), (5,6), (8,9), (9,10), (15,16), (24,25), and (80,81). These all represent significant musical intervals. - _Hal M. Switkay_, Dec 05 2022
%H A051037 Reinhard Zumkeller, <a href="/A051037/b051037.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A051037 Benoit Cloitre, <a href="/A051037/a051037.png">Plot of abs(f(n)-s(n)) vs its mean values (blue) and vs loglog(n) (red)</a>.
%H A051037 M. J. Dominus, <a href="http://perl.plover.com/Stream/stream.html">Infinite Lists in Perl</a>.
%H A051037 Deborah Howard and Malcolm Longair, <a href="https://doi.org/10.2307/989675">Harmonic Proportion and Palladio's "Quattro Libri"</a>, Journal of the Society of Architectural Historians (1982) 41 (2): 116-143.
%H A051037 Vaclav Kotesovec, <a href="/A051037/a051037.jpg">Plot of a(n) / (exp((6*log(2)*log(3)*log(5)*n)^(1/3))/sqrt(30)) for n = 1..1200000</a>
%H A051037 Rosetta Code, <a href="http://rosettacode.org/wiki/Hamming_numbers">A collection of computer codes to compute 5-smooth numbers</a>.
%H A051037 Raphael Schumacher, <a href="http://arxiv.org/abs/1608.06928">The Formula for the Distribution of the 3-Smooth Numbers, 5-Smooth, 7-Smooth and all other Smooth Numbers</a>, arXiv:1608.06928 [math.NT], 2016.
%H A051037 Sci.math, <a href="https://groups.google.com/g/sci.math/c/YxwCqw6p9mk">Ugly numbers</a>.
%H A051037 Carl Veller, Martin A. Nowak and Charles C. Davis, <a href="https://doi.org/10.1111/ele.12442">Extended flowering intervals of bamboos evolved by discrete multiplication</a>, Ecology Letters, 18 (2015), 653-659.
%H A051037 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SmoothNumber.html">Smooth Number</a>.
%H A051037 Wikipedia, <a href="http://en.wikipedia.org/wiki/Regular_number">Regular number</a>.
%H A051037 Wikipedia, <a href="https://en.wikipedia.org/wiki/Talk%3ARegular_number">Talk:Regular number</a>. Includes a discussion of the name.
%H A051037 Wikipedia, <a href="https://en.wikipedia.org/wiki/St%C3%B8rmer%27s_theorem">Størmer's theorem</a>.
%F A051037 Let s(n) = Card(k | a(k)<n) and f(n) = log(n*sqrt(30))^3/(6*log(2)*log(3)*log(5)). Then s(n) = f(n) + O(log(n)). Conjecture: s(n)=f(n) + O(log log n). For example, s(10000000) = 768 is well approximated by f(10000000) = 769.3... (see graphic given as link). - _Benoit Cloitre_, Dec 30 2001
%F A051037 The characteristic function of this sequence is given by:
%F A051037   Sum_{n>=1} x^a(n) = Sum_{n>=1} -Möbius(30*n)*x^n/(1-x^n). - _Paul D. Hanna_, Sep 18 2011
%F A051037 a(n) = A143207(n) / 30. - _Reinhard Zumkeller_, Sep 13 2011
%F A051037 A204455(15*a(n)) = 15, and only for these numbers. - _Wolfdieter Lang_, Feb 04 2012
%F A051037 A006530(a(n)) <= 5. - _Reinhard Zumkeller_, May 16 2015
%F A051037 Sum_{n>=1} 1/a(n) = Product_{primes p <= 5} p/(p-1) = (2*3*5)/(1*2*4) = 15/4. - _Amiram Eldar_, Sep 22 2020
%e A051037 From _Gus Wiseman_, May 21 2021: (Start)
%e A051037 The sequence of terms together with their prime indices begins:
%e A051037       1: {}            25: {3,3}
%e A051037       2: {1}           27: {2,2,2}
%e A051037       3: {2}           30: {1,2,3}
%e A051037       4: {1,1}         32: {1,1,1,1,1}
%e A051037       5: {3}           36: {1,1,2,2}
%e A051037       6: {1,2}         40: {1,1,1,3}
%e A051037       8: {1,1,1}       45: {2,2,3}
%e A051037       9: {2,2}         48: {1,1,1,1,2}
%e A051037      10: {1,3}         50: {1,3,3}
%e A051037      12: {1,1,2}       54: {1,2,2,2}
%e A051037      15: {2,3}         60: {1,1,2,3}
%e A051037      16: {1,1,1,1}     64: {1,1,1,1,1,1}
%e A051037      18: {1,2,2}       72: {1,1,1,2,2}
%e A051037      20: {1,1,3}       75: {2,3,3}
%e A051037      24: {1,1,1,2}     80: {1,1,1,1,3}
%e A051037 (End)
%p A051037 A051037 := proc(n)
%p A051037     option remember;
%p A051037     local a;
%p A051037     if n = 1 then
%p A051037         1;
%p A051037     else
%p A051037         for a from procname(n-1)+1 do
%p A051037             numtheory[factorset](a) minus {2, 3,5 } ;
%p A051037             if % = {} then
%p A051037                 return a;
%p A051037             end if;
%p A051037         end do:
%p A051037     end if;
%p A051037 end proc:
%p A051037 seq(A051037(n),n=1..100) ; # _R. J. Mathar_, Nov 05 2017
%t A051037 mx = 405; Sort@ Flatten@ Table[ 2^a*3^b*5^c, {a, 0, Log[2, mx]}, {b, 0, Log[3, mx/2^a]}, {c, 0, Log[5, mx/(2^a*3^b)]}] (* Or *)
%t A051037 Select[ Range@ 405, Last@ Map[First, FactorInteger@ #] < 7 &] (* _Robert G. Wilson v_ *)
%t A051037 With[{nn=10},Select[Union[Times@@@Flatten[Table[Tuples[{2,3,5},n],{n,0,nn}],1]],#<=2^nn&]] (* _Harvey P. Dale_, Feb 28 2022 *)
%o A051037 (PARI) test(n)= {m=n; forprime(p=2,5, while(m%p==0,m=m/p)); return(m==1)}
%o A051037 for(n=1,500,if(test(n),print1(n",")))
%o A051037 (PARI) a(n)=local(m); if(n<1,0,n=a(n-1); until(if(m=n, forprime(p=2,5, while(m%p==0,m/=p)); m==1),n++); n)
%o A051037 (PARI) list(lim)=my(v=List(),s,t); for(i=0,logint(lim\=1,5), t=5^i; for(j=0,logint(lim\t,3), s=t*3^j; while(s<=lim, listput(v,s); s<<=1))); Set(v) \\ _Charles R Greathouse IV_, Sep 21 2011; updated Sep 19 2016
%o A051037 (PARI) smooth(P:vec,lim)={ my(v=List([1]),nxt=vector(#P,i,1),indx,t);
%o A051037 while(1, t=vecmin(vector(#P,i,v[nxt[i]]*P[i]),&indx);
%o A051037 if(t>lim,break); if(t>v[#v],listput(v,t)); nxt[indx]++);
%o A051037 Vec(v)
%o A051037 };
%o A051037 smooth([2,3,5], 1e4) \\ _Charles R Greathouse IV_, Dec 03 2013
%o A051037 (PARI) is_A051037(n)=n<7||vecmax(factor(n,6)[, 1])<7 \\ _M. F. Hasler_, Jan 16 2015
%o A051037 (Magma) [n: n in [1..500] | PrimeDivisors(n) subset [2,3,5]]; // _Bruno Berselli_, Sep 24 2012
%o A051037 (Haskell)
%o A051037 import Data.Set (singleton, deleteFindMin, insert)
%o A051037 a051037 n = a051037_list !! (n-1)
%o A051037 a051037_list = f $ singleton 1 where
%o A051037    f s = y : f (insert (5 * y) $ insert (3 * y) $ insert (2 * y) s')
%o A051037                where (y, s') = deleteFindMin s
%o A051037 -- _Reinhard Zumkeller_, May 16 2015
%o A051037 (Python)
%o A051037 def isok(n):
%o A051037   while n & 1 == 0: n >>= 1
%o A051037   while n % 3 == 0: n //= 3
%o A051037   while n % 5 == 0: n //= 5
%o A051037   return n == 1 #  _Darío Clavijo_, Dec 30 2022
%o A051037 (Python)
%o A051037 from sympy import integer_log
%o A051037 def A051037(n):
%o A051037     def bisection(f,kmin=0,kmax=1):
%o A051037         while f(kmax) > kmax: kmax <<= 1
%o A051037         while kmax-kmin > 1:
%o A051037             kmid = kmax+kmin>>1
%o A051037             if f(kmid) <= kmid:
%o A051037                 kmax = kmid
%o A051037             else:
%o A051037                 kmin = kmid
%o A051037         return kmax
%o A051037     def f(x):
%o A051037         c = n+x
%o A051037         for i in range(integer_log(x,5)[0]+1):
%o A051037             for j in range(integer_log(y:=x//5**i,3)[0]+1):
%o A051037                 c -= (y//3**j).bit_length()
%o A051037         return c
%o A051037     return bisection(f,n,n) # _Chai Wah Wu_, Sep 16 2024
%o A051037 (Python) # faster for initial segment of sequence
%o A051037 import heapq
%o A051037 from itertools import islice
%o A051037 def A051037gen(): # generator of terms
%o A051037     v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5]
%o A051037     while True:
%o A051037         v = heapq.heappop(h)
%o A051037         if v != oldv:
%o A051037             yield v
%o A051037             oldv = v
%o A051037             for p in psmooth_primes:
%o A051037                     heapq.heappush(h, v*p)
%o A051037 print(list(islice(A051037gen(), 65))) # _Michael S. Branicky_, Sep 17 2024
%Y A051037 Subsequences: A003592, A003593, A051916 , A257997.
%Y A051037 For p-smooth numbers with other values of p, see A003586, A002473, A051038, A080197, A080681, A080682, A080683.
%Y A051037 Cf. A006530, A112757, A112758, A112759, A112763, A112764, A291719.
%Y A051037 The partitions with these Heinz numbers are counted by A001399.
%Y A051037 The conjugate opposite is A033942, counted by A004250.
%Y A051037 The opposite is A059485, counted by A004250.
%Y A051037 The non-3-smooth case is A080193, counted by A069905.
%Y A051037 The conjugate is A037144, counted by A001399.
%Y A051037 The complement is A279622, counted by A035300.
%Y A051037 Requiring the sum of prime indices to be even gives A344297.
%Y A051037 Cf. A000244, A002182, A002183, A035301, A056239, A112798, A261144, A344293.
%K A051037 easy,nonn
%O A051037 1,2
%A A051037 _Eric W. Weisstein_