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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122586 Leading digit of n expressed in base 3. 0
1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

Values 1 and 2 appear alternately and each time in runs whose lengths are the powers of 3. Each power of 3 is used twice: once for a run of 1's and then for a run of 2's.

FORMULA

a(n)=floor(n/(3^floor(log(n)/log(3))))

EXAMPLE

a(1) = 1/(3^0) = 1

MAPLE

seq( evalf(floor(n/ (3^floor(log[3](n))))), n=1..500);

CROSSREFS

Sequence in context: A145702 A029339 A029364 * A079487 A069010 A087048

Adjacent sequences:  A122583 A122584 A122585 * A122587 A122588 A122589

KEYWORD

easy,nonn,base

AUTHOR

Peter C. Heinig (algorithms(AT)gmx.de), Oct 20 2006

EXTENSIONS

Name changed by Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), Sep 29 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 12 18:43 EST 2012. Contains 205432 sequences.