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(8) = 16 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (311) (33) (331) (44)
(31) (11111) (42) (421) (53)
(1111) (51) (511) (62)
(222) (3211) (71)
(321) (31111) (422)
(3111) (1111111) (431)
(111111) (521)
(2222)
(3221)
(3311)
(4211)
(5111)
(32111)
(311111)
(11111111)
For example, the partition y = (7,4,2,1,1) has distinct parts {1,2,4,7} with median 3, so y is counted under a(15).
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], IntegerQ[Median[Union[#]]]&]], {n, 30}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 20 2023
STATUS
approved