login
A338761
Subword complexity of a the infinite word Prod_{i>=1} Prod_{j=1..i} a^j b^(i-j+1).
2
1, 2, 4, 8, 13, 22, 37, 57, 85, 120, 165, 219, 285, 362, 453, 557, 677, 812, 965, 1135, 1325, 1534, 1765, 2017, 2293, 2592, 2917, 3267, 3645, 4050, 4485, 4949, 5445, 5972, 6533, 7127, 7757, 8422, 9125, 9865, 10645, 11464, 12325, 13227, 14173, 15162, 16197
OFFSET
0,2
COMMENTS
The infinite word is (ab)(abb.aab)(abbb.aabb.aaab)(abbbb.aabbb.aaabb.aaaab)... . Subword complexity is the number of distinct length-n blocks appearing in the sequence.
LINKS
Luke Schaeffer and Kaiyu Wu, Two Infinite Words with Cubic Subword Complexity, J. Integer Sequences 23 (2020), Art. 20.10.8.
FORMULA
Equal to 2^n for n <= 3, and n^3/6-2*n/3+(19+(-1)^n)/4 for n >= 4.
G.f.: (1 - x + 2*x^3 - 2*x^4 + 2*x^5 + 3*x^6 - 4*x^7 + x^8)/((1 - x)^4*(1 + x)). - Andrew Howroyd, Nov 18 2025
EXAMPLE
For n=4 the only subwords omitted are {abaa, baba, bbab}.
PROG
(PARI) a(n) = if(n<=3, 2^n, (2*n^3 - 8*n + 3*(19 + (-1)^n))/12); \\ Andrew Howroyd, Nov 18 2025
CROSSREFS
Cf. A338760.
Sequence in context: A244985 A164413 A164441 * A023600 A164437 A164428
KEYWORD
nonn,easy
AUTHOR
Jeffrey Shallit, Nov 07 2020
STATUS
approved