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 A056576 #40 Oct 09 2024 21:24:34 %S A056576 0,1,3,4,6,7,9,11,12,14,15,17,19,20,22,23,25,26,28,30,31,33,34,36,38, %T A056576 39,41,42,44,45,47,49,50,52,53,55,57,58,60,61,63,64,66,68,69,71,72,74, %U A056576 76,77,79,80,82,84,85,87,88,90,91,93,95,96,98,99,101,103,104,106,107 %N A056576 Highest k with 2^k <= 3^n. %H A056576 Michael De Vlieger, <a href="/A056576/b056576.txt">Table of n, a(n) for n = 0..10000</a> %H A056576 Mike Winkler, <a href="https://arxiv.org/abs/1709.03385">The algorithmic structure of the finite stopping time behavior of the 3x+ 1 function</a>, arXiv:1709.03385 [math.GM], 2017. %F A056576 a(n) = floor(log_2(3^n)) = log_2(A000244(n)-A056576(n)) = a(n-1)+A022921(n-1). %F A056576 a(n) = A020914(n) - 1. - _L. Edson Jeffery_, Dec 12 2014 %e A056576 a(3)=4 because 3^3=27 and 2^4=16 is power of 2 immediately below 27. %p A056576 seq(ilog2(3^n), n= 0 .. 1000); # _Robert Israel_, Dec 11 2014 %t A056576 Table[Floor[Log[2, 3^n]], {n, 0, 69}] (* _Robert G. Wilson v_, Apr 06 2006 *) %t A056576 Table[Floor[n*Log[2, 3]], {n, 0, 68}] (* _L. Edson Jeffery_, Dec 11 2014 *) %o A056576 (PARI) {a(n) = if( n<0, 0, logint(3^n, 2))}; /* _Michael Somos_, Dec 13 2014 */ %o A056576 (Haskell) %o A056576 a056576 = subtract 1 . a020914 -- _Reinhard Zumkeller_, May 17 2015 %o A056576 (Python) %o A056576 def A056576(n): return (3**n).bit_length()-1 # _Chai Wah Wu_, Oct 09 2024 %Y A056576 Cf. A000079 (powers of 2), A000244 (powers of 3), A020914, A022921. %Y A056576 Cf. A056850, A117630 (complement), A020857 (decimal expansion of log_2(3)), A076227, A100982. %K A056576 nonn %O A056576 0,3 %A A056576 _Henry Bottomley_, Jun 29 2000