OFFSET
0,2
COMMENTS
By a "square" we mean a word of the form xx, where x is a string, like the English word "murmur".
a(0)=1 is by convention. - N. J. A. Sloane, Sep 17 2015
EXAMPLE
For n = 2 the six words are 0000, 0011, 0101, and their complements.
MAPLE
for n from 1 to 13 do
B[n]:= convert(map(t-> t||t, StringTools:-Generate(n, "01")), set);
od:
C[0]:= {""}:
for n from 1 to 13 do
C[n]:= {seq(seq(seq(cat(s, t), s=B[i]), t = C[n-i]), i=1..n)};
od:
seq(nops(C[n]), n=0..13); # Robert Israel, Sep 17 2015
PROG
(Python) # MS() in A262278
from numba import njit
@njit() # comment out for n >= 32
def a(n):
if n == 0: return 1 # by convention
s = 0
for b in range(int(2**(2*n-1))):
s += MS(b, n) >= 1
return 2*s
print([a(n) for n in range(10)]) # Michael S. Branicky, Dec 29 2020
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jeffrey Shallit, Sep 17 2015
EXTENSIONS
a(14)-a(19) from Lars Blomberg, Feb 03 2019
STATUS
approved