login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062153 a(n) = floor(log_3(n)). 25
0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,9

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..1000

FORMULA

a(n) = (number of digits of n when written in base 3) - 1.

a(n) = if n > 2 then a(floor(n / 3)) + 1 else 0. - Reinhard Zumkeller, Oct 29 2001

G.f.: (1/(1 - x))*Sum_{k>=1} x^(3^k). - Ilya Gutkovskiy, Jan 08 2017

MATHEMATICA

Floor[Log[3, Range[120]]]  (* Harvey P. Dale, Apr 30 2011 *)

PROG

(MAGMA) [ Ilog(3, n) : n in [1..100] ]; // N. J. A. Sloane, Dec 23 2006

(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

CROSSREFS

Cf. A000244, A000523, A007089, A102572.

Sequence in context: A214081 A194338 A176170 * A217693 A204560 A135661

Adjacent sequences:  A062150 A062151 A062152 * A062154 A062155 A062156

KEYWORD

easy,nonn

AUTHOR

Henry Bottomley, Jun 06 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 9 00:32 EST 2019. Contains 329871 sequences. (Running on oeis4.)