login
The OEIS is supported by the many generous donors 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
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: A339737 A364916 A365923 * A085513 A362913 A259965
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:36 EDT 2024. Contains 371968 sequences. (Running on oeis4.)