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!)
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.
For original alternating sum we have A001700/A088218.
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.
A357637 counts partitions by half-alternating sum, skew A357638.
Sequence in context: A149445 A149446 A149447 * A149448 A149449 A149450
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 12 2022
EXTENSIONS
More terms from Alois P. Heinz, Oct 12 2022
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 19 06:44 EDT 2024. Contains 371782 sequences. (Running on oeis4.)