%I #24 May 10 2024 11:00:02
%S 1,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,2,3,2,3,
%T 2,2,3,2,3,2,2,3,2,3,2,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,2,3,2,3,2,2,3,
%U 2,3,2,2,3,2,3,2,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,2,3,2,3,2,2,3,2,3,2
%N Sort the numbers 2^i and 3^j. Then a(n) is the base of the n-th term. Set a(1)=1.
%C The density of 2's in this sequence is log(3)/log(6). The density of 3's in this sequence is log(2)/log(6). - _Jennifer Buckley_, Apr 24 2024
%H T. D. Noe, <a href="/A085239/b085239.txt">Table of n, a(n) for n=1..500</a>
%F A006899(n) = a(n)^A085238(n).
%F For n > 1: a(n) = 2 + A006899(n) mod 2. - _Reinhard Zumkeller_, Oct 09 2013
%t m = 40;
%t Join[{1}, If[Total[IntegerDigits[#, 2]] == 1, 2, 3]& /@ Union[3^Range[m], 2^Range[Length[IntegerDigits[3^m, 2]] - 1]]] (* _Jean-François Alcover_, Oct 07 2021 *)
%o (Haskell)
%o a085239 1 = 1
%o a085239 n = a006899 n `mod` 2 + 2 -- _Reinhard Zumkeller_, Oct 09 2013
%o (PARI) upto(L) = my(v2=2, v3=1, r=List(1)); while(v3<L, v3*=3; while(v2<v3 && v2<=L, listput(~r, 2); v2*=2); v3<=L && listput(~r, 3)); Vec(r); \\ _Ruud H.G. van Tol_, May 10 2024
%Y Cf. A000079, A000244.
%Y Cf. A006899, A085238.
%Y Cf. A152683, A152935.
%K nonn
%O 1,2
%A _Reinhard Zumkeller_, Jun 22 2003