A357646 Triangle read by rows where T(n,k) is the number of integer compositions of n with skew-alternating sum k, where k ranges from -n to n in steps of 2.
1, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 3, 3, 1, 1, 0, 4, 5, 5, 1, 1, 0, 5, 7, 10, 8, 1, 1, 0, 6, 9, 17, 18, 12, 1, 1, 0, 7, 11, 27, 35, 29, 17, 1, 1, 0, 8, 13, 41, 63, 63, 43, 23, 1, 1, 0, 9, 15, 60, 106, 126, 104, 60, 30, 1, 1, 0, 10, 17, 85, 168, 232, 230, 162, 80, 38, 1, 1
Offset: 0
Examples
Triangle begins: 1 0 1 0 1 1 0 2 1 1 0 3 3 1 1 0 4 5 5 1 1 0 5 7 10 8 1 1 0 6 9 17 18 12 1 1 0 7 11 27 35 29 17 1 1 0 8 13 41 63 63 43 23 1 1 0 9 15 60 106 126 104 60 30 1 1 Row n = 6 counts the following compositions: (15) (24) (33) (42) (51) (6) (114) (213) (312) (411) (123) (222) (321) (1113) (132) (231) (1122) (2112) (141) (1131) (1212) (3111) (1221) (2121) (11112) (1311) (2211) (11121) (11211) (21111) (12111) (111111)
Programs
-
Mathematica
skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],skats[#]==k&]],{n,0,10},{k,-n,n,2}]
Comments