login
A136409
a(n) = floor(n*log_3(2)).
7
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,5
COMMENTS
a(n) is the exponent of the greatest power of 3 not exceeding 2^n.
LINKS
Titu Andreescu and Dorin Andrica, On a class of sums involving the floor function, Mathematical Reflections 3, 2006.
H. W. Gould and Jocelyn Quaintance, Floor and Roof Function Analogs of the Bell Numbers, INTEGERS: El. J. Comb. Number Theory 7 (2007), #A58.
FORMULA
From Benjamin Lombardo, Sep 08 2019: (Start)
a(A020914(k)) = k.
a(A054414(k)) = a(A054414(k)-1) for k > 0. (End)
MATHEMATICA
With[{k = Log[3, 2]}, Array[Floor[k #] &, 75, 0]] (* Michael De Vlieger, Sep 29 2019 *)
PROG
(Haskell)
a136409 = floor . (* logBase 3 2) . fromIntegral
-- Reinhard Zumkeller, Jul 03 2015
(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<<n, 3)[0] # Chai Wah Wu, Oct 09 2024
CROSSREFS
Sequence in context: A123070 A367066 A057361 * A039729 A074065 A024811
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Mar 31 2008
STATUS
approved