This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A345197 #17 Jul 06 2021 02:52:51 %S A345197 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 A345197 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 A345197 1,2,3,4,0,0,3,4,3,0,0,0,0,2,3,0,0,0,0,1,0,0,0 %N 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. %C A345197 The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. %H A345197 Gus Wiseman, <a href="/A345197/a345197.png">A raster plot of the zeros in A(16).</a> %e A345197 The matrices for n = 1..7: %e A345197 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 A345197 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 A345197 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 A345197 0 1 0 0 0 2 2 0 0 0 3 4 3 0 0 0 4 6 6 4 0 0 %e A345197 0 0 1 0 0 0 0 2 3 0 0 0 0 3 6 6 0 0 %e A345197 0 0 1 0 0 0 0 0 3 3 0 0 0 %e A345197 0 0 0 1 0 0 0 %e A345197 Matrix n = 5 counts the following compositions: %e A345197 i=-3: i=-1: i=1: i=3: i=5: %e A345197 ----------------------------------------------------------------- %e A345197 k=1: | 0 0 0 0 (5) %e A345197 k=2: | (14) (23) (32) (41) 0 %e A345197 k=3: | 0 (131) (221)(122) (311)(113)(212) 0 %e A345197 k=4: | 0 (1211)(1112) (2111)(1121) 0 0 %e A345197 k=5: | 0 0 (11111) 0 0 %t A345197 ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}]; %t A345197 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==k&&ats[#]==i&]],{n,0,6},{k,1,n},{i,-n+2,n,2}] %Y A345197 The number of nonzero terms in each matrix appears to be A000096. %Y A345197 The number of zeros in each matrix appears to be A000124. %Y A345197 Row sums and column sums both appear to be A007318 (Pascal's triangle). %Y A345197 The matrix sums are A131577. %Y A345197 Antidiagonal sums appear to be A163493. %Y A345197 The reverse-alternating version is also A345197 (this sequence). %Y A345197 Antidiagonals are A345907. %Y A345197 Traces are A345908. %Y A345197 A000041 counts partitions of 2n with alternating sum 0, ranked by A000290. %Y A345197 A011782 counts compositions. %Y A345197 A097805 counts compositions by alternating (or reverse-alternating) sum. %Y A345197 A103919 counts partitions by sum and alternating sum (reverse: A344612). %Y A345197 A316524 gives the alternating sum of prime indices (reverse: A344616). %Y A345197 A344610 counts partitions by sum and positive reverse-alternating sum. %Y A345197 A344611 counts partitions of 2n with reverse-alternating sum >= 0. %Y A345197 Other tetrangles: A318393, A318816, A320808, A321912. %Y A345197 Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k: %Y A345197 - k = 0: counted by A088218, ranked by A344619/A344619. %Y A345197 - k = 1: counted by A000984, ranked by A345909/A345911. %Y A345197 - k = -1: counted by A001791, ranked by A345910/A345912. %Y A345197 - k = 2: counted by A088218, ranked by A345925/A345922. %Y A345197 - k = -2: counted by A002054, ranked by A345924/A345923. %Y A345197 - k >= 0: counted by A116406, ranked by A345913/A345914. %Y A345197 - k <= 0: counted by A058622(n-1), ranked by A345915/A345916. %Y A345197 - k > 0: counted by A027306, ranked by A345917/A345918. %Y A345197 - k < 0: counted by A294175, ranked by A345919/A345920. %Y A345197 - k != 0: counted by A058622, ranked by A345921/A345921. %Y A345197 - k even: counted by A081294, ranked by A053754/A053754. %Y A345197 - k odd: counted by A000302, ranked by A053738/A053738. %Y A345197 Cf. A000070, A000097, A000346, A007318, A008549, A025047, A032443, A034871, A114121, A120452, A238279, A239830, A344604. %K A345197 nonn,tabf %O A345197 0,25 %A A345197 _Gus Wiseman_, Jul 03 2021