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.

A136409 a(n) = floor(n*log_3(2)).

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 18, 19, 20, 20, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 30, 31, 32, 32, 33, 34, 34, 35, 35, 36, 37, 37, 38, 39, 39, 40, 41, 41, 42, 42, 43, 44, 44, 45, 46, 46
Offset: 0

Views

Author

Ctibor O. Zizka, Mar 31 2008

Keywords

Comments

a(n) is the exponent of the greatest power of 3 not exceeding 2^n.

Crossrefs

Programs

  • Haskell
    a136409 = floor . (* logBase 3 2) . fromIntegral
    -- Reinhard Zumkeller, Jul 03 2015
    
  • Mathematica
    With[{k = Log[3, 2]}, Array[Floor[k #] &, 75, 0]] (* Michael De Vlieger, Sep 29 2019 *)
  • PARI
    a(n)=logint(2^n,3) \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    from sympy import integer_log
    def A136409(n): return integer_log(1<Chai Wah Wu, Oct 09 2024

Formula

From Benjamin Lombardo, Sep 08 2019: (Start)
a(A020914(k)) = k.
a(A054414(k)) = a(A054414(k)-1) for k > 0. (End)