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.
%I A003586 #389 Jul 25 2025 11:40:44 %S A003586 1,2,3,4,6,8,9,12,16,18,24,27,32,36,48,54,64,72,81,96,108,128,144,162, %T A003586 192,216,243,256,288,324,384,432,486,512,576,648,729,768,864,972,1024, %U A003586 1152,1296,1458,1536,1728,1944,2048,2187,2304,2592,2916,3072,3456,3888 %N A003586 3-smooth numbers: numbers of the form 2^i*3^j with i, j >= 0. %C A003586 This sequence is easily confused with A033845, which gives numbers of the form 2^i*3^j with i, j >= 1. Don't simply say "numbers of the form 2^i*3^j", but specify which sequence you mean. - _N. J. A. Sloane_, May 26 2024 %C A003586 These numbers were once called "harmonic numbers", see Lenstra links. - _N. J. A. Sloane_, Jul 03 2015 %C A003586 Successive numbers k such that phi(6k) = 2k. - _Artur Jasinski_, Nov 05 2008 %C A003586 Where record values greater than 1 occur in A088468: A160519(n) = A088468(a(n)). - _Reinhard Zumkeller_, May 16 2009 %C A003586 Also numbers that are divisible by neither 6k - 1 nor 6k + 1, for all k > 0. - _Robert G. Wilson v_, Oct 26 2010 %C A003586 Also numbers m such that the rooted tree with Matula-Goebel number m has m antichains. The Matula-Goebel number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m>=2 there corresponds the product of the Matula-Goebel numbers of the m branches of T. The vertices of a rooted tree can be regarded as a partially ordered set, where u<=v holds for two vertices u and v if and only if u lies on the unique path between v and the root. An antichain is a nonempty set of mutually incomparable vertices. Example: m=4 is in the sequence because the corresponding rooted tree is \/=ARB (R is the root) having 4 antichains (A, R, B, AB). - _Emeric Deutsch_, Jan 30 2012 %C A003586 A204455(3*a(n)) = 3, and only for these numbers. - _Wolfdieter Lang_, Feb 04 2012 %C A003586 The number of terms less than or equal to n is Sum_{i=0..floor(log_2(n))} floor(log_3(n/2^i) + 1), or Sum_{i=0..floor(log_3(n))} floor(log_2(n/3^i) + 1), which requires fewer terms to compute. - _Robert G. Wilson v_, Aug 17 2012 %C A003586 Named 3-friables in French. - _Michel Marcus_, Jul 17 2013 %C A003586 In the 14th century Levi Ben Gerson proved that the only pairs of terms which differ by 1 are (1,2), (2,3), (3,4), and (8,9); see A235365, A235366, A236210. - _Jonathan Sondow_, Jan 20 2014 %C A003586 Range of values of A000005(n) (and also A181819(n)) for cubefree numbers n. - _Matthew Vandermast_, May 14 2014 %C A003586 A036561 is a permutation of this sequence. - _L. Edson Jeffery_, Sep 22 2014 %C A003586 Also the sorted union of A000244 and A007694. - _Lei Zhou_, Apr 19 2017 %C A003586 The sum of the reciprocals of the 3-smooth numbers is equal to 3. Brief proof: 1 + 1/2 + 1/3 + 1/4 + 1/6 + 1/8 + 1/9 + ... = (Sum_{k>=0} 1/2^k) * (Sum_{m>=0} 1/3^m) = (1/(1-1/2)) * (1/(1-1/3)) = (2/(2-1)) * (3/(3-1)) = 3. - _Bernard Schott_, Feb 19 2019 %C A003586 Also those integers k for which, for every prime p > 3, p^(2k) - 1 == 0 (mod 24k). - _Federico Provvedi_, May 23 2022 %C A003586 For n>1, the exponents’ parity {parity(i), parity(j)} of one out of four consecutive terms is {odd, odd}. Therefore, for n>1, at least one out of every four consecutive terms is a Zumkeller number (A083207). If for the term whose parity is {even, odd}, even also means nonzero, then this term is also a Zumkeller number (as is the case with the last of the four consecutive terms 1296, 1458, 1536, 1728). - _Ivan N. Ianakiev_, Jul 10 2022 %C A003586 Except the initial terms 2, 3, 4, 8, 9 and 16, these are numbers k such that k^6 divides 6^k. Except the initial terms 2, 3, 4, 6, 8, 9, 16, 18 and 27, these are numbers k such that k^12 divides 12^k. - _Mohammed Yaseen_, Jul 21 2022 %C A003586 In music theory, a comma is a ratio, close to 1 (typically less than 1.04), between two natural numbers divisible by only small primes (typically single digit). In this sequence, a(131) / a(130) = 531441 / 524288 ~ 1.013643 is the Pythagorean comma (A221363), the difference between 12 perfect fifths and 7 octaves. - _Hal M. Switkay_, Mar 23 2025 %D A003586 J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 654 pp. 85, 287-8, Ellipses Paris 2004. %D A003586 S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962, p. xxiv. %D A003586 R. Tijdeman, Some applications of Diophantine approximation, pp. 261-284 of Surveys in Number Theory (Urbana, May 21, 2000), ed. M. A. Bennett et al., Peters, 2003. %H A003586 Lei Zhou, <a href="/A003586/b003586.txt">Table of n, a(n) for n = 1..10000</a> (first 501 terms from Franklin T. Adams-Watters) %H A003586 R. Blecksmith, M. McCallum and J. L. Selfridge, <a href="http://www.jstor.org/stable/2589404">3-smooth representations of integers</a>, Amer. Math. Monthly, 105 (1998), 529-543. %H A003586 Thierry Bousch, <a href="https://www.emis.de/journals/SLC/wpapers/s77bousch.html">La Tour de Stockmeyer</a>, Séminaire Lotharingien de Combinatoire 77 (2017), Article B77d. %H A003586 Benoit Cloitre, <a href="/A003586/a003586.png">a(n)/((1/sqrt(6))*exp(sqrt(2*log(2)*log(3)*n))) for 0<n<10^5</a> %H A003586 Natalia da Silva, Serban Raianu, and Hector Salgado, <a href="https://arxiv.org/abs/1708.00620">Differences of Harmonic Numbers and the abc-Conjecture</a>, arXiv:1708.00620 [math.NT], 2017. %H A003586 Emeric Deutsch, <a href="http://arxiv.org/abs/1111.4288">Rooted tree statistics from Matula numbers</a>, arXiv:1111.4288 [math.CO], 2011. %H A003586 David Eppstein, <a href="https://arxiv.org/abs/1804.07396">Making Change in 2048</a>, arXiv:1804.07396 [cs.DM], 2018. %H A003586 F. Goebel, <a href="http://dx.doi.org/10.1016/0095-8956(80)90049-0">On a 1-1-correspondence between rooted trees and natural numbers</a>, J. Combin. Theory, B 29 (1980), 141-143. %H A003586 I. Gutman and A. Ivic, <a href="http://dx.doi.org/10.1016/0012-365X(95)00182-V">On Matula numbers</a>, Discrete Math., 150, 1996, 131-142. %H A003586 I. Gutman and Yeong-Nan Yeh, <a href="http://www.emis.de/journals/PIMB/067/3.html">Deducing properties of trees from their Matula numbers</a>, Publ. Inst. Math., 53 (67), 1993, 17-22. %H A003586 A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, <a href="http://dx.doi.org/10.1007/978-3-0348-0237-6">The Tower of Hanoi - Myths and Maths</a>, Birkhäuser 2013. See page 252. <a href="http://tohbook.info">Book's website</a> %H A003586 H. W. Lenstra Jr., <a href="http://www.msri.org/publications/ln/msri/1998/mandm/lenstra/1/index.html">Harmonic Numbers</a> %H A003586 H. W. Lenstra, Jr., <a href="/A003586/a003586.jpg">Harmonic Numbers and the ABC-conjecture</a>, Abstract of talk, May 30, 2001 [Annotated scanned copy] %H A003586 D. Matula, <a href="http://www.jstor.org/stable/2027327">A natural rooted tree enumeration by prime factorization</a>, SIAM Rev. 10 (1968) 273. %H A003586 D. J. Mintz, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/19-4/mintz.pdf">2,3 sequence as a binary mixture</a>, Fib. Quarterly, Vol. 19, No 4, Oct 1981, pp. 351-360. %H A003586 I. Peterson, <a href="http://www.sciencenews.org/sn_arc99/1_23_99/mathland.htm">Medieval Harmony</a> %H A003586 Raphael Schumacher, <a href="https://arxiv.org/abs/1608.06928">The Formulas for the Distribution of the 3-Smooth, 5-Smooth, 7-Smooth and all other Smooth Numbers</a>, arXiv preprint arXiv:1608.06928 [math.NT], 2016. %H A003586 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SmoothNumber.html">Smooth Number</a> %F A003586 An asymptotic formula for a(n) is roughly a(n) ~ 1/sqrt(6)*exp(sqrt(2*log(2)*log(3)*n)). - _Benoit Cloitre_, Nov 20 2001 %F A003586 A061987(n) = a(n + 1) - a(n), a(A084791(n)) = A084789(n), a(A084791(n) + 1) = A084790(n). - _Reinhard Zumkeller_, Jun 03 2003 %F A003586 Union of powers of 2 and 3 with n such that psi(n) = 2*n, where psi(n) = n*Product_(1 + 1/p) over all prime factors p of n = A001615(n). - _Lekraj Beedassy_, Sep 07 2004; corrected by _Franklin T. Adams-Watters_, Mar 19 2009 %F A003586 a(n) = 2^A022328(n)*3^A022329(n). - _N. J. A. Sloane_, Mar 19 2009 %F A003586 The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} moebius(6*n)*x^n/(1 - x^n). - _Paul D. Hanna_, Sep 18 2011 %F A003586 a(n) = A007694(n+1)/2. - _Lei Zhou_, Apr 19 2017 %p A003586 A003586 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do numtheory[factorset](a) minus {2,3} ; if % = {} then return a; end if; end do: end if; end proc: # _R. J. Mathar_, Feb 28 2011 %p A003586 with(numtheory): for i from 1 to 23328 do if(i/phi(i)=3)then print(i/6) fi od; # _Gary Detlefs_, Jun 28 2011 %t A003586 a[1] = 1; j = 1; k = 1; n = 100; For[k = 2, k <= n, k++, If[2*a[k - j] < 3^j, a[k] = 2*a[k - j], {a[k] = 3^j, j++}]]; Table[a[i], {i, 1, n}] (* Hai He (hai(AT)mathteach.net) and Gilbert Traub, Dec 28 2004 *) %t A003586 aa = {}; Do[If[EulerPhi[6 n] == 2 n, AppendTo[aa, n]], {n, 1, 1000}]; aa (* _Artur Jasinski_, Nov 05 2008 *) %t A003586 fQ[n_] := Union[ MemberQ[{1, 5}, # ] & /@ Union@ Mod[ Rest@ Divisors@ n, 6]] == {False}; fQ[1] = True; Select[ Range@ 4000, fQ] (* _Robert G. Wilson v_, Oct 26 2010 *) %t A003586 powerOfTwo = 12; Select[Nest[Union@Join[#, 2*#, 3*#] &, {1}, powerOfTwo-1], # < 2^powerOfTwo &] (* _Robert G. Wilson v_ and _T. D. Noe_, Mar 03 2011 *) %t A003586 fQ[n_] := n == 3 EulerPhi@ n; Select[6 Range@ 4000, fQ]/6 (* _Robert G. Wilson v_, Jul 08 2011 *) %t A003586 mx = 4000; Sort@ Flatten@ Table[2^i*3^j, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}] (* _Robert G. Wilson v_, Aug 17 2012 *) %t A003586 f[n_] := Block[{p2, p3 = 3^Range[0, Floor@ Log[3, n] + 1]}, p2 = 2^Floor[Log[2, n/p3] + 1]; Min[ Select[ p2*p3, IntegerQ]]]; NestList[f, 1, 54] (* _Robert G. Wilson v_, Aug 22 2012 *) %t A003586 Select[Range@4000, Last@Map[First, FactorInteger@#] <= 3 &] (* _Vincenzo Librandi_, Aug 25 2016 *) %t A003586 Select[Range[4000],Max[FactorInteger[#][[All,1]]]<4&] (* _Harvey P. Dale_, Jan 11 2017 *) %o A003586 (PARI) test(n)=for(p=2,3, while(n%p==0, n/=p)); n==1; %o A003586 for(n=1,4000,if(test(n),print1(n","))) %o A003586 (PARI) list(lim)=my(v=List(),N);for(n=0,log(lim\1+.5)\log(3),N=3^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jun 28 2011 %o A003586 (PARI) is_A003586(n)=n<5||vecmax(factor(n,5)[, 1])<5 \\ _M. F. Hasler_, Jan 16 2015 %o A003586 (PARI) list(lim)=my(v=List(), N); for(n=0, logint(lim\=1,3), N=3^n; while(N<=lim, listput(v, N); N<<=1)); Set(v) \\ _Charles R Greathouse IV_, Jan 10 2018 %o A003586 (Haskell) %o A003586 import Data.Set (Set, singleton, insert, deleteFindMin) %o A003586 smooth :: Set Integer -> [Integer] %o A003586 smooth s = x : smooth (insert (3*x) $ insert (2*x) s') %o A003586 where (x, s') = deleteFindMin s %o A003586 a003586_list = smooth (singleton 1) %o A003586 a003586 n = a003586_list !! (n-1) %o A003586 -- _Reinhard Zumkeller_, Dec 16 2010 %o A003586 (Sage) %o A003586 def isA003586(n) : %o A003586 return not any(d != 2 and d != 3 for d in prime_divisors(n)) %o A003586 @CachedFunction %o A003586 def A003586(n) : %o A003586 if n == 1 : return 1 %o A003586 k = A003586(n-1) + 1 %o A003586 while not isA003586(k) : k += 1 %o A003586 return k %o A003586 [A003586(n) for n in (1..55)] # _Peter Luschny_, Jul 20 2012 %o A003586 (Python) %o A003586 from itertools import count, takewhile %o A003586 def aupto(lim): %o A003586 pows2 = list(takewhile(lambda x: x<lim, (2**i for i in count(0)))) %o A003586 pows3 = list(takewhile(lambda x: x<lim, (3**i for i in count(0)))) %o A003586 return sorted(c*d for c in pows2 for d in pows3 if c*d <= lim) %o A003586 print(aupto(10**4)) # _Michael S. Branicky_, Jul 08 2022 %o A003586 (Python) %o A003586 from sympy import integer_log %o A003586 def A003586(n): %o A003586 def bisection(f,kmin=0,kmax=1): %o A003586 while f(kmax) > kmax: kmax <<= 1 %o A003586 while kmax-kmin > 1: %o A003586 kmid = kmax+kmin>>1 %o A003586 if f(kmid) <= kmid: %o A003586 kmax = kmid %o A003586 else: %o A003586 kmin = kmid %o A003586 return kmax %o A003586 def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1)) %o A003586 return bisection(f,n,n) # _Chai Wah Wu_, Sep 15 2024 %o A003586 (Python) # faster for initial segment of sequence %o A003586 import heapq %o A003586 from itertools import islice %o A003586 def A003586gen(): # generator of terms %o A003586 v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3] %o A003586 while True: %o A003586 v = heapq.heappop(h) %o A003586 if v != oldv: %o A003586 yield v %o A003586 oldv = v %o A003586 for p in psmooth_primes: %o A003586 heapq.heappush(h, v*p) %o A003586 print(list(islice(A003586gen(), 65))) # _Michael S. Branicky_, Sep 17 2024 %o A003586 (C++) // Returns A003586 <= threshold without approximations nor sorting %o A003586 #include <forward_list> %o A003586 std::forward_list<int> A003586(const int threshold) { %o A003586 std::forward_list<int> sequence; %o A003586 auto start_it = sequence.before_begin(); %o A003586 for (int i = 1; i <= threshold; i *= 2) { %o A003586 for (int inc = 1; std::next(start_it) != sequence.end() && inc <= i; inc *= 3) %o A003586 ++start_it; %o A003586 auto it = start_it; %o A003586 for (int j = 1; i * j <= threshold; j *= 3) { %o A003586 sequence.emplace_after(it, i * j); %o A003586 for (int inc = 1; std::next(it) != sequence.end() && inc <= i; inc *= 2) %o A003586 ++it; %o A003586 } %o A003586 } %o A003586 return sequence; %o A003586 } // _Eben Gino Lester_, Apr 17 2025 %o A003586 (Magma) [n: n in [1..4000] | PrimeDivisors(n) subset [2,3]]; // _Bruno Berselli_, Sep 24 2012 %Y A003586 Cf. A051037, A002473, A051038, A080197, A080681, A080682, A117221, A105420, A062051, A117222, A117220, A090184, A131096, A131097, A186711, A186712, A186771, A088468, A061987, A080683 (p-smooth numbers with other values of p), A025613 (a subsequence). %Y A003586 Cf. also A235365, A235366, A236210, A036561. %Y A003586 Cf. also A000244, A007694. - _Lei Zhou_, Apr 19 2017 %Y A003586 Cf. A191475 (successive values of i), A191476 (successive values of j), A022330 (indices of the pure terms 2^i), A022331 (indices of the pure terms 3^j). - _N. J. A. Sloane_, May 26 2024 %Y A003586 Cf. A221363. %K A003586 nonn,easy,nice %O A003586 1,2 %A A003586 _Paul Zimmermann_, Dec 11 1996 %E A003586 Deleted claim that this sequence is union of 2^n (A000079) and 3^n (A000244) sequences -- this does not include the terms which are not pure powers. - Walter Roscello (wroscello(AT)comcast.net), Nov 16 2008