login
Number of partitions of n into odd parts, each part occurring an odd number of times.
14

%I #12 Jan 03 2016 09:28:32

%S 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,

%T 66,66,80,86,102,108,130,138,164,182,200,224,250,280,306,352,378,428,

%U 470,530,566,660,703,792,854,960,1034,1172,1264,1402,1520,1688,1828,2036

%N Number of partitions of n into odd parts, each part occurring an odd number of times.

%H Alois P. Heinz, <a href="/A117958/b117958.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: product(1+x^(2k-1)/(1-x^(4k-2)), k=1..infinity).

%F 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

%e a(8) = 4 because we have [7,1], [5,3], [5,1,1,1] and [3,1,1,1,1,1].

%p 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);

%p # second Maple program:

%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,

%p add(`if`(irem(i*j, 2)=0, 0, b(n-i*j, i-1)), j=1..n/i)

%p +b(n, i-1)))

%p end:

%p a:= n-> b(n$2):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, May 31 2014

%t 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_ *)

%t 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 *)

%K nonn

%O 0,4

%A _Emeric Deutsch_, Apr 08 2006