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 A357642 #13 Oct 13 2022 06:36:31 %S A357642 1,0,1,4,13,48,186,712,2717,10432,40222,155384,601426,2332640,9063380, %T A357642 35269392,137438685,536257280,2094786870,8191506136,32063203590, %U A357642 125613386912,492516592620,1932569186288,7588478653938,29816630378368,117226929901676,461151757861552 %N A357642 Number of even-length integer compositions of 2n whose half-alternating sum is 0. %C A357642 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 - ... %H A357642 David A. Corneth, <a href="/A357642/b357642.txt">Table of n, a(n) for n = 0..1665</a> %e A357642 The a(0) = 1 through a(4) = 13 compositions: %e A357642 () . (1111) (1212) (1313) %e A357642 (1221) (1322) %e A357642 (2112) (1331) %e A357642 (2121) (2213) %e A357642 (2222) %e A357642 (2231) %e A357642 (3113) %e A357642 (3122) %e A357642 (3131) %e A357642 (111311) %e A357642 (112211) %e A357642 (113111) %e A357642 (11111111) %t A357642 Table[Length[Select[Join @@ Permutations/@IntegerPartitions[2n],EvenQ[Length[#]]&&halfats[#]==0&]],{n,0,9}] %o A357642 (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 %Y A357642 The skew-alternating version appears to be A000984. %Y A357642 For original alternating sum we have A001700/A088218. %Y A357642 The version for partitions of any length is A357639, ranked by A357631. %Y A357642 For length multiple of 4 we have A110145. %Y A357642 These compositions of any length are ranked by A357625, reverse A357626. %Y A357642 A124754 gives alternating sum of standard compositions, reverse A344618. %Y A357642 A357621 = half-alternating sum of standard compositions, reverse A357622. %Y A357642 A357637 counts partitions by half-alternating sum, skew A357638. %Y A357642 Cf. A000583, A001511, A035363, A053251, A344619, A357136, A357182, A357627, A357628, A357629, A357633. %K A357642 nonn %O A357642 0,4 %A A357642 _Gus Wiseman_, Oct 12 2022 %E A357642 More terms from _Alois P. Heinz_, Oct 12 2022