%I #23 Dec 27 2016 03:16:40
%S 0,1,0,1,2,0,1,0,1,2,0,1,2,0,1,0,1,2,0,1,0,1,2,0,1,2,0,1,0,1,2,0,1,2,
%T 0,1,0,1,2,0,1,0,1,2,0,1,2,0,1,0,1,2,0,1,0,1,2,0,1,2,0,1,0,1,2,0,1,2,
%U 0,1,0,1,2,0,1,0,1,2,0,1,2,0,1,0,1,2,0,1,2,0,1,0,1,2,0,1,0,1,2,0
%N Nim sequence of game on n counters whose legal moves are removing some number of counters in A027941.
%C Aperiodic, ternary sequence.
%C Result of applying the map 0->01, 1->2 to A188432.
%C Let w(1)=01. For all i>1, let w(i)=w(i-1)w(i-1)w(i-2)...w(2)w(1)2 (as a concatenation of words). The limit of this process is this sequence.
%C Also the Nim sequence of game on n counters whose legal moves are removing either 1 counter or some number of counters in A089910.
%C a(n+2) = A159917(n), the infinite Fibonacci sequence on {0,1,2}. See also the standard form A270788 of A159917, explaining the formula below. - _Michel Dekking_, Dec 27 2016
%H N. Fox, <a href="http://vimeo.com/93540244">Aperiodic Subtraction Games</a>, Talk given at the Rutgers Experimental Mathematics Seminar, May 01 2014.
%H U. Larsson, N. Fox, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Larsson/larsson8.html">An Aperiodic Subtraction Game of Nim-Dimension Two</a>, Journal of Integer Sequences, 2015, Vol. 18, #15.7.4.
%F a(n)=0 if and only if n=0 or n is in A001950.
%F a(n)=1 if and only if a(n-1)=0, which happens if and only if n is in A026352.
%F a(n)=2 if and only if n is in A089910.
%Y Cf. A027941, A001950, A000201, A026352, A089910.
%K nonn
%O 0,5
%A _Nathan Fox_, May 03 2014