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 A099396 #28 Apr 25 2024 23:59:51 %S A099396 0,0,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4, %T A099396 4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, %U A099396 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6 %N A099396 a(n) = floor(log_2((2/3)*n)) for n >= 2, a(1) = 0. %F A099396 G.f.: (1/(1-x)) * Sum_{k>=0} x^(3*2^k). %p A099396 0, seq(ilog2(2/3*n), n=2..110); # _Georg Fischer_, Aug 31 2021 %t A099396 Join[{0},Floor[Log[2,2/3 Range[2,110]]]] (* _Harvey P. Dale_, Mar 01 2012 *) %o A099396 (PARI) a(n) = if(n == 1, 0, my(L = logint(n, 2)); L + bittest(n, L-1) - 1) \\ _Mikhail Kurkov_, Mar 13 2024 %Y A099396 First differences are in A099395. Cf. A004762, A007283. %K A099396 nonn,easy %O A099396 1,6 %A A099396 _Ralf Stephan_, Oct 21 2004 %E A099396 Definition corrected by _Georg Fischer_, Aug 31 2021