login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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. 24
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).

LINKS

Alois P. Heinz, Rows n = 0..120, flattened

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

Columns k=(-1)-10 give: A239832, A045931, A240010, A240011, A240012, A240013, A240014, A240015, A240016, A240017, A240018, A240019.

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).

Cf. A209423.

Sequence in context: A194087 A107034 A117410 * A281490 A326695 A343749

Adjacent sequences:  A240006 A240007 A240008 * A240010 A240011 A240012

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 20:51 EDT 2021. Contains 347473 sequences. (Running on oeis4.)