Squarefree Word

A "square" word consists of two identical adjacent subwords (for example, acbacb). A squarefree word contains no square words as subwords (for example, abcacbabcb). The only squarefree binary words are a, b, ab, ba, aba, and bab (since aa, bb, aaa, aab, abb, baa, bba, and bbb contain square identical adjacent subwords a, b, a, a, b, a, b, and b, respectively).

However, there are arbitrarily long ternary squarefree words. The number s(n) of ternary squarefree words of length n=1, 2, ... are 1, 3, 6, 12, 18, 30, 42, 60, ... (OEIS A006156), and s(n) is bounded by

 6·1.032^n<=s(n)<=6·1.379^n

(Brandenburg 1983). In addition,

 S=lim_(n->infty)[s(n)]^(1/n)=1.302...

(Brinkhuis 1983, Noonan and Zeilberger 1999).

The number of squarefree quaternary words of length n=1, 2, ... are 4, 12, 36, 96, 264, 696, ... (OEIS A051041).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.