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
Andrew Howroyd, Table of n, a(n) for n = 0..10000
Luke Schaeffer and Kaiyu Wu, Two Infinite Words with Cubic Subword Complexity, J. Integer Sequences 23 (2020), Art. 20.10.8.
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
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
KEYWORD
nonn,easy
AUTHOR
Jeffrey Shallit, Nov 07 2020
STATUS
approved
