OFFSET
1,1
COMMENTS
a(n) = the number of contiguous length-n blocks in A020985, where two blocks that differ only the order of their letters are considered the same.
LINKS
X. Lü, J. Chen, Z. Wen, and W. Wu, On the abelian complexity of the Rudin-Shapiro sequence, J. Math. Anal. Appl. 451 (2017), 822-838.
FORMULA
a(4n+1) = 2a(n)
a(4n+3) = -2a(n) + 2a(4n+2)
a(8n) = -2a(n) + 2a(2n) + a(4n)
a(8n+2) = a(2n) + a(2n+1)
a(16n+4) = 4a(n) - a(2n+1) + a(8n+4)
a(16n+6) = 2a(n) + a(4n+2)
a(16n+12) = -4a(n) - 2a(2n+1) + 4a(4n+2) + a(8n+4)
a(16n+14) = -4a(n) - 2a(2n+1) + 4a(4n+2) + a(8n+4)
EXAMPLE
For n=5 there are 24 distinct subwords, but only 4 up to abelian equivalence.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jan 15 2022
STATUS
approved