%I #10 Sep 22 2023 01:58:56
%S 0,1,1,1,1,1,2,1,1,3,1,1,5,1,1,6,5,1,6,1,14,7,1,1,24,16,1,9,23,1,58,1,
%T 31,11,1,75,103,1,1,13,163,1,202,1,66,182,1,1,413,203,246,17,97,1,550,
%U 347,889,19,1,1,1500,1,1,1442,982,625,1424,1,177,23
%N Number of partitions p of n into distinct parts including mean(p).
%F a(n) + A240851(n) = A000009(n) for n >= 0.
%e a(12) counts these 5 partitions: {12}, {7,4,1}, {6,4,2}, {6,3,2,1}, {5,4,3}.
%t z = 70; f[n_] := f[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
%t Table[Count[f[n], p_ /; MemberQ[p, Mean[p]]], {n, 0, z}] (* A240850 *)
%t Table[Count[f[n], p_ /; ! MemberQ[p, Mean[p]]], {n, 0, z}] (* A240851 *)
%o (Python)
%o from sympy.utilities.iterables import partitions
%o def A240850(n): return sum(1 for s,p in partitions(n,size=True) if max(p.values(),default=0)==1 and not n%s and n//s in p) # _Chai Wah Wu_, Sep 21 2023
%Y Cf. A240851, A000009.
%K nonn,easy
%O 0,7
%A _Clark Kimberling_, Apr 14 2014