|
|
A323539
|
|
Number of distinct sets of lengths of squares that are prefixes of a length-n binary word.
|
|
1
|
|
|
1, 2, 2, 4, 4, 7, 7, 11, 11, 17, 17, 25, 25, 36, 36, 50, 50, 68, 68, 90, 90, 121, 121, 154, 154, 200, 200, 256, 256, 319, 319, 395, 395, 494, 494, 599, 599
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A square is a nonempty block of the form XX, where X is any block.
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 5, the possible sets are {2,4} (for 0000); {2} (for 0011); {4} (for 0101); and the empty set.
|
|
PROG
|
(C++) See Links section.
(Python)
from itertools import product
def a(n): return len(set(tuple(l for l in range(n//2) if w[l] == "0" and w[:l] == w[l+1:2*l+1]) for w in product("01", repeat=n-1)))
|
|
CROSSREFS
|
Similar to, but not the same as A277133.
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|