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 A070941 #34 Mar 30 2023 01:49:56 %S A070941 1,2,3,3,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7, %T A070941 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8, %U A070941 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 %N A070941 Length of binary representation of 2n+1. %C A070941 Sequence consists of A011782(n) n+1's. - _Jon Perry_, Apr 04 2004 %C A070941 For n > 0: a(n) = A003314(n+1) - A003314(n) = A123753(n) - A123753(n-1). - _Reinhard Zumkeller_, Oct 12 2006 %C A070941 For k >= 2, k appears 2^(k-2) times consecutively. - _Bernard Schott_, Jun 08 2019 %C A070941 Also length of binary representation of 2n. - _Michel Marcus_, Oct 28 2020 %H A070941 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A070941 Let b(1)=1, b(n) = a(n-floor(n/2)) + 1, then a(n) = b(n+1). - _Benoit Cloitre_, Oct 23 2002 %F A070941 G.f.: 1/(1-x) * (1 + Sum_{k>=0} x^2^k). - _Ralf Stephan_, Apr 15 2002 %F A070941 a(n) = ceiling(log_2(n+1)) + 1 = A029837(n+1) + 1. - _Ralf Stephan_, Apr 15 2002 %F A070941 a(n) = ceiling(average of previous entries) + 1. - _Jon Perry_, Apr 04 2004 %t A070941 Table[IntegerLength[n,2],{n,1,201,2}] (* _Harvey P. Dale_, May 17 2011 *) %o A070941 (PARI) a(n)=length(binary(2*n+1)) %o A070941 (Python) %o A070941 def A070941(n): return n.bit_length()+1 # _Chai Wah Wu_, Mar 29 2023 %Y A070941 Bisection of A070939 and also of A070940. %K A070941 nonn %O A070941 0,2 %A A070941 _N. J. A. Sloane_, May 18 2002