login
A361863
Number of set partitions of {1..n} such that the median of medians of the blocks is (n+1)/2.
1
1, 2, 3, 9, 26, 69, 335, 1018, 6629, 22805, 182988, 703745
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).
Since (n+1)/2 is the median of {1..n}, this sequence counts "transitive" set partitions.
EXAMPLE
The a(1) = 1 through a(4) = 9 set partitions:
{{1}} {{12}} {{123}} {{1234}}
{{1}{2}} {{13}{2}} {{12}{34}}
{{1}{2}{3}} {{124}{3}}
{{13}{24}}
{{134}{2}}
{{14}{23}}
{{1}{23}{4}}
{{14}{2}{3}}
{{1}{2}{3}{4}}
The set partition {{1,4},{2,3}} has medians {5/2,5/2}, with median 5/2, so is counted under a(4).
The set partition {{1,3},{2,4}} has medians {2,3}, with median 5/2, so is counted under a(4).
MATHEMATICA
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]& /@ sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
Table[Length[Select[sps[Range[n]], (n+1)/2==Median[Median/@#]&]], {n, 6}]
CROSSREFS
For mean instead of median we have A361910.
A000110 counts set partitions.
A000975 counts subsets with integer median, mean A327475.
A013580 appears to count subsets by median, A327481 by mean.
A325347 counts partitions w/ integer median, complement A307683.
A359893 and A359901 count partitions by median, odd-length A359902.
A360005 gives twice median of prime indices, distinct A360457.
A361864 counts set partitions with integer median of medians, means A361865.
A361866 counts set partitions with integer sum of medians, means A361911.
Sequence in context: A143742 A038523 A358410 * A096237 A309814 A177928
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Apr 04 2023
STATUS
approved