login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A295863
Number of ordered pairs of length-n mutually overlapping binary strings.
1
2, 6, 30, 130, 536, 2174, 8746, 35070, 140438, 562008, 2248460, 8994530, 35979160, 143917970, 575673270, 2302692898, 9210765608
OFFSET
1,1
COMMENTS
A pair of strings (u,v) is mutually overlapping if some nonempty suffix of u is a prefix of v, and vice versa, such as (00101010,10110001).
All terms are even. - Michael S. Branicky, Dec 06 2020
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=n):
if overlapping(u, v) and overlapping(v, u): out += 1
return 2*out # by symmetry
print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Dec 06 2020
CROSSREFS
Cf. A296600.
Sequence in context: A065563 A035105 A073969 * A224530 A120950 A055695
KEYWORD
nonn,more
AUTHOR
Jeffrey Shallit, Feb 13 2018
EXTENSIONS
a(14)-a(17) from Michael S. Branicky, Dec 06 2020
STATUS
approved