login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113473 n repeated 2^(n-1) times. 10
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..105.

FORMULA

a(1) = 1; for n>1 a(n) = a(floor(n/2)) + 1.

a(n) = floor(log_2(2n)).

It appears that a(n) = Sum_{k=0..n-1} (1-(-1)^A000108(k))/2. - Paul Barry, Mar 31 2008

a(n) = A070939(n) if n>0. - R. J. Mathar, Aug 13 2008

a(n) = A029837(n+1) = 1 + floor(log_2(n)) if n>0. - Michael Somos, Jun 02 2019

EXAMPLE

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

MATHEMATICA

a[ n_] := If[ n < 1, 0, BitLength[n]]; (* Michael Somos, Jun 02 2019 *)

PROG

(PARI) for(n=1, 9, for(i=1, 1<<(n-1), print1(n", "))) \\ Charles R Greathouse IV, Jun 11 2011

(PARI) {a(n) = if( n<1, 0, exponent(n)+1)}; /* Michael Somos, Jun 02 2019 */

CROSSREFS

Cf. A029837, A070939.

Sequence in context: A004258 A029837 A070939 * A265370 A238407 A196050

Adjacent sequences:  A113470 A113471 A113472 * A113474 A113475 A113476

KEYWORD

nonn,easy

AUTHOR

Zak Seidov, Jan 08 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 08:46 EDT 2021. Contains 348074 sequences. (Running on oeis4.)