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.

A060688 Number of dissimilar ternary squarefree words of length n+1.

Original entry on oeis.org

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
Offset: 1

Views

Author

Frank Ellermann, Apr 19 2001

Keywords

Comments

Cycle b-> c-> b and a-> b-> c-> a to get 6 similar words in A006156(n+1).

Examples

			ab~ac (cycle b,c), ab~bc~ca and ac~ba~cb (cycle a,b,c) => a(1) = 6/6 = 1.
		

References

  • N. Wirth, Systematisches Programmieren, 1975, ch. 15.4, table 15.68

Crossrefs

Cf. A006156.

Programs

  • 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 *)

Formula

a(n) = A006156(n+1)/6. [corrected by Michel Marcus, Nov 26 2020]