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-3 of 3 results.

A005679 A squarefree (or Thue-Morse) ternary sequence: closed under a->abc, b->ac, c->b.

Original entry on oeis.org

2, 1, 3, 2, 3, 1, 2, 1, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 1, 2, 1, 3, 2, 3, 1, 2, 1, 3, 1, 2, 3, 2, 1, 3, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 1, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 1, 3, 1, 2, 3, 2, 1, 3, 1, 2, 1, 3, 2, 3, 1, 2, 1, 3
Offset: 1

Views

Author

Keywords

Comments

Fixed point of the morphism 1 -> 23, 2 -> 213 & 3 -> 1. - Robert G. Wilson v, Apr 06 2008
Replacing all 4's in A005681 with 1's yields this sequence. - Sean A. Irvine, Aug 04 2016

References

  • A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 10.
  • G. Siebert, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005681.

Programs

  • Mathematica
    Nest[ # /. {1 -> {2, 3}, 2 -> {2, 1, 3}, 3 -> 1} &, {2}, 7] // Flatten (* Robert G. Wilson v, Apr 06 2008 *)
    SubstitutionSystem[{1->{2,3},2->{2,1,3},3->{1}},{2},{7}][[1]] (* Harvey P. Dale, Jul 14 2022 *)

Extensions

More terms from Robert G. Wilson v, Apr 06 2008

A170823 An infinite word on the alphabet 1, 2, 3 by Bollobas.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 25 2009

Keywords

Comments

A concatenation of blocks u_k, k >= 0, where u_k has length 5^k. The sequence is defined recursively - see the Maple code.
From Kevin Ryde, Aug 11 2020: (Start)
Bollobás gives this sequence intending it to be a squarefree ternary word, where squarefree means nowhere a repeat w w for a block w of any length. However, squares do occur in it, for example a(18) onwards is 3212 3212, or a(19) onwards is 2123 2123.
In Bollobás' proof, the signs sequence is A337004. For blocks w of length l=4, the second signs subsequence presented (which should stop at length 7), does in fact occur, as does one other.
- - + + - - + \ two l=4 signs subsequences
- + + - - + + / in A337004 making squares here
All else in the argument holds, and in particular the "peaks" reduction means the only squares are lengths l = 4*5^k.
Zolotov shows this word is cubefree, and weakly squarefree (no x w w x where x is a single symbol and w is a block, possibly empty). However uniform cyclic squarefree must wait for Leech's order 13 morphism in A337005.
(End)

References

  • B. Bollobas, The Art of Mathematics: Coffee Time in Memphis, Cambridge, 2006, pp. 226-228.

Crossrefs

Cf. A337004 (first differences as +1,-1).

Programs

  • Maple
    a:=[1,2,3,2,1]; b:=[2,3,1,3,2]; c:=[3,1,2,1,3]; S:=[1];
    for m from 1 to 6 do S:=subs({1=a[],2=b[],3=c[]},S); od: S;
  • PARI
    my(table=[0,1,2,1,0]); a(n) = my(v=digits(n,5)); sum(i=1,#v,table[v[i]+1]) %3+1; \\ Kevin Ryde, Jul 31 2020

A245188 Trajectory of 1 under repeated applications of the morphism 0->12, 1->13, 2->20, 3->21.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 21 2014

Keywords

Comments

This is the 2-block coding of the Thue-Morse word A010060.
Essentially equal to A005681. - Michel Dekking, Feb 18 2021

Crossrefs

Programs

  • Maple
    mor := proc(L)
        local Lout,w ;
        if nops(L) = 0 then
            [1,2] ;
        else
            Lout := [] ;
            for w in L do
                if w = 0 then
                    Lout := [op(Lout),1,2] ;
                elif w =1 then
                    Lout := [op(Lout),1,3] ;
                elif w =2 then
                    Lout := [op(Lout),2,0] ;
                else
                    Lout := [op(Lout),2,1] ;
                end if;
            end do:
            Lout ;
        end if;
    end proc:
    L := [1] ;
    for r from 0 to 10 do
        Lold := L ;
        L := mor(Lold) ;
        for n from 1 to nops(Lold) do
            if op(n,L) = op(n,Lold) then
                printf("%d,",op(n,L)) ;
            else
                break;
            end if;
        end do:
        print() ;
    end do: # R. J. Mathar, Oct 25 2014
  • Mathematica
    (* This gives the first 128 terms. *)
    SubstitutionSystem[{0 -> {1, 2}, 1 -> {1, 3}, 2 -> {2, 0}, 3 -> {2, 1}}, {1}, {{7}}] (* Eric Rowland, Oct 02 2016 *)
Showing 1-3 of 3 results.