login
A051037
5-smooth numbers, i.e., numbers whose prime divisors are all <= 5.
114
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, 60, 64, 72, 75, 80, 81, 90, 96, 100, 108, 120, 125, 128, 135, 144, 150, 160, 162, 180, 192, 200, 216, 225, 240, 243, 250, 256, 270, 288, 300, 320, 324, 360, 375, 384, 400, 405
OFFSET
1,2
COMMENTS
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.
Numbers k such that 8*k = EulerPhi(30*k). - Artur Jasinski, Nov 05 2008
Where record values greater than 1 occur in A165704: A165705(n) = A165704(a(n)). - Reinhard Zumkeller, Sep 26 2009
Also called "harmonic whole numbers", see Howard and Longair, 1982, Table I, page 121. - Hugo Pfoertner, Jul 16 2020
Also called ugly numbers, although it is not clear why. - Gus Wiseman, May 21 2021
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
Also those integers k for which, for every prime p > 5, p^(4*k) - 1 == 0 (mod 240*k). - Federico Provvedi, May 23 2022
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
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
M. J. Dominus, Infinite Lists in Perl.
Deborah Howard and Malcolm Longair, Harmonic Proportion and Palladio's "Quattro Libri", Journal of the Society of Architectural Historians (1982) 41 (2): 116-143.
Sci.math, Ugly numbers.
Carl Veller, Martin A. Nowak and Charles C. Davis, Extended flowering intervals of bamboos evolved by discrete multiplication, Ecology Letters, 18 (2015), 653-659.
Eric Weisstein's World of Mathematics, Smooth Number.
Wikipedia, Regular number.
Wikipedia, Talk:Regular number. Includes a discussion of the name.
Wikipedia, Størmer's theorem.
FORMULA
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
The characteristic function of this sequence is given by:
Sum_{n>=1} x^a(n) = Sum_{n>=1} -Möbius(30*n)*x^n/(1-x^n). - Paul D. Hanna, Sep 18 2011
a(n) = A143207(n) / 30. - Reinhard Zumkeller, Sep 13 2011
A204455(15*a(n)) = 15, and only for these numbers. - Wolfdieter Lang, Feb 04 2012
A006530(a(n)) <= 5. - Reinhard Zumkeller, May 16 2015
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
EXAMPLE
From Gus Wiseman, May 21 2021: (Start)
The sequence of terms together with their prime indices begins:
1: {} 25: {3,3}
2: {1} 27: {2,2,2}
3: {2} 30: {1,2,3}
4: {1,1} 32: {1,1,1,1,1}
5: {3} 36: {1,1,2,2}
6: {1,2} 40: {1,1,1,3}
8: {1,1,1} 45: {2,2,3}
9: {2,2} 48: {1,1,1,1,2}
10: {1,3} 50: {1,3,3}
12: {1,1,2} 54: {1,2,2,2}
15: {2,3} 60: {1,1,2,3}
16: {1,1,1,1} 64: {1,1,1,1,1,1}
18: {1,2,2} 72: {1,1,1,2,2}
20: {1,1,3} 75: {2,3,3}
24: {1,1,1,2} 80: {1,1,1,1,3}
(End)
MAPLE
A051037 := proc(n)
option remember;
local a;
if n = 1 then
1;
else
for a from procname(n-1)+1 do
numtheory[factorset](a) minus {2, 3, 5 } ;
if % = {} then
return a;
end if;
end do:
end if;
end proc:
seq(A051037(n), n=1..100) ; # R. J. Mathar, Nov 05 2017
MATHEMATICA
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 *)
Select[ Range@ 405, Last@ Map[First, FactorInteger@ #] < 7 &] (* Robert G. Wilson v *)
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 *)
PROG
(PARI) test(n)= {m=n; forprime(p=2, 5, while(m%p==0, m=m/p)); return(m==1)}
for(n=1, 500, if(test(n), print1(n", ")))
(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)
(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
(PARI) smooth(P:vec, lim)={ my(v=List([1]), nxt=vector(#P, i, 1), indx, t);
while(1, t=vecmin(vector(#P, i, v[nxt[i]]*P[i]), &indx);
if(t>lim, break); if(t>v[#v], listput(v, t)); nxt[indx]++);
Vec(v)
};
smooth([2, 3, 5], 1e4) \\ Charles R Greathouse IV, Dec 03 2013
(PARI) is_A051037(n)=n<7||vecmax(factor(n, 6)[, 1])<7 \\ M. F. Hasler, Jan 16 2015
(Magma) [n: n in [1..500] | PrimeDivisors(n) subset [2, 3, 5]]; // Bruno Berselli, Sep 24 2012
(Haskell)
import Data.Set (singleton, deleteFindMin, insert)
a051037 n = a051037_list !! (n-1)
a051037_list = f $ singleton 1 where
f s = y : f (insert (5 * y) $ insert (3 * y) $ insert (2 * y) s')
where (y, s') = deleteFindMin s
-- Reinhard Zumkeller, May 16 2015
(Python)
def isok(n):
while n & 1 == 0: n >>= 1
while n % 3 == 0: n //= 3
while n % 5 == 0: n //= 5
return n == 1 # Darío Clavijo, Dec 30 2022
(Python)
from sympy import integer_log
def A051037(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x):
c = n+x
for i in range(integer_log(x, 5)[0]+1):
for j in range(integer_log(y:=x//5**i, 3)[0]+1):
c -= (y//3**j).bit_length()
return c
return bisection(f, n, n) # Chai Wah Wu, Sep 16 2024
(Python) # faster for initial segment of sequence
import heapq
from itertools import islice
def A051037gen(): # generator of terms
v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5]
while True:
v = heapq.heappop(h)
if v != oldv:
yield v
oldv = v
for p in psmooth_primes:
heapq.heappush(h, v*p)
print(list(islice(A051037gen(), 65))) # Michael S. Branicky, Sep 17 2024
CROSSREFS
Subsequences: A003592, A003593, A051916 , A257997.
For p-smooth numbers with other values of p, see A003586, A002473, A051038, A080197, A080681, A080682, A080683.
The partitions with these Heinz numbers are counted by A001399.
The conjugate opposite is A033942, counted by A004250.
The opposite is A059485, counted by A004250.
The non-3-smooth case is A080193, counted by A069905.
The conjugate is A037144, counted by A001399.
The complement is A279622, counted by A035300.
Requiring the sum of prime indices to be even gives A344297.
Sequence in context: A097752 A014866 A051661 * A250089 A257997 A070023
KEYWORD
easy,nonn,changed
STATUS
approved