The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A240009 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. 27
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,19
COMMENTS
T(n,k) = T(n+k,-k).
Sum_{k=-floor(n/2)+(n mod 2)..-1} T(n,k) = A108949(n).
Sum_{k=-floor(n/2)+(n mod 2)..0} T(n,k) = A171966(n).
Sum_{k=1..n} T(n,k) = A108950(n).
Sum_{k=0..n} T(n,k) = A130780(n).
Sum_{k=-1..1} T(n,k) = A239835(n).
Sum_{k<>0} T(n,k) = A171967(n).
T(n,-1) + T(n,1) = A239833(n).
Sum_{k=-floor(n/2)+(n mod 2)..n} k * T(n,k) = A209423(n).
Sum_{k=-floor(n/2)+(n mod 2)..n} (-1)^k*T(n,k) = A081362(n) = (-1)^n*A000700(n).
LINKS
FORMULA
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]
EXAMPLE
T(5,-1) = 1: [2,2,1].
T(5,0) = 2: [4,1], [3,2].
T(5,1) = 1: [5].
T(5,2) = 1: [2,1,1,1].
T(5,3) = 1: [3,1,1].
T(5,5) = 1: [1,1,1,1,1].
Triangle T(n,k) begins:
: n\k : -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 ...
+-----+----------------------------------------------------
: 0 : 1;
: 1 : 1;
: 2 : 1, 0, 0, 1;
: 3 : 1, 1, 0, 1;
: 4 : 1, 1, 0, 1, 1, 0, 1;
: 5 : 1, 2, 1, 1, 1, 0, 1;
: 6 : 1, 1, 1, 1, 2, 2, 1, 1, 0, 1;
: 7 : 1, 2, 3, 2, 2, 2, 1, 1, 0, 1;
: 8 : 1, 1, 2, 2, 2, 4, 3, 2, 2, 1, 1, 0, 1;
: 9 : 1, 2, 4, 5, 3, 4, 4, 2, 2, 1, 1, 0, 1;
: 10 : 1, 1, 2, 3, 3, 5, 7, 5, 4, 4, 2, 2, 1, 1, 0, 1;
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
expand(b(n, i-1)+`if`(i>n, 0, b(n-i, i)*x^(2*irem(i, 2)-1)))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2)):
seq(T(n), n=0..14);
MATHEMATICA
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 *)
PROG
(PARI) N=20; q='q+O('q^N);
e(n) = if(n%2!=0, u, 1/u);
gf = 1 / prod(n=1, N, 1 - e(n)*q^n );
V = Vec( gf );
{ for (j=1, #V, \\ print triangle, including leading zeros
for (i=0, N-j, print1(" ")); \\ padding
for (i=-j+1, j-1, print1(polcoeff(V[j], i, u), ", "));
print();
); }
/* Joerg Arndt, Mar 31 2014 */
CROSSREFS
Row sums give A000041.
T(2n,n) gives A002865.
T(4n,2n) gives A182746.
T(4n+2,2n+1) gives A182747.
Row lengths give A016777(floor(n/2)).
Cf. A240021 (the same for partitions into distinct parts), A242618 (the same for parts counted without multiplicity).
Sequence in context: A117410 A367622 A368647 * A281490 A326695 A343749
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Mar 30 2014
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 15 10:57 EDT 2024. Contains 372540 sequences. (Running on oeis4.)