%I #25 May 02 2021 11:36:00
%S 0,1,2,1,0,3,2,1,0,1,2,3,0,3,2,1,0,1,2,1,0,3,2,3,0,1,2,3,0,3,2,1,0,1,
%T 2,1,0,3,2,1,0,1,2,3,0,3,2,3,0,1,2,1,0,3,2,3,0,1,2,3,0,3,2,1,0,1,2,1,
%U 0,3,2,1,0,1,2,3,0,3,2,1,0,1,2,1,0,3,2,3,0,1,2,3,0,3,2,3,0,1,2,1,0,3,2,1,0
%N Dean's Word: Omega 2,1: the trajectory of 0 -> 01, 1 -> 21, 2 -> 03, 3 -> 23.
%C Even-indexed terms of this sequence are the sequence A099545. - _Alexandre Wajnberg_, Jan 02 2006
%C Fractal sequence: odd terms are 0, 2, 0, 2,...; the subsets formed with the terms of index (2^i)n, with i>0, are identical: a(2n)=a(4n)=a(8n)=a(16n)=... - _Alexandre Wajnberg_, Jan 02 2006
%H J.-P. Allouche and M. Mendes France, <a href="https://webusers.imj-prg.fr/~jean-paul.allouche/allmendeshouches.pdf">Automata and Automatic Sequences</a>, in: Axel F. and Gratias D. (eds), Beyond Quasicrystals. Centre de Physique des Houches, vol 3. Springer, Berlin, Heidelberg, pp. 293-367, 1995; DOI https://doi.org/10.1007/978-3-662-03130-8_11. See page 6.
%H J.-P. Allouche and M. Mendes France, <a href="/A003842/a003842.pdf">Automata and Automatic Sequences</a>, in: Axel F. and Gratias D. (eds), Beyond Quasicrystals. Centre de Physique des Houches, vol 3. Springer, Berlin, Heidelberg, pp. 293-367, 1995; DOI https://doi.org/10.1007/978-3-662-03130-8_11. See page 6. [Local copy]
%H Kirby A. Baker, George F. McNulty, Walter Taylor, <a href="https://doi.org/10.1016/0304-3975(89)90071-6">Growth Problems For Avoidable Words</a>, Theoretical Computer Science, volume 69, number 3, 1989, pages 319-345. (See morphism start of section 3, page 325.)
%H Richard A. Dean, <a href="http://www.jstor.org/stable/2313498">A sequence without repeats on x, ...</a>, Amer. Math. Monthly 72, 1965. pp. 383-385. MR 31 #350.
%H George F. McNulty, <a href="http://people.math.sc.edu/mcnulty/talks/victoria.pdf">Avoidable Words</a>, conference slides, 2003, slides 38-39. (Also <a href="http://web.archive.org/web/20150911215528id_/http://at.yorku.ca/cgi-bin/amca/cala-20">conference abstract</a>.)
%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>
%H <a href="/index/Sq#square_free">Index entries for sequences related to squarefree words</a>
%F It should be easy to prove that a(4n) = 0, a(4n+2) = 2, a(8n+1) = 1, a(8n+5) = 3, a(4n+3) = a(2n+1). This would imply that a(2n) = 2(n mod 2), a(2n+1) = 1 + 2*A014707(n), with A014707(n) the classical paperfolding curve. - _Ralf Stephan_, Dec 28 2005
%e The first few iterations of the morphism, starting with 0:
%e Start: 0
%e Rules:
%e 0 --> 01
%e 1 --> 21
%e 2 --> 03
%e 3 --> 23
%e -------------
%e 0: (#=1)
%e 0
%e 1: (#=2)
%e 01
%e 2: (#=4)
%e 0121
%e 3: (#=8)
%e 01210321
%e 4: (#=16)
%e 0121032101230321
%e 5: (#=32)
%e 01210321012303210121032301230321
%e 6: (#=64)
%e 0121032101230321012103230123032101210321012303230121032301230321
%e /* _Joerg Arndt_, Jul 18 2012 */
%t Nest[ Flatten[ # /. {0 -> {0, 1}, 1 -> {2, 1}, 2 -> {0, 3}, 3 -> {2, 3}}] &, {0}, 7] (* _Robert G. Wilson v_, Dec 27 2005 *)
%o (PARI) a(n) = 2*bittest(n,valuation(n,2)+1) + !(n%2); \\ _Kevin Ryde_, Sep 09 2020
%Y Essentially the same: A343180, also A122002 (map 0123 -> 1537), A125047 (map 0123 -> 2134).
%Y Cf. A003324.
%K nonn
%O 1,3
%A _Jeremy Gardiner_, Dec 27 2005