The Lexicographically Least Square-Free Word with a Given Prefix
The lexicographically least square-free infinite word on the alphabet of non-negative integers with a given prefix $p$ is denoted $L(p)$. When $p$ is the empty word, this word was shown by Guay-Paquet and Shallit to be the ruler sequence. For other prefixes, the structure is significantly more complicated. In this paper, we show that $L(p)$ reflects the structure of the ruler sequence for several words $p$. We provide morphisms that generate $L(n)$ for letters $n=1$ and $n\geq3$, and $L(p)$ for most families of two-letter words $p$.