login
A369773
Maximal coefficient of (1 + x) * (1 + x - x^2) * ... * (1 + x - x^2 + ... - (-x)^n).
2
1, 1, 2, 3, 4, 6, 19, 59, 233, 1189, 7046, 45326, 356517, 3108808, 30028121, 325635647, 3830546752, 49403859787, 685063715374, 10162709827329, 162776892315940, 2754021620252692, 49463507801582609, 940216720983170113, 18786988751008626812
OFFSET
0,3
MATHEMATICA
Table[Max[CoefficientList[Product[(1 - Sum[(-x)^j, {j, 1, i}]), {i, 1, n}], x]], {n, 0, 24}]
PROG
(Python)
from collections import Counter
def A369773(n):
c = {0:1}
for k in range(1, n+1):
d = Counter(c)
for j in c:
a = c[j]
for i in range(1, k+1):
d[j+i] += (a if i&1 else -a)
c = d
return max(c.values()) # Chai Wah Wu, Feb 01 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 31 2024
STATUS
approved