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”).
%I #9 Sep 22 2023 01:58:52
%S 0,0,0,1,1,2,2,4,5,5,9,11,10,17,21,21,27,37,40,53,50,69,88,103,98,126,
%T 164,183,199,255,238,339,359,437,511,510,565,759,863,969,950,1259,
%U 1224,1609,1750,1866,2303,2589,2497,3061,3412,4080,4485,5119,5168,6031
%N Number of partitions p of n into distinct parts not including mean(p).
%F a(n) + A240850(n) = A000009(n) for n >= 0.
%e a(9) counts these 5 partitions: 81, 72, 63. 621, 54.
%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 A240851(n): return sum(1 for s,p in partitions(n,size=True) if max(p.values(),default=0)==1 and (n%s or n//s not in p)) # _Chai Wah Wu_, Sep 21 2023
%Y Cf. A240850, A000009.
%K nonn,easy
%O 0,6
%A _Clark Kimberling_, Apr 14 2014