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.

A085239 Sort the numbers 2^i and 3^j. Then a(n) is the base of the n-th term. Set a(1)=1.

This page as a plain text file.
%I A085239 #33 Mar 25 2025 15:13:09
%S A085239 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 A085239 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 A085239 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 A085239 Sort the numbers 2^i and 3^j. Then a(n) is the base of the n-th term. Set a(1)=1.
%C A085239 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 A085239 Amiram Eldar, <a href="/A085239/b085239.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..500 from T. D. Noe)
%F A085239 A006899(n) = a(n)^A085238(n).
%F A085239 For n > 1: a(n) = 2 + A006899(n) mod 2. - _Reinhard Zumkeller_, Oct 09 2013
%t A085239 m = 40;
%t A085239 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 A085239 (Haskell)
%o A085239 a085239 1 = 1
%o A085239 a085239 n = a006899 n `mod` 2 + 2  -- _Reinhard Zumkeller_, Oct 09 2013
%o A085239 (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
%o A085239 (Python)
%o A085239 from sympy import integer_log
%o A085239 def A085239(n): return 1 if n==1 else 2 if 6**integer_log(m:=3**(n-1),6)[0]<<1<m else 3 # _Chai Wah Wu_, Feb 04 2025
%Y A085239 Cf. A000079, A000244.
%Y A085239 Cf. A006899, A085238.
%Y A085239 Cf. A152683, A152935.
%K A085239 nonn
%O A085239 1,2
%A A085239 _Reinhard Zumkeller_, Jun 22 2003