%I #7 Apr 15 2014 14:38:30
%S 1,2,3,4,4,8,5,9,10,14,7,24,8,22,31,28,10,56,11,71,68,47,13,143,69,66,
%T 147,216,16,367,17,241,304,122,509,1019,20,163,603,1238,22,1712,23,
%U 1789,3144,286,25,3956,1581,2481,2101,4638,28,7739,7357,9209,3737
%N Number of partitions p of n such that median(p) = mean(p).
%F a(n) = A240218(n) - A240217(n) for n >= 1.
%F a(n) + A240217(n) + A240220 = A000041(n) for n >= 1.
%e a(6) counts these 8 partitions: 6, 51, 42, 33, 331, 222, 2211, 111111.
%t z = 60; f[n_] := f[n] = IntegerPartitions[n];
%t Table[Count[f[n], p_ /; Median[p] < Mean[p]], {n, 1, z}] (* A240217 *)
%t Table[Count[f[n], p_ /; Median[p] <= Mean[p]], {n, 1, z}] (* A240218 *)
%t Table[Count[f[n], p_ /; Median[p] == Mean[p]], {n, 1, z}] (* A240219 *)
%t Table[Count[f[n], p_ /; Median[p] > Mean[p]], {n, 1, z}] (* A240220 *)
%t Table[Count[f[n], p_ /; Median[p] >= Mean[p]], {n, 1, z}] (* A240221 *)
%Y Cf. A240217, A240218, A240220, A240221, A000041.
%K nonn,easy
%O 1,2
%A _Clark Kimberling_, Apr 04 2014