|
|
A113473
|
|
n repeated 2^(n-1) times.
|
|
14
|
|
|
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
|
|
|
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
|
|
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) {a(n) = if( n<1, 0, exponent(n)+1)}; /* Michael Somos, Jun 02 2019 */
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|