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 A093476 #17 Nov 20 2017 22:04:30 %S A093476 2,3,2,5,2,2,3,2,4,2,2,3,2,3,2,5,2,2,3,2,4,2,2,3,2,3,2,6,2,2,3,2,4,2, %T A093476 2,3,2,4,2,7,2,2,3,2,5,2,2,3,2,4,2,2,3,2,3,2,5,2,2,3,2,4,2,2,3,2,3,2, %U A093476 5,2,2,3,2,4,2,2,3,2,3,2,6,2,2,3,2,4,2,2,3,2,4,2,7,2,2,3,2,5,2,2,3,2,4,2,2 %N A093476 Index of occurrence of the first 0 bit in binary representation of 3^n. %H A093476 Robert Israel, <a href="/A093476/b093476.txt">Table of n, a(n) for n = 2..10000</a> %F A093476 It seems that Sum_{i=2..n} a(i) is asymptotic to c*n with c=2.7(8)..... %F A093476 From _Robert Israel_, Nov 20 2017: (Start) %F A093476 a(n) = k if log_2(2 - 1/2^(k-2)) < frac(n*log_2(3)) < log_2(2 - 1/2^(k-1)). By the equidistribution theorem, this occurs with asymptotic density log_2(2-1/2^(k-1)) - log_2(2-1/2^(k-2)). %F A093476 Thus c = Sum_{k>=2} k (log_2(2-1/2^(k-1)) - log_2(2 - 1/2^(k-2))) = 2 - Sum_{k>=2} log_2(1-1/2^k) = 2.791916824662... Note that A048651 is the decimal expansion of 2^(1-c). (End) %e A093476 In binary, 3^5 = [1, 1, 1, 1, 0, 0, 1, 1] where the first 0 occurs at 5th place. Hence a(5)=5. %p A093476 seq(ListTools:-Search(0, ListTools:-Reverse(convert(3^n,base,2))), n=2..200); # _Robert Israel_, Nov 20 2017 %t A093476 Array[FirstPosition[IntegerDigits[3^#, 2], 0][[1]] &, 105, 2] (* _Michael De Vlieger_, Nov 20 2017 *) %o A093476 (PARI) a(n)=if(n<2,0,s=1;while(component(binary(3^n),s)>0,s++);s) %Y A093476 Cf. A011754, A048651. %K A093476 nonn %O A093476 2,1 %A A093476 _Benoit Cloitre_, May 22 2004