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.

A116178 Stewart's choral sequence: a(3n) = 0, a(3n-1) = 1, a(3n+1) = a(n).

Original entry on oeis.org

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
Offset: 0

Views

Author

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

Keywords

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.

Crossrefs

Programs

  • 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*)
    (* Clark Kimberling, Apr 24 2011 *)
  • 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 */

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

Extensions

Formula added to the name by Antti Karttunen, Aug 31 2017