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 A345908 #14 Aug 04 2022 05:07:42 %S A345908 1,1,0,1,3,3,6,15,24,43,92,171,315,629,1218,2313,4523,8835,17076, %T A345908 33299,65169 %N A345908 Traces of the matrices (A345197) counting integer compositions by length and alternating sum. %C A345908 The matrices (A345197) count the integer 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. Here, the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. So a(n) is the number of compositions of n of length (n + s)/2, where s is the alternating sum of the composition. %e A345908 The a(0) = 1 through a(7) = 15 compositions of n = 0..7 of length (n + s)/2 where s = alternating sum (empty column indicated by dot): %e A345908 () (1) . (2,1) (2,2) (2,3) (2,4) (2,5) %e A345908 (1,1,2) (1,2,2) (1,3,2) (1,4,2) %e A345908 (2,1,1) (2,2,1) (2,3,1) (2,4,1) %e A345908 (1,1,3,1) (1,1,3,2) %e A345908 (2,1,2,1) (1,2,3,1) %e A345908 (3,1,1,1) (2,1,2,2) %e A345908 (2,2,2,1) %e A345908 (3,1,1,2) %e A345908 (3,2,1,1) %e A345908 (1,1,1,1,3) %e A345908 (1,1,2,1,2) %e A345908 (1,1,3,1,1) %e A345908 (2,1,1,1,2) %e A345908 (2,1,2,1,1) %e A345908 (3,1,1,1,1) %t A345908 ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}]; %t A345908 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==(n+ats[#])/2&]],{n,0,15}] %Y A345908 Traces of the matrices given by A345197. %Y A345908 Diagonals and antidiagonals of the same matrices are A346632 and A345907. %Y A345908 Row sums of A346632. %Y A345908 A011782 counts compositions. %Y A345908 A097805 counts compositions by alternating (or reverse-alternating) sum. %Y A345908 A103919 counts partitions by sum and alternating sum (reverse: A344612). %Y A345908 A316524 gives the alternating sum of prime indices (reverse: A344616). %Y A345908 Other diagonals are A008277 of A318393 and A055884 of A320808. %Y A345908 Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k: %Y A345908 - k = 0: counted by A088218, ranked by A344619/A344619. %Y A345908 - k = 1: counted by A000984, ranked by A345909/A345911. %Y A345908 - k = -1: counted by A001791, ranked by A345910/A345912. %Y A345908 - k = 2: counted by A088218, ranked by A345925/A345922. %Y A345908 - k = -2: counted by A002054, ranked by A345924/A345923. %Y A345908 - k >= 0: counted by A116406, ranked by A345913/A345914. %Y A345908 - k <= 0: counted by A058622(n-1), ranked by A345915/A345916. %Y A345908 - k > 0: counted by A027306, ranked by A345917/A345918. %Y A345908 - k < 0: counted by A294175, ranked by A345919/A345920. %Y A345908 - k != 0: counted by A058622, ranked by A345921/A345921. %Y A345908 - k even: counted by A081294, ranked by A053754/A053754. %Y A345908 - k odd: counted by A000302, ranked by A053738/A053738. %Y A345908 Cf. A000070, A000346, A001405, A007318, A008549, A025047, A114121, A163493. %K A345908 nonn,more %O A345908 0,5 %A A345908 _Gus Wiseman_, Jul 26 2021