OFFSET
1,2
COMMENTS
Equivalently, maximum number of distinct substrings starting with a "1" digit.
LINKS
2008/9 British Mathematical Olympiad Round 2, Problem 4, Jan 29 2009.
PROG
(Python)
from itertools import product
def s(w):
return set(w[i:j+1] for i in range(len(w)) if w[i] != "0" for j in range(i, len(w)))
def a(n):
return max(len(s("1"+"".join(b))) for b in product("01", repeat=n-1))
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Jan 13 2023
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Joseph Myers, Feb 01 2009
STATUS
approved