

A116178


Stewart's choral sequence: a(3n) = 0, a(3n1) = 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(3k2)=0, a(3k1)=a(k), a(3k)=1a(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), 15. [From Joel Reyes Noche (joel.noche(AT)up.edu.ph), Aug 20 2008]
J. R. Noche, Generalized Choral Sequences, Matimyas Matematika, 31 (2008), 2528. [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



FORMULA

a(3*n) = 0, a(3*n1) = 1 and a(3*n+1) = a(n).
G.f.: x^2/(1x^3) +x^7/(1x^9) +x^22/(1x^27) +... . a(1n) = 1a(n).  Michael Somos, Apr 17 2007
a(k)=1 if k=3^{m+1}n+(1/2)(5*3^m1) and a(k)=0 if k=3^{m+1}n+(1/2)(3^m1) 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] = 0;
Table[s[n], {n, 1, 120}] (*A189638*)


PROG

(PARI) {a(n)= if(n<0, 1a(1n), if(n%3==0, 0, if(n%3==2, 1, a(n\3))))} /* Michael Somos, Apr 17 2007 */


CROSSREFS



KEYWORD

easy,nonn


AUTHOR

Richard Forster (gbrl01(AT)yahoo.co.uk), Apr 15 2007


EXTENSIONS



STATUS

approved



