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.

A219762 Start with 0; repeatedly apply the map {0->012, 1->120, 2->201} to the odd-numbered terms and {0->210, 1->021, 2->102} to the even-numbered terms.

This page as a plain text file.
%I A219762 #17 Aug 09 2015 16:02:42
%S A219762 0,1,2,0,2,1,2,0,1,2,1,0,2,0,1,0,2,1,2,0,1,2,1,0,1,2,0,1,0,2,1,2,0,2,
%T A219762 1,0,2,0,1,2,1,0,1,2,0,2,1,0,2,0,1,0,2,1,2,0,1,2,1,0,1,2,0,1,0,2,1,2,
%U A219762 0,2,1,0,1,2,0,1,0,2,0,1,2,0,2,1,0,1,2,1,0,2,1,2,0,1,0,2,0,1,2,1,0,2,1,2,0
%N A219762 Start with 0; repeatedly apply the map {0->012, 1->120, 2->201} to the odd-numbered terms and {0->210, 1->021, 2->102} to the even-numbered terms.
%C A219762 An infinite squarefree sequence over {0,1,2} that is not generated by a CDOL system.
%D A219762 A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 16, Problem 13.
%H A219762 Alois P. Heinz, <a href="/A219762/b219762.txt">Table of n, a(n) for n = 1..10000</a>
%F A219762 a(n) = A099054(n-1) - 1. - _Reinhard Zumkeller_, Aug 08 2014
%e A219762 0 -> 012 -> 012021201 -> ...
%t A219762 f[lst_] := Replace[MapIndexed[{#1, #2[[1]]}&, lst], {{0, n_} :> If[OddQ[n], {0, 1, 2}, {2, 1, 0}], {1, n_} :> If[OddQ[n], {1, 2, 0}, {0, 2, 1}], {2, n_} :> If[OddQ[n], {2, 0, 1}, {1, 0, 2}]}, 1] // Flatten; Nest[f, {0}, 5] (* _Jean-François Alcover_, Mar 07 2014 *)
%o A219762 (Haskell)
%o A219762 a219762 = subtract 1 . a099054 . subtract 1
%o A219762 -- _Reinhard Zumkeller_, Aug 08 2014
%K A219762 nonn
%O A219762 1,3
%A A219762 _N. J. A. Sloane_, Dec 05 2012