cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A089650 a(n) = A089649(n) mod 3.

This page as a plain text file.
%I A089650 #12 Oct 01 2016 21:00:09
%S A089650 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 A089650 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 A089650 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 A089650 a(n) = A089649(n) mod 3.
%C A089650 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 A089650 <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>
%F A089650 A fixed point of the morphism 1->120, 2->102, 0->111.
%t A089650 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 A089650 (PARI) a(n)=if(n<2,1,(a(n-1)+a(floor((n+1)/3)))%3)
%K A089650 easy,nonn
%O A089650 1,2
%A A089650 _Philippe Deléham_, Jan 02 2004