We extend the theorem of Fine and Wilf to words having three periods. We th
en define the set 3-PER of words of maximal length for which such result do
es not apply. We prove that the set 3-PER and the sequences of complexity 2
n + 1, introduced by Arnoux and Rauzy to generalize Sturmian words, have th
e same set of factors. (C) 1999 Elsevier Science B.V. All rights reserved.