login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A369790
Number of different coefficient values in expansion of Product_{k=1..n} (1-x^k)^3.
3
1, 4, 5, 15, 13, 31, 26, 57, 42, 91, 66, 139, 95, 209, 129, 283, 171, 365, 216, 463, 272, 573, 333, 697, 401, 825, 468, 993, 545, 1139, 629, 1315, 725, 1509, 815, 1689, 920, 1921, 1030, 2139, 1147, 2367, 1261, 2619, 1391, 2861, 1521, 3135, 1659, 3409, 1802, 3703, 1952
OFFSET
0,2
LINKS
PROG
(PARI) a(n) = #Set(Vec(prod(k=1, n, (1-x^k)^3)));
(Python)
from collections import Counter
def A369790(n):
c = {0:1}
for k in range(1, n+1):
d = Counter(c)
for j in c:
a = c[j]
d[j+k] -= 3*a
d[j+2*k] += 3*a
d[j+3*k] -= a
c = d
return len(set(c.values()))+int(max(c)+1>len(c)) # Chai Wah Wu, Feb 01 2024
CROSSREFS
Sequence in context: A308095 A321348 A257311 * A330857 A066516 A047184
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 01 2024
STATUS
approved