cp's OEIS Frontend

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.

Showing 1-5 of 5 results.

A361864 Number of set partitions of {1..n} whose block-medians have integer median.

Original entry on oeis.org

1, 0, 3, 6, 30, 96, 461, 2000, 10727, 57092, 342348
Offset: 1

Views

Author

Gus Wiseman, Apr 04 2023

Keywords

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).

Examples

			The a(1) = 1 through a(4) = 6 set partitions:
  {{1}}  .  {{123}}      {{1}{234}}
            {{13}{2}}    {{123}{4}}
            {{1}{2}{3}}  {{1}{2}{34}}
                         {{12}{3}{4}}
                         {{1}{24}{3}}
                         {{13}{2}{4}}
The set partition {{1,2},{3},{4}} has block-medians {3/2,3,4}, with median 3, so is counted under a(4).
		

Crossrefs

For mean instead of median we have A361865.
For sum instead of outer median we have A361911, means A361866.
A000110 counts set partitions.
A000975 counts subsets with integer median, mean A327475.
A013580 appears to count subsets by median, A327481 by mean.
A308037 counts set partitions with integer average block-size.
A325347 counts partitions w/ integer median, complement A307683.
A360005 gives twice median of prime indices, distinct A360457.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],IntegerQ[Median[Median/@#]]&]],{n,6}]

A361866 Number of set partitions of {1..n} with block-means summing to an integer.

Original entry on oeis.org

1, 1, 1, 3, 8, 22, 75, 267, 1119, 4965, 22694, 117090, 670621, 3866503, 24113829, 161085223, 1120025702, 8121648620, 62083083115, 492273775141, 4074919882483
Offset: 0

Views

Author

Gus Wiseman, Apr 04 2023

Keywords

Examples

			The a(1) = 1 through a(4) = 8 set partitions:
  {{1}}  {{1}{2}}  {{123}}      {{1}{234}}
                   {{13}{2}}    {{12}{34}}
                   {{1}{2}{3}}  {{123}{4}}
                                {{13}{24}}
                                {{14}{23}}
                                {{1}{24}{3}}
                                {{13}{2}{4}}
                                {{1}{2}{3}{4}}
The set partition y = {{1,2},{3,4}} has block-means {3/2,7/2}, with sum 5, so y is counted under a(4).
		

Crossrefs

For mean instead of sum we have A361865, for median A361864.
For median instead of mean we have A361911.
A000110 counts set partitions.
A067538 counts partitions with integer mean, ranks A326836, strict A102627.
A308037 counts set partitions with integer mean block-size.
A327475 counts subsets with integer mean, median A000975.
A327481 counts subsets by mean, median A013580.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],IntegerQ[Total[Mean/@#]]&]],{n,6}]

Extensions

a(14)-a(20) from Christian Sievers, May 12 2025

A361911 Number of set partitions of {1..n} with block-medians summing to an integer.

Original entry on oeis.org

1, 1, 3, 10, 30, 107, 479, 2249, 11173, 60144, 351086, 2171087, 14138253, 97097101, 701820663, 5303701310, 41838047938, 343716647215, 2935346815495, 25999729551523, 238473713427285, 2261375071834708, 22141326012712122, 223519686318676559, 2323959300370456901
Offset: 1

Views

Author

Gus Wiseman, Apr 14 2023

Keywords

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).

Examples

			The a(1) = 1 through a(4) = 10 set partitions:
  {{1}}  {{1}{2}}  {{123}}      {{1}{234}}
                   {{13}{2}}    {{12}{34}}
                   {{1}{2}{3}}  {{123}{4}}
                                {{124}{3}}
                                {{13}{24}}
                                {{134}{2}}
                                {{14}{23}}
                                {{1}{24}{3}}
                                {{13}{2}{4}}
                                {{1}{2}{3}{4}}
The set partition {{1,4},{2,3}} has medians {5/2,5/2}, with sum 5, so is counted under a(4).
		

Crossrefs

For median instead of sum we have A361864.
For mean of means we have A361865.
For mean instead of median we have A361866.
A000110 counts set partitions.
A000975 counts subsets with integer median, mean A327475.
A013580 appears to count subsets by median, A327481 by mean.
A308037 counts set partitions with integer average block-size.
A325347 = partitions w/ integer median, complement A307683, strict A359907.
A360005 gives twice median of prime indices, distinct A360457.

Programs

  • Mathematica
    sps[{}]:={{}}; sps[set:{i_,_}] := Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]] /@ Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]], IntegerQ[Total[Median/@#]]&]],{n,10}]

Extensions

a(12)-a(25) from Christian Sievers, Aug 26 2024

A361910 Number of set partitions of {1..n} such that the mean of the means of the blocks is (n+1)/2.

Original entry on oeis.org

1, 2, 3, 7, 12, 47, 99, 430, 1379, 5613, 21416, 127303, 532201, 3133846, 18776715, 114275757, 737859014
Offset: 1

Views

Author

Gus Wiseman, Apr 14 2023

Keywords

Comments

Since (n+1)/2 is the mean of {1..n}, this sequence counts a type of "transitive" set partitions.

Examples

			The a(1) = 1 through a(5) = 12 set partitions:
  {{1}}  {{12}}    {{123}}      {{1234}}        {{12345}}
         {{1}{2}}  {{13}{2}}    {{12}{34}}      {{1245}{3}}
                   {{1}{2}{3}}  {{13}{24}}      {{135}{24}}
                                {{14}{23}}      {{15}{234}}
                                {{1}{23}{4}}    {{1}{234}{5}}
                                {{14}{2}{3}}    {{12}{3}{45}}
                                {{1}{2}{3}{4}}  {{135}{2}{4}}
                                                {{14}{25}{3}}
                                                {{15}{24}{3}}
                                                {{1}{24}{3}{5}}
                                                {{15}{2}{3}{4}}
                                                {{1}{2}{3}{4}{5}}
The set partition {{1,3},{2,4}} has means {2,3}, with mean 5/2, so is counted under a(4).
The set partition {{1,3,5},{2,4}} has means {3,3}, with mean 3, so is counted under a(5).
		

Crossrefs

For median instead of mean we have A361863.
A000110 counts set partitions.
A308037 counts set partitions with integer mean block-size.
A327475 counts subsets with integer mean, A000975 with integer median.
A327481 counts subsets by mean, A013580 by median.
A361865 counts set partitions with integer mean of means.
A361911 counts set partitions with integer sum of means.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]] /@ Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],Mean[Join@@#]==Mean[Mean/@#]&]],{n,8}]

Extensions

a(13)-a(17) from Christian Sievers, May 12 2025

A361863 Number of set partitions of {1..n} such that the median of medians of the blocks is (n+1)/2.

Original entry on oeis.org

1, 2, 3, 9, 26, 69, 335, 1018, 6629, 22805, 182988, 703745
Offset: 1

Views

Author

Gus Wiseman, Apr 04 2023

Keywords

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.

Examples

			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).
		

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.

Programs

  • 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}]
Showing 1-5 of 5 results.