OFFSET
1,2
COMMENTS
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
EXAMPLE
The a(1) = 1 through a(9) = 9 partitions:
1 2 3 4 5 6 7 8 9
11 111 22 11111 33 1111111 44 333
31 42 53 432
1111 51 62 441
222 71 522
321 2222 531
411 3221 621
111111 3311 711
5111 111111111
11111111
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], IntegerQ[Mean[#]]&&IntegerQ[Median[#]]&]], {n, 1, 30}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 21 2023
STATUS
approved