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.

A194923 The (finite) list of ternary abelian squarefree words.

This page as a plain text file.
%I A194923 #43 Feb 16 2025 08:33:15
%S A194923 0,1,2,0,1,0,2,1,0,1,2,2,0,2,1,0,1,0,0,1,2,0,2,0,0,2,1,1,0,1,1,0,2,1,
%T A194923 2,0,1,2,1,2,0,1,2,0,2,2,1,0,2,1,2,0,1,0,2,0,1,2,0,0,1,2,1,0,2,0,1,0,
%U A194923 2,1,0,0,2,1,2,1,0,1,2,1,0,2,0,1,0,2,1,1,2,0,1,1,2,0,2,1,2,1,0,2,0,1,0,2,0
%N A194923 The (finite) list of ternary abelian squarefree words.
%C A194923 Lexicographically ordered list of words of increasing length L=1,2,3,... over the alphabet {0,1,2}, excluding those which contain two adjacent subsequences with the same multiset of symbols regardless of internal order. E.g., 0,0 or 1,1 or 2,2 or 0,1,0,1 or 0,1,2,1,0,2, etc.
%C A194923 Peter Lawrence, Sep 06 2011: In other words, this is the sequence of all possible lists over the letters "0", "1", "2", such that within a list no two adjacent segments of any length contain the same multiset of symbols, first sorted by length of list, second lists of same length are sorted lexicographically. Recursively, to each list of length N create up to two lists of length N+1 by appending the two letters that are different from the last letter of the first list, and then check for and eliminate longer abelian squares; keeping all the lists sorted as in the previous description.
%C A194923 The number of sequences of the successive lengths are 3, 6, 12, 18, 30, 30, 18, for total row lengths of 3, 12, 36, 72,150, 180, 126.
%H A194923 Franklin T. Adams-Watters, <a href="/A194923/b194923.txt">Table of n, a(n) for n = 1..579 (Complete list)</a>
%H A194923 V. Keränen, <a href="http://south.rotol.ramk.fi/keranen/ias2002/NewAbelianSquare-FreeDT0L-LanguagesOver4Letters.nb">New Abelian Square-Free DT0L-Languages over 4 Letters</a>
%H A194923 E. Weisstein, from MathWorld: <a href="https://mathworld.wolfram.com/SquarefreeWord.html">Squarefree Word</a>
%e A194923 Starting with words of length 1, the allowed ones are:
%e A194923 {{0}, {1}, {2}};
%e A194923 {{0, 1}, {0, 2}, {1, 0}, {1, 2}, {2, 0}, {2, 1}};
%e A194923 {{0, 1, 0}, {0, 1, 2}, {0, 2, 0}, {0, 2, 1}, {1, 0, 1}, {1, 0, 2}, {1, 2, 0}, {1, 2, 1}, {2, 0, 1}, {2, 0, 2}, {2, 1, 0}, {2, 1, 2}};
%e A194923 {{0, 1,0, 2}, {0, 1, 2, 0}, {0, 1, 2, 1}, {0, 2, 0, 1}, {0, 2, 1, 0}, {0, 2, 1, 2}, {1, 0, 1, 2}, {1, 0, 2, 0}, {1, 0, 2, 1}, {1, 2, 0, 1}, {1, 2, 0, 2}, {1, 2, 1, 0}, {2, 0, 1, 0}, {2, 0, 1, 2}, {2, 0, 2, 1}, {2, 1, 0, 1}, {2, 1, 0, 2}, {2, 1, 2, 0}},
%e A194923 {{0, 1, 0, 2, 0}, {0, 1, 0, 2, 1}, {0, 1, 2, 0, 1}, {0, 1, 2, 0, 2}, {0, 1, 2, 1, 0}, {0, 2, 0,1, 0}, {0, 2, 0, 1, 2}, {0, 2, 1, 0, 1}, {0, 2, 1, 0,2}, {0, 2, 1, 2, 0}, {1, 0,1, 2, 0}, {1, 0, 1, 2, 1}, {1, 0, 2, 0, 1}, {1, 0, 2, 1, 0}, {1, 0, 2, 1, 2}, {1, 2, 0, 1, 0}, {1, 2, 0, 1, 2}, {1, 2, 0, 2, 1}, {1, 2, 1, 0, 1}, {1, 2, 1, 0, 2}, {2, 0,1, 0, 2}, {2, 0, 1, 2, 0}, {2, 0, 1, 2, 1}, {2, 0, 2,1, 0}, {2, 0, 2, 1, 2}, {2,1, 0, 1, 2}, {2, 1, 0, 2, 0}, {2, 1, 0, 2, 1}, {2, 1, 2, 0, 1}, {2, 1, 2, 0, 2}},
%e A194923 {{0, 1, 0, 2, 0, 1}, {0, 1, 0, 2, 1, 0}, {0, 1,0, 2, 1, 2}, {0, 1, 2, 0, 1, 0}, {0, 1, 2, 1, 0, 1}, {0, 2, 0, 1, 0, 2}, {0, 2, 0, 1, 2, 0}, {0, 2, 0, 1, 2, 1}, {0, 2, 1, 0, 2, 0}, {0, 2, 1, 2, 0, 2}, {1, 0, 1, 2, 0, 1}, {1, 0, 1, 2, 0, 2}, {1, 0, 1, 2, 1, 0}, {1, 0, 2, 0, 1, 0}, {1, 0, 2, 1, 0, 1}, {1, 2, 0, 1, 2, 1}, {1, 2, 0, 2, 1, 2}, {1, 2, 1, 0, 1, 2}, {1, 2, 1, 0, 2, 0}, {1, 2, 1, 0, 2, 1}, {2, 0, 1, 0, 2, 0}, {2, 0, 1, 2, 0, 2}, {2, 0, 2, 1, 0, 1}, {2, 0, 2, 1, 0, 2}, {2, 0, 2, 1, 2, 0}, {2, 1, 0, 1, 2, 1}, {2, 1, 0, 2, 1, 2}, {2, 1, 2, 0, 1, 0}, {2, 1, 2, 0, 1, 2}, {2, 1, 2, 0, 2, 1}},
%e A194923 {{0, 1, 0, 2, 0, 1, 0}, {0,1, 0, 2, 1, 0, 1}, {0, 1, 2, 1, 0, 1, 2}, {0, 2, 0, 1, 0, 2, 0}, {0, 2, 0, 1, 2, 0, 2}, {0, 2, 1, 2, 0, 2, 1}, {1, 0, 1, 2, 0, 1, 0}, {1, 0, 1, 2, 1, 0, 1}, {1, 0, 2, 0, 1, 0, 2}, {1, 2, 0, 2, 1, 2, 0}, {1, 2, 1, 0, 1, 2, 1}, {1, 2, 1, 0, 2, 1, 2}, {2, 0, 1, 0, 2, 0, 1}, {2, 0, 2,1, 0, 2, 0}, {2, 0, 2, 1, 2, 0, 2}, {2,1, 0, 1, 2, 1, 0}, {2, 1, 2, 0, 1, 2, 1}, {2, 1, 2, 0, 2, 1, 2}}
%t A194923 f[n_, k_] := NestList[ DeleteCases[ Flatten[ Map[ Table[ Append[#, i - 1], {i, k}] &, #], 1], {___, u__, v__} /; Sort[{u}] == Sort[{v}]] &, {{}}, n]; f[7, 3] // Flatten (* initially from _Roger L. Bagula_ and modified by _Robert G. Wilson v_, Sep 06 2011 *)
%Y A194923 Cf. A194942, A001285, A007413, A005679, A036584, A099054, A100337, A006156, A099951.
%K A194923 nonn,tabf,fini,full
%O A194923 1,3
%A A194923 _M. F. Hasler_, Sep 04 2011, based on deleted sequence A138036 from _Roger L. Bagula_, May 02 2008
%E A194923 Edited by _Franklin T. Adams-Watters_, Sep 05 2011