A117958 Number of partitions of n into odd parts, each part occurring an odd number of times.
1, 1, 0, 2, 1, 2, 2, 2, 4, 4, 6, 4, 8, 6, 10, 12, 15, 14, 18, 20, 22, 30, 30, 36, 40, 51, 50, 66, 66, 80, 86, 102, 108, 130, 138, 164, 182, 200, 224, 250, 280, 306, 352, 378, 428, 470, 530, 566, 660, 703, 792, 854, 960, 1034, 1172, 1264, 1402, 1520, 1688, 1828, 2036
Offset: 0
Keywords
Examples
a(8) = 4 because we have [7,1], [5,3], [5,1,1,1] and [3,1,1,1,1,1].
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
g:=product(1+x^(2*k-1)/(1-x^(4*k-2)),k=1..50): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=0..65); # second Maple program: b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(`if`(irem(i*j, 2)=0, 0, b(n-i*j, i-1)), j=1..n/i) +b(n, i-1))) end: a:= n-> b(n$2): seq(a(n), n=0..60); # Alois P. Heinz, May 31 2014
-
Mathematica
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[If[Mod[i*j, 2] == 0, 0, b[n-i*j, i-1]], {j, 1, n/i}] + b[n, i-1]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 60}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *) nmax = 50; CoefficientList[Series[Product[(1 + x^(2*k-1) - x^(4*k-2)) / (1-x^(4*k-2)), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jan 03 2016 *)
Formula
G.f.: product(1+x^(2k-1)/(1-x^(4k-2)), k=1..infinity).
a(n) ~ (Pi^2/6 + 4*log(phi)^2)^(1/4) * exp(sqrt((Pi^2/6 + 4*log(phi)^2)*n)) / (4*sqrt(Pi)*n^(3/4)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jan 03 2016