OFFSET
1,1
COMMENTS
We say the pair (u,v) is mutually overlapping if some nonempty prefix of u is a suffix of v, and vice versa. For n = 3, an example is (011,110110). If C(m,n) is the number of mutually overlapping ordered pairs (u,v) with |u|=m and |v|=n, then C(m,2m+a) = 2^a C(m,2m) for a >= 0, so the case enumerated by this sequence is in some sense the most useful to understand.
PROG
(Python)
from itertools import product
def overlapping(u, v):
for i in range(1, 1+min(len(u), len(v))):
if v[:i]==u[-i:]: return True
return False
def a(n):
out = 0
for u in product("01", repeat=n-1):
u = ("0", ) + u
for v in product("01", repeat=2*n):
if overlapping(u, v) and overlapping(v, u): out += 1
return 2*out # by symmetry
print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Jul 01 2023
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jeffrey Shallit, Feb 15 2018
EXTENSIONS
a(9)-a(13) from Lars Blomberg, Nov 30 2018
STATUS
approved