The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A116178 Stewart's choral sequence: a(3n) = 0, a(3n-1) = 1, a(3n+1) = a(n). 12
 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS The sequence is cubefree, i.e., it contains no substrings of the form XXX where X is a sequence of 0's and 1's. The sequence is the same as the infinite binary word w(infty) generated by w(n+1)=w(n)w(n)w*(n), where n is in {0,1,2,...}, w(0)=0 and w*(n) is w(n) with the middle letter changed. (Example: w*(0)=1, w(1)=001, w*(1)=011, w(2)=001001011.) - Joel Reyes Noche (joel.noche(AT)up.edu.ph), Mar 24 2008 The sequence is the fixed point of the morphism 0->001, 1->011, starting from a(0) = 0. - Joel Reyes Noche (joel.noche(AT)up.edu.ph), Apr 28 2008 A generalized choral sequence c(3n+r_0)=0, c(3n+r_1)=1, c(3n+r_c)=c(n), with r_0=0, r_1=2, and r_c=1. - Joel Reyes Noche (joel.noche(AT)up.edu.ph), Jul 09 2009 It is an infinite Lyndon word; it has an infinite number of prefixes which are Lyndon words (0, 001, 001001011, etc.). - Joel Reyes Noche (joel.noche(AT)up.edu.ph), Nov 01 2009 This sequence (with offset 1) is given by a(3k-2)=0, a(3k-1)=a(k), a(3k)=1-a(k) for k>=1, a(0)=0; for sequences generated by such recurrences, see A189628. - Clark Kimberling, Apr 28 2011 Van der Waerden's theorem tells us there can be no infinite binary word avoiding a monochromatic arithmetic progression of length 5 (the longest is of length 177; see A121894). However, Stewart's choral sequence has the property that it has no ababa appearing in arithmetic progression, for a different from b. - Jeffrey Shallit, Jul 03 2020 REFERENCES J.R. Noche, On Stewart's Choral Sequence, Gibon, 8 (2008), 1-5. [From Joel Reyes Noche (joel.noche(AT)up.edu.ph), Aug 20 2008] J. R. Noche, Generalized Choral Sequences, Matimyas Matematika, 31 (2008), 25-28. [From Joel Reyes Noche (joel.noche(AT)up.edu.ph), Jul 09 2009] Ian Stewart, How to Cut a Cake and Other Mathematical Conundrums, Chapter 6. LINKS Antti Karttunen, Table of n, a(n) for n = 0..19683 F. M. Dekking, Permutations of N generated by left-right filling algorithms, arXiv:2001.08915 [math.CO], 2020. Gabriele Fici and Jeffrey Shallit, Properties of a Class of Toeplitz Words, arXiv:2112.12125 [cs.FL], 2021. FORMULA a(3*n) = 0, a(3*n-1) = 1 and a(3*n+1) = a(n). G.f.: x^2/(1-x^3) +x^7/(1-x^9) +x^22/(1-x^27) +... . a(-1-n) = 1-a(n). - Michael Somos, Apr 17 2007 a(k)=1 if k=3^{m+1}n+(1/2)(5*3^m-1) and a(k)=0 if k=3^{m+1}n+(1/2)(3^m-1) for m,n in {0,1,2,...}. - Joel Reyes Noche (joel.noche(AT)up.edu.ph), Mar 24 2008 MATHEMATICA t = Nest[Flatten[# /. {0->{0, 0, 1}, 1->{0, 1, 1}}] &, {0}, 5] (*A116178*) f[n_] := t[[n]] Flatten[Position[t, 0]] (*A189636*) Flatten[Position[t, 1]] (*A189637*) s[n_] := Sum[f[i], {i, 1, n}]; s = 0; Table[s[n], {n, 1, 120}] (*A189638*) (* Clark Kimberling, Apr 24 2011 *) PROG (PARI) {a(n)= if(n<0, 1-a(-1-n), if(n%3==0, 0, if(n%3==2, 1, a(n\3))))} /* Michael Somos, Apr 17 2007 */ CROSSREFS Cf. A010060, A189636, A189637, A189638, A121894. Sequence in context: A349297 A349317 A154103 * A028999 A091244 A189632 Adjacent sequences:  A116175 A116176 A116177 * A116179 A116180 A116181 KEYWORD easy,nonn AUTHOR Richard Forster (gbrl01(AT)yahoo.co.uk), Apr 15 2007 EXTENSIONS Formula added to the name by Antti Karttunen, Aug 31 2017 STATUS approved

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

Last modified August 18 19:27 EDT 2022. Contains 356215 sequences. (Running on oeis4.)