login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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).
The matrix sums are A131577.
Antidiagonal sums appear to be A163493.
The reverse-alternating version is also A345197 (this sequence).
Antidiagonals are A345907.
Traces are A345908.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
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.
Other tetrangles: A318393, A318816, A320808, A321912.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.
Sequence in context: A025444 A212619 A309162 * A092575 A365800 A308264
KEYWORD
nonn,tabf
AUTHOR
Gus Wiseman, Jul 03 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 15:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)