This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A036581 Ternary Thue-Morse sequence: closed under a->abc, b->ac, c->b. 5
 0, 2, 1, 0, 1, 2, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0, 1, 2, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2, 1, 0, 1, 2, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2, 1, 0, 1, 2, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 2, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS This sequence and A108694 are squarefree (they do not contain any substring XX). - Bill Gosper, Jul 22 2005 Trajectory of 1 under the morphism 0 -> 021, 1 -> 2 & 2 -> 01. - Robert G. Wilson v, Apr 06 2008 I believe that this is the sequence Cummings refers to as the Morse-Hedlund sequence. It can be constructed by starting with the Thue-Morse binary sequence A010060, 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,..., reading successive pairs of digits: 01, 11, 10, 01, 10, 00, 01, 11, 10, 00, 01, ..., and mapping 01 to 0, 10 to 1, and both 00 and 11 to 2, getting 0,2,1,0,1,2,0,2,1,... - N. J. A. Sloane, Oct 17 2012 REFERENCES L. J. Cummings, On the construction of Thue sequences, Proc. 9th S-E Conf. Combinatorics, Graph Theory and Computing, pp. 235-242. - From N. J. A. Sloane, Oct 17 2012 M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 26. LINKS R. J. Mathar, Table of n, a(n) for n = 0..10000 Marston Morse and Gustav A. Hedlund, Unending chess, symbolic dynamics and a problem in semigroups, Duke Math. J., Volume 11, Number 1 (1944), 1-7. - From N. J. A. Sloane, Oct 17 2012 FORMULA a(n) = A010060(n+1) - A010060(n) - 1 mod 3. - Bill Gosper, Jul 22 2005 MAPLE A036581 := proc(n)     A010060(n+1)-A010060(n)-1 ;     % mod 3 ; end proc: # R. J. Mathar, Oct 17 2012 MATHEMATICA Nest[ # /. {0 -> {0, 2, 1}, 1 -> {2}, 2 -> {0, 1}} &, {0}, 7] // Flatten (* Robert G. Wilson v, Apr 06 2008 *) a010060[n_]:=Mod[DigitCount[n, 2, 1], 2]; Table[Mod[a010060[n + 1] - a010060[n] - 1, 3], {n, 0, 100}] (* Indranil Ghosh, Apr 25 2017 *) PROG (Haskell) a036581 n = a036581_list !! n a036581_list = zipWith (\u v -> if u /= v then 2 * u + v - 1 else 2)                        a010060_list \$ tail a010060_list -- According to N. J. A. Sloane's comment from Oct 17 2012 -- Reinhard Zumkeller, Nov 30 2012 (Python) def a010060(n): return bin(n)[2:].count("1")%2 def a(n): return (a010060(n + 1) - a010060(n) - 1)%3 # Indranil Ghosh, Apr 25 2017 CROSSREFS Cf. A036583, A108694. Sequence in context: A179286 A193690 A108964 * A135055 A265433 A298247 Adjacent sequences:  A036578 A036579 A036580 * A036582 A036583 A036584 KEYWORD nonn,nice AUTHOR EXTENSIONS More terms from Robert G. Wilson v, Apr 06 2008 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 12 19:19 EST 2018. Contains 317116 sequences. (Running on oeis4.)