%I #46 Jan 26 2022 15:18:51
%S 1,1,1,0,0,1,1,1,0,1,1,1,0,1,1,0,1,1,2,1,1,1,0,1,1,1,1,1,2,2,1,1,0,1,
%T 1,2,3,2,2,2,1,1,0,1,1,1,2,2,2,4,3,2,2,1,1,0,1,1,2,4,5,3,4,4,2,2,1,1,
%U 0,1,1,1,2,3,3,5,7,5,4,4,2,2,1,1,0,1,1,2,4,7,7,6,8,6,4,4,2,2,1,1,0,1
%N Number T(n,k) of partitions of n, where k is the difference between the number of odd parts and the number of even parts; triangle T(n,k), n>=0, -floor(n/2)+(n mod 2)<=k<=n, read by rows.
%C T(n,k) = T(n+k,-k).
%C Sum_{k=-floor(n/2)+(n mod 2)..-1} T(n,k) = A108949(n).
%C Sum_{k=-floor(n/2)+(n mod 2)..0} T(n,k) = A171966(n).
%C Sum_{k=1..n} T(n,k) = A108950(n).
%C Sum_{k=0..n} T(n,k) = A130780(n).
%C Sum_{k=-1..1} T(n,k) = A239835(n).
%C Sum_{k<>0} T(n,k) = A171967(n).
%C T(n,-1) + T(n,1) = A239833(n).
%C Sum_{k=-floor(n/2)+(n mod 2)..n} k * T(n,k) = A209423(n).
%C Sum_{k=-floor(n/2)+(n mod 2)..n} (-1)^k*T(n,k) = A081362(n) = (-1)^n*A000700(n).
%H Alois P. Heinz, <a href="/A240009/b240009.txt">Rows n = 0..120, flattened</a>
%F G.f.: 1 / prod(n>=1, 1 - e(n)*q^n ) = 1 + sum(n>=1, e(n)*q^n / prod(k=1..n, 1-e(k)*q^k) ) where e(n) = u if n odd, otherwise 1/u; see Pari program. [_Joerg Arndt_, Mar 31 2014]
%e T(5,-1) = 1: [2,2,1].
%e T(5,0) = 2: [4,1], [3,2].
%e T(5,1) = 1: [5].
%e T(5,2) = 1: [2,1,1,1].
%e T(5,3) = 1: [3,1,1].
%e T(5,5) = 1: [1,1,1,1,1].
%e Triangle T(n,k) begins:
%e : n\k : -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 ...
%e +-----+----------------------------------------------------
%e : 0 : 1;
%e : 1 : 1;
%e : 2 : 1, 0, 0, 1;
%e : 3 : 1, 1, 0, 1;
%e : 4 : 1, 1, 0, 1, 1, 0, 1;
%e : 5 : 1, 2, 1, 1, 1, 0, 1;
%e : 6 : 1, 1, 1, 1, 2, 2, 1, 1, 0, 1;
%e : 7 : 1, 2, 3, 2, 2, 2, 1, 1, 0, 1;
%e : 8 : 1, 1, 2, 2, 2, 4, 3, 2, 2, 1, 1, 0, 1;
%e : 9 : 1, 2, 4, 5, 3, 4, 4, 2, 2, 1, 1, 0, 1;
%e : 10 : 1, 1, 2, 3, 3, 5, 7, 5, 4, 4, 2, 2, 1, 1, 0, 1;
%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
%p expand(b(n, i-1)+`if`(i>n, 0, b(n-i, i)*x^(2*irem(i, 2)-1)))))
%p end:
%p T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2)):
%p seq(T(n), n=0..14);
%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]*x^(2*Mod[i, 2]-1)]]]; T[n_] := (degree = Exponent[b[n, n], x]; ldegree = -Exponent[b[n, n] /. x -> 1/x, x]; Table[Coefficient[b[n, n], x, i], {i, ldegree, degree}]); Table[T[n], {n, 0, 14}] // Flatten (* _Jean-François Alcover_, Jan 06 2015, translated from Maple *)
%o (PARI) N=20; q='q+O('q^N);
%o e(n) = if(n%2!=0, u, 1/u);
%o gf = 1 / prod(n=1,N, 1 - e(n)*q^n );
%o V = Vec( gf );
%o { for (j=1, #V, \\ print triangle, including leading zeros
%o for (i=0, N-j, print1(" ")); \\ padding
%o for (i=-j+1, j-1, print1(polcoeff(V[j], i, u),", "));
%o print();
%o ); }
%o /* _Joerg Arndt_, Mar 31 2014 */
%Y Columns k=(-1)-10 give: A239832, A045931, A240010, A240011, A240012, A240013, A240014, A240015, A240016, A240017, A240018, A240019.
%Y Row sums give A000041.
%Y T(2n,n) gives A002865.
%Y T(4n,2n) gives A182746.
%Y T(4n+2,2n+1) gives A182747.
%Y Row lengths give A016777(floor(n/2)).
%Y Cf. A240021 (the same for partitions into distinct parts), A242618 (the same for parts counted without multiplicity).
%Y Cf. A000700, A081362, A209423.
%K nonn,tabf
%O 0,19
%A _Alois P. Heinz_, Mar 30 2014