login
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

%I #17 Jul 06 2021 02:52:51

%S 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,

%T 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,

%U 1,2,3,4,0,0,3,4,3,0,0,0,0,2,3,0,0,0,0,1,0,0,0

%N 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.

%C The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

%H Gus Wiseman, <a href="/A345197/a345197.png">A raster plot of the zeros in A(16).</a>

%e The matrices for n = 1..7:

%e 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

%e 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

%e 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

%e 0 1 0 0 0 2 2 0 0 0 3 4 3 0 0 0 4 6 6 4 0 0

%e 0 0 1 0 0 0 0 2 3 0 0 0 0 3 6 6 0 0

%e 0 0 1 0 0 0 0 0 3 3 0 0 0

%e 0 0 0 1 0 0 0

%e Matrix n = 5 counts the following compositions:

%e i=-3: i=-1: i=1: i=3: i=5:

%e -----------------------------------------------------------------

%e k=1: | 0 0 0 0 (5)

%e k=2: | (14) (23) (32) (41) 0

%e k=3: | 0 (131) (221)(122) (311)(113)(212) 0

%e k=4: | 0 (1211)(1112) (2111)(1121) 0 0

%e k=5: | 0 0 (11111) 0 0

%t ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==k&&ats[#]==i&]],{n,0,6},{k,1,n},{i,-n+2,n,2}]

%Y The number of nonzero terms in each matrix appears to be A000096.

%Y The number of zeros in each matrix appears to be A000124.

%Y Row sums and column sums both appear to be A007318 (Pascal's triangle).

%Y The matrix sums are A131577.

%Y Antidiagonal sums appear to be A163493.

%Y The reverse-alternating version is also A345197 (this sequence).

%Y Antidiagonals are A345907.

%Y Traces are A345908.

%Y A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.

%Y A011782 counts compositions.

%Y A097805 counts compositions by alternating (or reverse-alternating) sum.

%Y A103919 counts partitions by sum and alternating sum (reverse: A344612).

%Y A316524 gives the alternating sum of prime indices (reverse: A344616).

%Y A344610 counts partitions by sum and positive reverse-alternating sum.

%Y A344611 counts partitions of 2n with reverse-alternating sum >= 0.

%Y Other tetrangles: A318393, A318816, A320808, A321912.

%Y Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:

%Y - k = 0: counted by A088218, ranked by A344619/A344619.

%Y - k = 1: counted by A000984, ranked by A345909/A345911.

%Y - k = -1: counted by A001791, ranked by A345910/A345912.

%Y - k = 2: counted by A088218, ranked by A345925/A345922.

%Y - k = -2: counted by A002054, ranked by A345924/A345923.

%Y - k >= 0: counted by A116406, ranked by A345913/A345914.

%Y - k <= 0: counted by A058622(n-1), ranked by A345915/A345916.

%Y - k > 0: counted by A027306, ranked by A345917/A345918.

%Y - k < 0: counted by A294175, ranked by A345919/A345920.

%Y - k != 0: counted by A058622, ranked by A345921/A345921.

%Y - k even: counted by A081294, ranked by A053754/A053754.

%Y - k odd: counted by A000302, ranked by A053738/A053738.

%Y Cf. A000070, A000097, A000346, A007318, A008549, A025047, A032443, A034871, A114121, A120452, A238279, A239830, A344604.

%K nonn,tabf

%O 0,25

%A _Gus Wiseman_, Jul 03 2021