login
a(n) = A053838(n) + 1 modulo 3.
3

%I #15 Mar 15 2015 18:32:48

%S 1,2,0,2,0,1,0,1,2,2,0,1,0,1,2,1,2,0,0,1,2,1,2,0,2,0,1,2,0,1,0,1,2,1,

%T 2,0,0,1,2,1,2,0,2,0,1,1,2,0,2,0,1,0,1,2,0,1,2,1,2,0,2,0,1,1,2,0,2,0,

%U 1,0,1,2,2,0,1,0,1,2,1,2,0,2,0,1,0,1,2,1,2,0,0,1,2,1,2,0,2,0,1,1,2,0,2,0,1

%N a(n) = A053838(n) + 1 modulo 3.

%C Can construct sequence by starting with 1 and mapping 0->012, 1->120, 2->201 (e.g. 1, 120, 120201012, ...) and looking at n-th digit of a term with sufficient digits.

%H Vincenzo Librandi, <a href="/A090193/b090193.txt">Table of n, a(n) for n = 0..2000</a>

%t Mod[ Nest[ Join[ #, # + 1, # + 2] &, {1}, 5], 3] (* _Robert G. Wilson v_, Jul 27 2014 *)

%K base,nonn

%O 0,2

%A _Philippe Deléham_, Feb 04 2004