Fraenkel and Simpson [A.S. Fraenkel, J. Simpson, How many squares can a string contain? J. Combin. Theory Ser. A 82 (1998) 112-120] proved that the number of squares in a word of length n is bounded by 2 n. In this note we improve this bound to 2 n - Θ (log n). Based on the numerical evidence, the conjectured bound is n. © 2007 Elsevier Ltd. All rights reserved.
Ilie, L. (2007). A note on the number of squares in a word. Theoretical Computer Science, 380(3), 373–376. https://doi.org/10.1016/j.tcs.2007.03.025