|
|
A060688
|
|
Number of dissimilar ternary squarefree words of length n+1.
|
|
4
|
|
|
1, 2, 3, 5, 7, 10, 13, 18, 24, 34, 44, 57, 76, 103, 133, 174, 232, 305, 398, 530, 691, 903, 1172, 1533, 1982, 2581, 3370, 4404, 5737, 7477, 9741, 12687, 16546, 21586, 28091, 36586, 47625, 62034, 80741, 105111, 136859, 178252
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Cycle b-> c-> b and a-> b-> c-> a to get 6 similar words in A006156(n+1).
|
|
REFERENCES
|
N. Wirth, Systematisches Programmieren, 1975, ch. 15.4, table 15.68
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
ab~ac (cycle b,c), ab~bc~ca and ac~ba~cb (cycle a,b,c) => a(1) = 6/6 = 1.
|
|
MATHEMATICA
|
(* This program is not convenient for a large number of terms *) a[n_] := a[n] = (1/6)*Length[ DeleteCases[ Tuples[ Range[3], n + 1], {a___, b__, b__, c___}]]; Reap[ Do[ Print["a[", n, "] = ", a[n]]; Sow[a[n]], {n, 1, 12}]][[2, 1]] (* Jean-François Alcover, Jul 24 2013 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|