OFFSET
1,3
COMMENTS
Includes all partitions of odd length (A027193).
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) = 18 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(21) (22) (41) (42) (43) (44)
(111) (211) (221) (222) (61) (62)
(1111) (311) (321) (322) (332)
(11111) (411) (331) (422)
(21111) (421) (431)
(111111) (511) (521)
(3211) (611)
(22111) (2222)
(31111) (3221)
(211111) (4211)
(1111111) (22211)
(32111)
(41111)
(221111)
(311111)
(2111111)
(11111111)
For example, the partition y = (3,2,2,1) has 0-appended parts (3,2,2,1,0), with differences (1,0,1,1), and the multiset {0,1,1,1} has median 1, so y is counted under a(8).
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], IntegerQ[Median[Differences[Prepend[Reverse[#], 0]]]]&]], {n, 30}]
CROSSREFS
A008284 counts partitions by number of parts.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 20 2023
STATUS
approved