Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Nov 16 2015 08:06:16
%S 0,0,1,0,1,0,1,1,1,2,1,4,1,6,1,9,2,12,3,16,6,20,10,25,17,30,26,36,40,
%T 43,57,51,81,61,110,74,148,91,193,113,250,144,316,184,397,239,491,311,
%U 603,407,732,530,885,692,1061,895,1268,1155,1508,1478,1790
%N Number of strict partitions of n having 1 more even part than odd, so that there is at least one ordering of the parts in which the even and odd parts alternate, and the first and last terms are even.
%C Let c(n) be the number of strict partitions (that is, every part has multiplicity 1) of n having 1 more odd part than even, so that there is an ordering of parts for which the odd and even parts alternate and the first and last terms are odd. Then c(n) = a(n+1) for n >= 0.
%H Alois P. Heinz, <a href="/A239871/b239871.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = [x^n y^(-1)] Product_{i>=1} 1+x^i*y^(2*(i mod 2)-1). - _Alois P. Heinz_, Apr 03 2014
%e a(11) counts these 4 partitions: 812, 614, 632, 452.
%p b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2 or
%p abs(t)>n, 0, `if`(n=0, 1, b(n, i-1, t)+
%p `if`(i>n, 0, b(n-i, i-1, t+(2*irem(i, 2)-1)))))
%p end:
%p a:= n-> b(n$2, 1):
%p seq(a(n), n=0..80); # _Alois P. Heinz_, Apr 02 2014
%t d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
%t p[n_] := p[n] = Select[d[n], Count[#, _?OddQ] == -1 + Count[#, _?EvenQ] &]; t = Table[p[n], {n, 0, 20}]
%t TableForm[t] (* shows the partitions *)
%t u = Table[Length[p[n]], {n, 0, 70}] (* A239871 *)
%t (* _Peter J. C. Moses_, Mar 10 2014 *)
%t b[n_, i_, t_] := b[n, i, t] = If[n > i*(i + 1)/2 || Abs[t] > n, 0, If[n == 0, 1, b[n, i - 1, t] + If[i > n, 0, b[n - i, i - 1, t + (2*Mod[i, 2] - 1)]]]]; a[n_] := b[n, n, 1]; Table[a[n], {n, 0, 80}] (* _Jean-François Alcover_, Nov 16 2015, after _Alois P. Heinz_ *)
%Y Cf. A239241, A239872, A239873, A239832.
%Y Column k=-1 of A240021.
%K nonn,easy
%O 0,10
%A _Clark Kimberling_, Mar 29 2014