OFFSET
1,2
EXAMPLE
For n = 4, the 6 possible sets are:
{1}, corresponding to 0111.
{1,2}, corresponding to 0011.
{1,3}, corresponding to 0101.
{1,4}, corresponding to 0110.
{1,2,3}, corresponding to 0001.
{1,2,3,4}, corresponding to 0000.
PROG
(Python)
from itertools import product
def ispal(w): return w == w[::-1]
def pls(w): return tuple(i for i in range(len(w)) if ispal(w[:i+1]))
def a(n): # only search strings starting with 0 by symmetry
return len(set(pls("0"+"".join(u)) for u in product("01", repeat=n-1)))
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Apr 03 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jeffrey Shallit, Jan 18 2019
EXTENSIONS
a(23)-a(39) from Lars Blomberg, Feb 21 2019
STATUS
approved