STATUS
reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
print([a(n) for n in range(1, 2021)]) # Michael S. Branicky, Jan 13 2023
print([a(n) for n in range(1, 1020)]) # Michael S. Branicky, Jan 13 2023
proposed
editing
editing
proposed
(Python)
from itertools import product
def c(w):
return len(set(w[i:j+1] for i in range(len(w)) if w[i] != "0" for j in range(i, len(w)))) + int("0" in w)
def a(n):
return max(c("1"+"".join(b)) for b in product("01", repeat=n-1))
print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Jan 13 2023
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed