login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of partitions of n such that either both floor(n/2) and ceiling(n/2) are parts or else neither is a part.
4

%I #4 Mar 08 2014 22:52:00

%S 0,2,2,5,4,11,9,22,20,42,40,77,77,135,141,231,247,385,420,627,696,

%T 1002,1124,1575,1782,2436,2776,3718,4256,5604,6437,8349,9617,12310,

%U 14203,17977,20764,26015,30070,37338,43166,53174,61469,75175,86879,105558,121926

%N Number of partitions of n such that either both floor(n/2) and ceiling(n/2) are parts or else neither is a part.

%e a(7) counts these 9 partitions: 7, 61, 52, 511, 43, 2221, 22111, 211111, 1111111.

%t z=40; g[n_] := g[n] = IntegerPartitions[n];

%t t1 = Table[Count[g[n], p_ /; Or[MemberQ[p, Floor[n/2]], MemberQ[p, Ceiling[n/2]]]], {n, z}] (* A238622 [or] *)

%t t2 = Table[Count[g[n], p_ /; Nor[MemberQ[p, Floor[n/2]], MemberQ[p, Ceiling[n/2]]]], {n, z}] (* A238623 [nor] *)

%t t3 = Table[Count[g[n], p_ /; Xnor[MemberQ[p, Floor[n/2]], MemberQ[p, Ceiling[n/2]]]], {n, z}] (* A238624 [xnor] *)

%Y Cf. A238622, A238623.

%K nonn,easy

%O 1,2

%A _Clark Kimberling_, Mar 02 2014