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 A191475 #36 Sep 16 2024 12:48:16 %S A191475 1,2,1,3,2,4,1,3,5,2,4,1,6,3,5,2,7,4,1,6,3,8,5,2,7,4,1,9,6,3,8,5,2,10, %T A191475 7,4,1,9,6,3,11,8,5,2,10,7,4,12,1,9,6,3,11,8,5,13,2,10,7,4,12,1,9,6, %U A191475 14,3,11,8,5,13,2,10,7,15,4,12,1,9,6,14,3,11 %N A191475 Values of i in the numbers 2^i*3^j, i >= 1, j >= 1 (A033845). %C A191475 Signature sequence of log_2(3) (A020857). - _R. J. Mathar_, May 27 2024 %H A191475 Zak Seidov, <a href="/A191475/b191475.txt">Table of n, a(n) for n = 1..10000</a> %H A191475 <a href="/index/Si#signature_sequences">Index entries for sequences related to signature sequences</a> %e A191475 a(10) = 2 because A033845(10) = 108 = 2^2*3^3. %e A191475 a(100) = 2 because A033845(100) = 59872 = 2^8*3^7. %e A191475 a(1000) = 56 because A033845(1000) = 216172782113783808 = 2^56*3^1. %t A191475 mx = 1000000; t = Select[Sort[Flatten[Table[2^i 3^j, {i, Log[2, mx]}, {j, Log[3, mx]}]]], # <= mx &]; Table[FactorInteger[i][[1, 2]], {i, t}] (* _T. D. Noe_, Aug 31 2012 *) %o A191475 (Python) %o A191475 from sympy import integer_log %o A191475 def A191475(n): %o A191475 def bisection(f,kmin=0,kmax=1): %o A191475 while f(kmax) > kmax: kmax <<= 1 %o A191475 while kmax-kmin > 1: %o A191475 kmid = kmax+kmin>>1 %o A191475 if f(kmid) <= kmid: %o A191475 kmax = kmid %o A191475 else: %o A191475 kmin = kmid %o A191475 return kmax %o A191475 def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1)) %o A191475 return 1+(~(m:=bisection(f,n,n))&m-1).bit_length() # _Chai Wah Wu_, Sep 15 2024 %Y A191475 Cf. A003586 (numbers 2^i*3^j, i >= 0, j >= 0), A033845 (numbers 2^i*3^j, i >= 1, j >= 1), A191476 (values of j), A020857. %K A191475 nonn %O A191475 1,2 %A A191475 _Zak Seidov_, Aug 30 2012 %E A191475 Edited by _N. J. A. Sloane_, May 26 2024