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.

Showing 1-2 of 2 results.

A036578 Ternary Thue-Morse sequence: closed under a->abc, b->ac, c->b.

Original entry on oeis.org

1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2
Offset: 0

Views

Author

Keywords

Comments

Trajectory of 1 under the morphism 0 -> 12, 1 -> 102 & 2 -> 0. - Robert G. Wilson v, Apr 06 2008

References

  • Brian Hayes, Group Theory in the Bedroom and other Mathematical Diversions, Hill and Wang, A division of Farrar, Straus and Giroux, NY, 2008, pages 190-194.
  • M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 26.

Crossrefs

Programs

  • Mathematica
    Nest[ # /. {0 -> {1, 2}, 1 -> {1, 0, 2}, 2 -> {0}} &, {0}, 7] // Flatten (* Robert G. Wilson v, Apr 06 2008 *)

A234538 (Number of positive digits of n written in base 3) modulo 3.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 0, 0, 2, 0, 0, 1, 2, 2, 2, 0, 0, 2, 0, 0, 1, 2, 2, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 1, 1, 2, 2, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 1, 1, 2, 2, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1
Offset: 0

Views

Author

Vladimir Shevelev, Jan 13 2014

Keywords

Comments

Since A000120 is the number of positive digits of n written in binary, this sequence is a formal ternary analog of the Thue-Morse sequence A010060. However, one cannot name it a "ternary version of A010060" like the known versions A053838, A071858, A036577-A036586, since it is not "cubefree"; i.e., it contains the same 3 consecutive terms, and there is not a known morphism for which it is a fixed point.

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[Plus @@ DigitCount[n, 3, {1, 2}], 3]; Array[a, 100, 0] (* Amiram Eldar, Jul 24 2023 *)
  • PARI
    a(n)=my(d=digits(n, 3)); sum(i=1, #d, !d[i])%3 \\ Charles R Greathouse IV, Jan 13 2014

Formula

A160384(n) == a(n) (mod 3).
Showing 1-2 of 2 results.