On Dec 17, 2007 12:53 PM, Martin Fuller <martin_n_fuller at btinternet.com> wrote: > The following algorithm usually finds a maximal solution quite quickly: Why not simply to construct a prefix of required length of the word defined in A006697? %N A006697 Number of subwords of length n in word generated by a -> aab, b -> b. Max