editing
approved
editing
approved
(PARI) { default(realprecision, 100); t=1/log(3); for (n=1, 1000, write("b062153.txt", n, " ", floor(t*log(n) + 0.0000001)) ) } \\ Harry J. Smith, Aug 02 2009
(PARI) a(n)=logint(n, 3) \\ Charles R Greathouse IV, Nov 15 2022
approved
editing
(MAGMAMagma) [ Ilog(3, n) : n in [1..100] ]; // N. J. A. Sloane, Dec 23 2006
proposed
approved
editing
proposed
Floor [ a(n) = floor(log_3(n) ]).
Harry J. Smith, <a href="/A062153/b062153.txt">Table of n, a(n) for n = 1,...,1000</a>
a(n) = (number of digits of n when written in base 3) - 1.
(MAGMA) [ Ilog(3, n) : n in [1..100] ]; (_// _N. J. A. Sloane_, Dec 23 2006)
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
G.f.: (1/(1 - x))*Sum_{k>=1} x^(3^k). - Ilya Gutkovskiy, Jan 08 2017
approved
editing