cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A369790 Number of different coefficient values in expansion of Product_{k=1..n} (1-x^k)^3.

This page as a plain text file.
%I A369790 #19 Feb 04 2024 03:29:52
%S A369790 1,4,5,15,13,31,26,57,42,91,66,139,95,209,129,283,171,365,216,463,272,
%T A369790 573,333,697,401,825,468,993,545,1139,629,1315,725,1509,815,1689,920,
%U A369790 1921,1030,2139,1147,2367,1261,2619,1391,2861,1521,3135,1659,3409,1802,3703,1952
%N A369790 Number of different coefficient values in expansion of Product_{k=1..n} (1-x^k)^3.
%H A369790 Seiichi Manyama, <a href="/A369790/b369790.txt">Table of n, a(n) for n = 0..1000</a>
%o A369790 (PARI) a(n) = #Set(Vec(prod(k=1, n, (1-x^k)^3)));
%o A369790 (Python)
%o A369790 from collections import Counter
%o A369790 def A369790(n):
%o A369790     c = {0:1}
%o A369790     for k in range(1,n+1):
%o A369790         d = Counter(c)
%o A369790         for j in c:
%o A369790             a = c[j]
%o A369790             d[j+k] -= 3*a
%o A369790             d[j+2*k] += 3*a
%o A369790             d[j+3*k] -= a
%o A369790         c = d
%o A369790     return len(set(c.values()))+int(max(c)+1>len(c)) # _Chai Wah Wu_, Feb 01 2024
%Y A369790 Cf. A010816, A039822.
%K A369790 nonn
%O A369790 0,2
%A A369790 _Seiichi Manyama_, Feb 01 2024