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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122587 Leading digit of n in base 4. 0
1, 2, 3, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 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

Digits 1, 2 and 3 appear cyclically and each time in runs whose lengths are the powers of 4.

FORMULA

a(n)=floor(n/(4^floor(log[4](n))))

EXAMPLE

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

MAPLE

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

MATHEMATICA

Table[First[IntegerDigits[n, 4]], {n, 100}] (* Alonso del Arte, Sep 30 2011 *)

CROSSREFS

Sequence in context: A081371 A027870 A070077 * A086195 A086197 A139336

Adjacent sequences:  A122584 A122585 A122586 * A122588 A122589 A122590

KEYWORD

easy,nonn,base

AUTHOR

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

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.