%I #15 Aug 29 2016 11:10:26
%S 0,1,1,1,1,1,2,2,3,3,5,5,7,7,10,11,14,15,19,22,26,30,35,42,47,56,62,
%T 76,83,100,108,132,142,171,184,222,239,284,306,363,394,460,500,581,
%U 636,730,802,914,1010,1139,1262,1415,1577,1753,1956,2163,2423,2663
%N Number of strict partitions of n having an ordering in which no parts of equal parity are juxtaposed and the first and last terms have the same parity.
%C A strict partition is one in which every part has multiplicity 1.
%C a(n) = A240021(n,-1) + A240021(n,1). - _Alois P. Heinz_, Apr 02 2014
%H Alois P. Heinz, <a href="/A239880/b239880.txt">Table of n, a(n) for n = 0..1000</a>
%e a(12) counts these 7 partitions: [12], [9,2,1], [3,8,1], [7,4,1], [7,2,3], [5,6,1], [5,4,3].
%p b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2 or
%p abs(t)-n>1, 0, `if`(n=0, abs(t), 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, 0):
%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], Abs[Count[#, _?OddQ] - Count[#, _?EvenQ]] == 1 &]; t = Table[p[n], {n, 0, 12}]
%t TableForm[t] (* shows the partitions *)
%t u = Table[Length[p[n]], {n, 0, 60}] (* A239880 *)
%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>1, 0, If[n==0, Abs[t], 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, 0]; Table[a[n], {n, 0, 80}] (* _Jean-François Alcover_, Aug 29 2016, after _Alois P. Heinz_ *)
%Y Cf. A239833, A239835, A239881.
%K nonn,easy
%O 0,7
%A _Clark Kimberling_, Mar 29 2014