OFFSET
1,3
FORMULA
EXAMPLE
a(6) = 13 subsets: {2}, {4}, {6}, {1, 3}, {2, 6}, {3, 5}, {1, 2, 3}, {1, 5, 6}, {2, 4, 6}, {3, 4, 5}, {1, 4, 5, 6}, {2, 3, 5, 6} and {2, 3, 4, 5, 6}.
PROG
(Python)
from functools import lru_cache
def cond(s, c): q, r = divmod(s, c); return r == 0 and q&1 == 0
@lru_cache(maxsize=None)
def b(n, s, c):
if n == 0: return int (c > 0 and cond(s, c))
return b(n-1, s, c) + b(n-1, s+n, c+1)
a = lambda n: b(n, 0, 0)
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Sep 25 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Sep 25 2022
EXTENSIONS
a(24)-a(37) from Michael S. Branicky, Sep 25 2022
STATUS
approved