A094913 Maximal number of distinct nonempty substrings of any binary string of length n.
0, 1, 3, 5, 8, 12, 16, 21, 27, 34, 42, 50, 59, 69, 80, 92, 105, 119, 134, 150, 166, 183, 201, 220, 240, 261, 283, 306, 330
Offset: 0
Examples
The binary string 000110 of length 6 contains the 16 distinct substrings 0, 1, 00, 01, 11, 10, 000, 001, 011, 110, 0001, 0011, 0110, 00011, 00110, 000110 and a computer search shows that no other binary string of length 6 contains more than 16. Thus a(6)=16. G.f. = x + 3*x^2 + 5*x^3 + 8*x^4 + 12*x^5 + 16*x^6 + 21*x^7 + 27*x^8 + 34*x^9 + ...
Links
- The history of this problem is given in a comment in the Electronic Journal of Combinatorics. Some of the conjectures above are proven in the papers cited.
- J.-P. Allouche, J. Shallit, On the subword complexity of the fixed point of a -> aab, b -> b, and generalizations, arXiv preprint arXiv:1605.02361 [math.CO], 2016.
- Abraham Flaxman, Aram W. Harrow, Gregory B. Sorkin, Strings with Maximally Many Distinct Subsequences and Substrings, Electronic J. Combinatorics 11 (1) (2004), Paper R8.
- Antal Iványi, On the d-complexity of words, Ann. Univ. Sci. Budapest. Sect. Comput. 8 (1987), 69-90 (1988).
- Jeffrey Shallit, On the maximum number of distinct factors in a binary string, Graphs Combin. 9 (1993), no. 2, 197-200.
Programs
-
Mathematica
A103354[n_] := Floor[ FullSimplify[ ProductLog[ 2^n*Log[2]]/Log[2]]]; Accumulate[ Table[ A103354[n], {n, 1, 29}]] - 1 (* Jean-François Alcover, Dec 13 2011, after M. F. Hasler *)
Extensions
a(19)-a(28) from David W. Wilson, Dec 17 2007
More references (some proving some conjectures) added by Jeffrey Shallit, Nov 21 2015
Comments