OFFSET
0,3
PROG
(PARI) a(n) = #Set(Vec(prod(k=1, n, 1+x^(k*(k+1)/2))));
(Python)
from collections import Counter
def A369787(n):
c = {0:1}
for k in range(1, n+1):
m, d = k*(k+1)>>1, Counter(c)
for j in c:
d[j+m] += c[j]
c = d
return len(set(c.values()))+int(max(c)+1>len(c)) # Chai Wah Wu, Feb 01 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 01 2024
STATUS
approved