login
A369787
Number of different coefficient values in expansion of Product_{k=1..n} (1+x^(k*(k+1)/2)).
1
1, 1, 2, 2, 3, 3, 4, 5, 6, 8, 13, 19, 28, 44, 71, 112, 168, 249, 321, 419, 549, 652, 797, 939, 1104, 1265, 1440, 1638, 1842, 2059, 2295, 2538, 2809, 3087, 3385, 3698, 4032, 4381, 4754, 5143, 5554, 5985, 6437, 6910, 7405, 7922, 8463, 9027, 9615, 10227, 10865, 11528
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
Sequence in context: A064650 A174619 A130083 * A363994 A286219 A117357
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 01 2024
STATUS
approved