cp's OEIS Frontend

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.

A129972 a(n) = 2*floor(log_2(n)) + 1.

Original entry on oeis.org

1, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
Offset: 1

Views

Author

Benoit Cloitre, Jun 13 2007

Keywords

Comments

The number of bits needed to write n using Elias gamma coding. - Charles R Greathouse IV, Mar 21 2012
Consists of the n-th odd number (A005408(n) = 2n+1) repeated 2^(n-1) times (since a(n) = a(n-1) except when a(n) > a(n-1) which happens for n a power of 2). - Jonathan Vos Post, Jun 17 2007

Crossrefs

Cf. A005408.
Cf. A281149 (See the comment section by Charles R Greathouse IV, of this sequence (A129972) ). - Indranil Ghosh, Jan 17 2017

Programs

Formula

a(n) = Sum_{k=1..n} (-1)^(k-1)*floor(n/k)*mu(k).