login
A352228
Number of length-n blocks in the Thue-Morse sequence with intertwining pattern ABBA ABBA ABBA... .
1
0, 0, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
OFFSET
1,5
COMMENTS
Essentially a duplicate of A060973. This is 0 together with A060973.
The intertwining pattern is the list of consecutive occurrences of a block x and its binary complement x' in the Thue-Morse sequence A010060, where A codes an occurrence of x and B codes an occurrence of x'.
LINKS
Jeffrey Shallit, Intertwining of Complementary Thue-Morse Factors, arxiv preprint arXiv:2203.02917 [cs.FL], March 6 2022.
FORMULA
a(n) = A060973(n-1) for n >= 1.
EXAMPLE
For n = 4, the only block with intertwining sequence ABBA ABBA ... is 0011.
MATHEMATICA
a[n_] := a[n] = Switch[n, 1|2, 0, 3, 1, n, If[Mod[n, 2] == 1, 2*a[(n+1)/2//Floor], a[n/2//Floor] + a[1+n/2//Floor]]];
Table[a[n], {n, 1, 78}] (* Jean-François Alcover, Mar 25 2023
PROG
(Python) # Recurrence from Henry Bottomley in A060973.
from functools import cache
@cache
def a(n):
match n:
case 1 | 2: return 0
case 3: return 1
case n if n % 2 == 1: return 2*a((n+1)//2)
case _: return a(n//2) + a(1+n//2)
print([a(n) for n in range(1, 73)]) # Peter Luschny, Mar 08 2022
CROSSREFS
Cf. A010060, A060973. Related to A352227.
Sequence in context: A358178 A173022 A060973 * A097915 A255072 A029131
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Mar 08 2022
STATUS
approved