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 A331609 #28 May 06 2022 13:13:51 %S A331609 0,1,0,4,4,14,20,56,98,224,420,902,1764,3664,7258,14824,29596,59942, %T A331609 120012,241944,484946,975216,1955244,3926078,7870980,15790272, %U A331609 31650090,63456208,127162580,254845446,510582236,1022940392,2049048890,4104264424,8219808108 %N A331609 Number of compositions of n with the multiplicity of the first part even. %H A331609 Alois P. Heinz, <a href="/A331609/b331609.txt">Table of n, a(n) for n = 1..1000</a> %H A331609 M. Archibald, A. Blecher, A. Knopfmacher, M. E. Mays, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Archibald/arch3.html">Inversions and Parity in Compositions of Integers</a>, J. Int. Seq., Vol. 23 (2020), Article 20.4.1. %F A331609 G.f.: (1-x)/(1-2*x) - Sum_{i>=1} ((x-1)*x^i*(-x^(i+1)+x^i-2*x+1)) / ((2*x-1) * (-2*x^(i+1)+2*x^i-2*x+1)). %F A331609 a(n) = A011782(n) - A331606(n). - _Alois P. Heinz_, Jan 23 2020 %e A331609 For n=4, a(4)=4 and counts 2+2, 1+2+1, 1+1+2 and 1+1+1+1. %p A331609 b:= proc(n, p, t) option remember; `if`(n=0, t, %p A331609 add(b(n-j, p, `if`(p=j, 1-t, t)), j=1..n)) %p A331609 end: %p A331609 a:= n-> add(b(n-j, j, 0), j=1..n): %p A331609 seq(a(n), n=1..38); # _Alois P. Heinz_, Jan 23 2020 %t A331609 gf[x_] := (1 - x)/(1 - 2 x) - Sum[ ((x - 1) x^i (-x^(i + 1) + x^i - 2 x + 1)) / ((2 x - 1) (-2 x^(i + 1) + 2 x^i - 2 x + 1)), {i, 1, 40}]; %t A331609 CL := CoefficientList[Series[gf[x], {x, 0, 35}], x]; Drop[CL, 1] (* _Peter Luschny_, Jan 23 2020 *) %Y A331609 Cf. A011782, A331606 (similar, with odd). %K A331609 nonn %O A331609 1,4 %A A331609 _Arnold Knopfmacher_, Jan 22 2020