|
|
A345197
|
|
Concatenation of square matrices A(n), each read by rows, where A(n)(k,i) is the number of compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2.
|
|
49
|
|
|
1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 2, 3, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 3, 4, 0, 0, 3, 4, 3, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 1, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,25
|
|
COMMENTS
|
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
|
|
LINKS
|
|
|
EXAMPLE
|
The matrices for n = 1..7:
1 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1
1 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0
0 1 0 0 1 2 0 0 1 2 3 0 0 1 2 3 4 0 0 1 2 3 4 5 0
0 1 0 0 0 2 2 0 0 0 3 4 3 0 0 0 4 6 6 4 0 0
0 0 1 0 0 0 0 2 3 0 0 0 0 3 6 6 0 0
0 0 1 0 0 0 0 0 3 3 0 0 0
0 0 0 1 0 0 0
Matrix n = 5 counts the following compositions:
i=-3: i=-1: i=1: i=3: i=5:
-----------------------------------------------------------------
k=1: | 0 0 0 0 (5)
k=2: | (14) (23) (32) (41) 0
k=3: | 0 (131) (221)(122) (311)(113)(212) 0
k=4: | 0 (1211)(1112) (2111)(1121) 0 0
k=5: | 0 0 (11111) 0 0
|
|
MATHEMATICA
|
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Length[#]==k&&ats[#]==i&]], {n, 0, 6}, {k, 1, n}, {i, -n+2, n, 2}]
|
|
CROSSREFS
|
The number of nonzero terms in each matrix appears to be A000096.
The number of zeros in each matrix appears to be A000124.
Row sums and column sums both appear to be A007318 (Pascal's triangle).
Antidiagonal sums appear to be A163493.
The reverse-alternating version is also A345197 (this sequence).
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
Cf. A000070, A000097, A000346, A007318, A008549, A025047, A032443, A034871, A114121, A120452, A238279, A239830, A344604.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|