login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039822 Number of different coefficient values in expansion of Product_{i=1..n} (1+q^i). 6
1, 1, 1, 2, 2, 3, 5, 8, 14, 18, 24, 30, 37, 43, 50, 58, 66, 74, 83, 93, 103, 113, 124, 136, 148, 160, 173, 187, 201, 215, 230, 246, 262, 278, 295, 313, 331, 349, 368, 388, 408, 428, 449, 471, 493, 515, 538, 562, 586, 610, 635, 661, 687, 713, 740, 768, 796, 824 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
It appears that for n>11, a(n) = floor((n^2+3n-6)/4). - Ralf Stephan, Jun 10 2005
PROG
(PARI) a(n) = #Set(Vec(prod(k=1, n, 1+x^k))); \\ Seiichi Manyama, Feb 01 2024
(Python)
from collections import Counter
def A039822(n):
c = {0:1}
for k in range(1, n+1):
d = Counter(c)
for j in c:
d[j+k] += c[j]
c = d
return len(set(c.values()))+int(max(c)+1>len(c)) # Chai Wah Wu, Feb 04 2024
CROSSREFS
Cf. A000009.
Sequence in context: A022863 A236393 A350504 * A025591 A028409 A348850
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(0)=1 prepended by Seiichi Manyama, Feb 01 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 17:06 EDT 2024. Contains 372388 sequences. (Running on oeis4.)