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.

A099396 a(n) = floor(log_2((2/3)*n)) for n >= 2, a(1) = 0.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6
Offset: 1

Views

Author

Ralf Stephan, Oct 21 2004

Keywords

Crossrefs

First differences are in A099395. Cf. A004762, A007283.

Programs

  • Maple
    0, seq(ilog2(2/3*n), n=2..110); # Georg Fischer, Aug 31 2021
  • Mathematica
    Join[{0},Floor[Log[2,2/3 Range[2,110]]]] (* Harvey P. Dale, Mar 01 2012 *)
  • PARI
    a(n) = if(n == 1, 0, my(L = logint(n, 2)); L + bittest(n, L-1) - 1) \\ Mikhail Kurkov, Mar 13 2024

Formula

G.f.: (1/(1-x)) * Sum_{k>=0} x^(3*2^k).

Extensions

Definition corrected by Georg Fischer, Aug 31 2021