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

%I #12 Oct 01 2016 21:00:09

%S 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,

%T 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,

%U 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

%N a(n) = A089649(n) mod 3.

%C 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.

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

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

%t 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 *)

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

%K easy,nonn

%O 1,2

%A _Philippe Deléham_, Jan 02 2004

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:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)