This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A240850 #14 Jun 18 2025 17:00:34 %S A240850 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 A240850 31,11,1,75,103,1,1,13,163,1,202,1,66,182,1,1,413,203,246,17,97,1,550, %U A240850 347,889,19,1,1,1500,1,1,1442,982,625,1424,1,177,23 %N A240850 Number of partitions p of n into distinct parts including mean(p). %F A240850 a(n) + A240851(n) = A000009(n) for n >= 0. %e A240850 a(12) counts these 5 partitions: {12}, {7,4,1}, {6,4,2}, {6,3,2,1}, {5,4,3}. %t A240850 z = 70; f[n_] := f[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &]; %t A240850 Table[Count[f[n], p_ /; MemberQ[p, Mean[p]]], {n, 0, z}] (* A240850 *) %t A240850 Table[Count[f[n], p_ /; ! MemberQ[p, Mean[p]]], {n, 0, z}] (* A240851 *) %o A240850 (Python) %o A240850 from sympy.utilities.iterables import partitions %o A240850 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 A240850 Cf. A240851, A000009. %K A240850 nonn,easy %O A240850 0,7 %A A240850 _Clark Kimberling_, Apr 14 2014