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!)
A039824 Number of different coefficient values in expansion of Product (1+q^1+q^3...+q^(2i-1)), i=1 to n. 2
1, 2, 4, 11, 20, 31, 46, 61, 78, 97, 118, 141, 166, 193, 222, 253, 286, 321, 358, 397, 438, 481, 526, 573, 622, 673, 726, 781, 838, 897, 958, 1021, 1086, 1153, 1222, 1293, 1366, 1441, 1518, 1597, 1678, 1761, 1846, 1933, 2022, 2113, 2206, 2301, 2398, 2497 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Conjecture: for n>6, a(n) = n^2 - 3. - Ralf Stephan, Mar 07 2004
Conjectures from Colin Barker, May 02 2017: (Start)
G.f.: x*(1 - x + x^2 + 4*x^3 - 3*x^4 + 2*x^6 - 4*x^7 + 2*x^8) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>9.
(End)
MATHEMATICA
p[1] = 1 + q; p[n_] := p[n] = p[n - 1] (1 + Sum[q^k, {k, 1, 2 n - 1, 2}]) // Expand; a[1] = 1; a[n_] := p[n] // CoefficientList[#, q]& // Union // Length; Array[a, 180] (* Jean-François Alcover, May 04 2017 *)
PROG
(Python)
def get(d, x): return d[x] if len(d) > x >= 0 else 0
def convolve(a, b):
r = []
for x in range(len(a) + len(b) - 1):
n = 0
for k in range(x + 1): n += get(a, k) * get(b, x - k)
r.append(n)
return r
def unique_in(d):
out = list([])
for elem in d:
if elem not in out: out.append(elem)
return len(out)
def A039824(x):
seed = [0**k + k % 2 for k in range(2*(x+1))]
product = seed[0:2]
out = list([1])
for k in range(2, x + 1):
product = convolve(product, seed[0:2*k])
out.append(unique_in(product))
return out
# J. Conrad, May 02 2017
CROSSREFS
Cf. A028872.
Sequence in context: A283254 A347007 A000638 * A204519 A076636 A011954
KEYWORD
nonn
AUTHOR
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 March 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)