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!)
A242626 Number T(n,k) of compositions of n, where k is the difference between the number of odd parts and the number of even parts, both counted without multiplicity; triangle T(n,k), n>=0, read by rows. 13

%I #22 Jan 17 2017 11:22:24

%S 1,1,1,0,1,2,2,2,3,1,2,11,2,3,2,2,14,8,6,6,33,14,11,5,15,43,45,20,44,

%T 82,99,25,6,14,74,141,230,41,12,202,260,451,85,26,6,22,351,514,953,

%U 148,54,24,766,1049,1798,355,104,18,104,1301,2321,3503,751,194

%N Number T(n,k) of compositions of n, where k is the difference between the number of odd parts and the number of even parts, both counted without multiplicity; triangle T(n,k), n>=0, read by rows.

%C T(n^2,n) = T(n^2+n,-n) = n! = A000142(n) for n>=0.

%H Alois P. Heinz, <a href="/A242626/b242626.txt">Rows n = 0..500, flattened</a>

%e T(8,-1) = 15: [2,2,2,2], [1,1,2,4], [1,1,4,2], [1,2,1,4], [1,2,4,1], [1,4,1,2], [1,4,2,1], [2,1,1,4], [2,1,4,1], [2,4,1,1], [4,1,1,2], [4,1,2,1], [4,2,1,1], [4,4], [8].

%e Triangle T(n,k) begins:

%e : n\k : -3 -2 -1 0 1 2 3 ...

%e +-----+------------------------------------

%e : 0 : 1;

%e : 1 : 1;

%e : 2 : 1, 0, 1;

%e : 3 : 2, 2;

%e : 4 : 2, 3, 1, 2;

%e : 5 : 11, 2, 3;

%e : 6 : 2, 2, 14, 8, 6;

%e : 7 : 6, 33, 14, 11;

%e : 8 : 5, 15, 43, 45, 20;

%e : 9 : 44, 82, 99, 25, 6;

%e : 10 : 14, 74, 141, 230, 41, 12;

%e : 11 : 202, 260, 451, 85, 26;

%e : 12 : 6, 22, 351, 514, 953, 148, 54;

%e : 13 : 24, 766, 1049, 1798, 355, 104;

%e : 14 : 18, 104, 1301, 2321, 3503, 751, 194;

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

%p expand(add(`if`(j=0, 1, x^(2*irem(i, 2)-1))*

%p b(n-i*j, i-1, p+j)/j!, j=0..n/i))))

%p end:

%p T:= n->(p->seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2, 0)):

%p seq(T(n), n=0..20);

%t b[n_, i_, p_] := b[n, i, p] = If[n==0, p!, If[i<1, 0, Expand[Sum[If[j==0, 1, x^(2*Mod[i, 2]-1)]*b[n-i*j, i-1, p+j]/j!, {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, Exponent[p, x, Min], Exponent[p, x]}]][b[n, n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Jan 17 2017, translated from Maple *)

%Y Columns k=(-5)-5 give: A242836, A242837, A242838, A242839, A242840, A242821, A242841, A242842, A242843, A242844, A242845.

%Y Row sums give A011782.

%Y Cf. A242498 (compositions with multiplicity), A242618 (partitions without multiplicity).

%K nonn,tabf

%O 0,6

%A _Alois P. Heinz_, May 19 2014

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 April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)