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 A113473 #32 Dec 07 2024 18:29:29 %S A113473 1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6, %T A113473 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7, %U A113473 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,7,7,7,7,7,7,7 %N A113473 n repeated 2^(n-1) times. %F A113473 a(1) = 1; for n>1 a(n) = a(floor(n/2)) + 1. %F A113473 a(n) = floor(log_2(2n)). %F A113473 It appears that a(n) = Sum_{k=0..n-1} (1-(-1)^A000108(k))/2. - _Paul Barry_, Mar 31 2008 %F A113473 a(n) = A070939(n) if n>0. - _R. J. Mathar_, Aug 13 2008 %F A113473 a(n) = A029837(n+1) = 1 + floor(log_2(n)) if n>0. - _Michael Somos_, Jun 02 2019 %e A113473 G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + ... - _Michael Somos_, Jun 02 2019 %t A113473 a[ n_] := If[ n < 1, 0, BitLength[n]]; (* _Michael Somos_, Jun 02 2019 *) %t A113473 Table[PadRight[{},2^(n-1),n],{n,10}]//Flatten (* _Harvey P. Dale_, Dec 07 2024 *) %o A113473 (PARI) for(n=1,9,for(i=1,1<<(n-1),print1(n", "))) \\ _Charles R Greathouse IV_, Jun 11 2011 %o A113473 (PARI) {a(n) = if( n<1, 0, exponent(n)+1)}; /* _Michael Somos_, Jun 02 2019 */ %o A113473 (Python) %o A113473 def A113473(n): return n.bit_length() # _Chai Wah Wu_, Oct 14 2022 %Y A113473 Cf. A029837, A070939. %Y A113473 Partial sums of A036987. %K A113473 nonn,easy %O A113473 1,2 %A A113473 _Zak Seidov_, Jan 08 2006