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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089650 a(n) = A089649(n) mod 3. 1
1, 2, 0, 1, 0, 2, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 1, 1, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 1, 1, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 1, 1, 1, 2, 0, 1, 0, 2, 1, 1, 1, 1, 2, 0, 1, 0, 2, 1, 1, 1, 1, 2, 0, 1, 0, 2, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 0, 2, 1, 2, 0, 1, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Partial sums, modulo 3, of the sequence: a(1)=1, a(1), a(1), a(1), a(2), a(2), a(2), a(3), a(3), ... each term repeated 3 times.

LINKS

Table of n, a(n) for n=1..105.

Index entries for sequences that are fixed points of mappings

FORMULA

A fixed point of the morphism 1->120, 2->102, 0->111.

MATHEMATICA

Nest[ Function[ l, {Flatten[(l /. {0 -> {1, 1, 1}, 1 -> {1, 2, 0}, 2 -> {1, 0, 2}})]}], {0}, 5] (* Robert G. Wilson v, Feb 26 2005 *)

PROG

(PARI) a(n)=if(n<2, 1, (a(n-1)+a(floor((n+1)/3)))%3)

CROSSREFS

Sequence in context: A194923 A321103 A086372 * A085513 A259965 A117054

Adjacent sequences:  A089647 A089648 A089649 * A089651 A089652 A089653

KEYWORD

easy,nonn

AUTHOR

Philippe Deléham, Jan 02 2004

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 November 15 06:11 EST 2019. Contains 329144 sequences. (Running on oeis4.)