%I #107 Sep 18 2024 12:16:11
%S 6,12,18,24,36,48,54,72,96,108,144,162,192,216,288,324,384,432,486,
%T 576,648,768,864,972,1152,1296,1458,1536,1728,1944,2304,2592,2916,
%U 3072,3456,3888,4374,4608,5184,5832,6144,6912,7776,8748,9216,10368,11664
%N Numbers k of the form 2^i*3^j, where i and j >= 1.
%C This sequence is easily confused with A003586, which gives numbers of the form 2^i*3^j with i, j >= 0, and is one-sixth of the present sequence. . 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 Solutions to phi(n)=n/3 [See J-M. de Koninck & A. Mercier, problème 733].
%C Numbers n such that Sum_{d prime divisor of n} 1/d = 5/6. - _Benoit Cloitre_, Apr 13 2002
%C Also n such that Sum_{d|n} mu(d)^2/d = 2. - _Benoit Cloitre_, Apr 15 2002
%C Complement of A006899 with respect to A003586. - _Reinhard Zumkeller_, Sep 25 2008
%C In the sieve of Eratosthenes, if one crosses numbers off multiple times, these numbers are crossed off twice, first for 2 and then for 3. - _Alonso del Arte_, Aug 22 2011
%C Subsequence of A051037. - _Reinhard Zumkeller_, Sep 13 2011
%C Numbers n such that Sum_{d|n} A008683(d)*A000041(d) = 7. - _Carl Najafi_, Oct 19 2011
%C Numbers n such that Sum_{d|n} A008683(d)*A000700(d) = 2. - _Carl Najafi_, Oct 20 2011
%C Solutions to the equation A001615(x) = 2x. - _Enrique Pérez Herrero_, Jan 02 2012
%C So these numbers are called Psi-perfect numbers [see J-M. de Koninck & A. Mercier, problème 654]. - _Bernard Schott_, Nov 20 2020
%D J-M. de Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Ellipses, 2004, Problème 733, page 94.
%D J-M. de Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Ellipses, 2004, Problème 654, page 85.
%H Reinhard Zumkeller, <a href="/A033845/b033845.txt">Table of n, a(n) for n = 1..10000</a>
%F Six times the 3-smooth numbers (A003586). - _Ralf Stephan_, Apr 16 2004
%F A086411(a(n)) - A086410(a(n)) = 1. - _Reinhard Zumkeller_, Sep 25 2008
%F A143201(a(n)) = 2. - _Reinhard Zumkeller_, Sep 13 2011
%F a(n) = 2^A191475(n) * 3^A191476(n). - _Zak Seidov_, Nov 01 2013
%F Sum_{n>=1} 1/a(n) = 1/2. - _Amiram Eldar_, Oct 13 2020
%t mx = 12000; Sort@ Flatten@ Table[2^i*3^j, {i, Log[2, mx]}, {j, Log[3, mx/2^i]}] (* _Robert G. Wilson v_, Aug 17 2012 *)
%o (Haskell)
%o import Data.Set (singleton, deleteFindMin, insert)
%o a033845 n = a033845_list !! (n-1)
%o a033845_list = f (singleton (2*3)) where
%o f s = m : f (insert (2*m) $ insert (3*m) s') where
%o (m,s') = deleteFindMin s
%o -- _Reinhard Zumkeller_, Sep 13 2011
%o (PARI) list(lim)=my(v=List(), N); for(n=0, log(lim\2)\log(3), N=6*3^n; while(N<=lim, listput(v, N); N<<=1)); vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jan 02 2012
%o (Python)
%o from sympy import integer_log
%o def A033845(n):
%o def bisection(f,kmin=0,kmax=1):
%o while f(kmax) > kmax: kmax <<= 1
%o while kmax-kmin > 1:
%o kmid = kmax+kmin>>1
%o if f(kmid) <= kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o return kmax
%o def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1))
%o return 6*bisection(f,n,n) # _Chai Wah Wu_, Sep 15 2024
%o (Python) # faster for initial segment of sequence
%o import heapq
%o from itertools import islice
%o def A033845gen(): # generator of terms
%o v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3]
%o while True:
%o v = heapq.heappop(h)
%o if v != oldv:
%o yield 6*v
%o oldv = v
%o for p in psmooth_primes:
%o heapq.heappush(h, v*p)
%o print(list(islice(A033845gen(), 50))) # _Michael S. Branicky_, Sep 18 2024
%Y Subsequence of A000423, A003586, A051037, A256617.
%Y Cf. A001615, A006899, A086410, A086411, A008683, A143201.
%Y Cf. A191475, A191476.
%K nonn,easy
%O 1,1
%A _Jeff Burch_
%E Edited by _N. J. A. Sloane_, Jan 31 2010 and May 26 2024.