|
|
A357642
|
|
Number of even-length integer compositions of 2n whose half-alternating sum is 0.
|
|
22
|
|
|
1, 0, 1, 4, 13, 48, 186, 712, 2717, 10432, 40222, 155384, 601426, 2332640, 9063380, 35269392, 137438685, 536257280, 2094786870, 8191506136, 32063203590, 125613386912, 492516592620, 1932569186288, 7588478653938, 29816630378368, 117226929901676, 461151757861552
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...
|
|
LINKS
|
|
|
EXAMPLE
|
The a(0) = 1 through a(4) = 13 compositions:
() . (1111) (1212) (1313)
(1221) (1322)
(2112) (1331)
(2121) (2213)
(2222)
(2231)
(3113)
(3122)
(3131)
(111311)
(112211)
(113111)
(11111111)
|
|
MATHEMATICA
|
Table[Length[Select[Join @@ Permutations/@IntegerPartitions[2n], EvenQ[Length[#]]&&halfats[#]==0&]], {n, 0, 9}]
|
|
PROG
|
(PARI) a(n) = {my(v, res); if(n < 3, return(1 - bitand(n, 1))); res = 0; v = vector(2*n, i, binomial(n-1, i-1)); forstep(i = 4, 2*n, 2, lp = i\4 * 2; rp = i - lp; res += v[lp] * v[rp]; ); res } \\ David A. Corneth, Oct 13 2022
|
|
CROSSREFS
|
The skew-alternating version appears to be A000984.
The version for partitions of any length is A357639, ranked by A357631.
For length multiple of 4 we have A110145.
These compositions of any length are ranked by A357625, reverse A357626.
A124754 gives alternating sum of standard compositions, reverse A344618.
A357621 = half-alternating sum of standard compositions, reverse A357622.
Cf. A000583, A001511, A035363, A053251, A344619, A357136, A357182, A357627, A357628, A357629, A357633.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|