|
|
A330257
|
|
Number of length-n ternary squarefree words having no occurrences of either 010 or 212.
|
|
3
|
|
|
1, 3, 6, 10, 14, 20, 24, 30, 36, 44, 48, 60, 60, 62, 72, 82, 88, 96, 112, 120, 120, 136, 148, 164, 152, 154, 148, 162, 176, 190, 196, 210, 216, 224, 228, 248, 272, 284, 296, 300, 296, 320, 332, 356, 356, 376, 400, 416, 380, 382, 376, 382, 356, 374, 392, 410
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
An example of such a word is A036577.
|
|
REFERENCES
|
A. Thue, Über die gegenseitige Lage gleicher Teile gewisser Zeichenreihen, Norske vid. Selsk. Skr. Mat. Nat. Kl. 1 (1912), 1-67. Reprinted in Selected Mathematical Papers of Axel Thue, T. Nagell, editor, Universitetsforlaget, Oslo, 1977, pp. 413-478.
|
|
LINKS
|
|
|
MAPLE
|
filter:= proc(s) local n, j, cands;
n:= length(s);
if n >= 3 and (s[1..3] = "010" or s[1..3]="212") then return false fi;
for j from 1 to min(n/2, 5) do
if s[1..j] = s[j+1..2*j] then return false fi;
od;
if n >= 12 then
cands:= select(j -> j > 1 and j <= ceil((1+n)/2), {StringTools:-SearchAll(s[1..6], s)});
for j in cands do if s[1..j-1] = s[j..2*j-2] then return false fi od;
fi;
true
end proc:
S[0]:= {""}:
for n from 1 to 100 do
S[n]:= select(filter, map(t -> (cat("0", t), cat("1", t), cat("2", t)), S[n-1]));
od:
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|