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.

Previous Showing 31-38 of 38 results.

A327899 Number of set partitions of {1..n} with equal block sizes and equal block sums.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 6, 3, 2, 1, 63, 1, 2, 317, 657, 1, 4333, 1, 9609
Offset: 0

Views

Author

Gus Wiseman, Sep 29 2019

Keywords

Examples

			The a(8) = 6 set partitions:
     {{1,2,3,4,5,6,7,8}}
    {{1,2,7,8},{3,4,5,6}}
    {{1,3,6,8},{2,4,5,7}}
    {{1,4,5,8},{2,3,6,7}}
    {{1,4,6,7},{2,3,5,8}}
  {{1,8},{2,7},{3,6},{4,5}}
		

Crossrefs

Set partitions with equal block-sizes are A038041.
Set partitions with equal block-sums are A035470.

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]],And[SameQ@@Length/@#,SameQ@@Total/@#]&]],{n,0,8}]

A275781 Number of set partitions of [n] having at least two blocks with equal element sums.

Original entry on oeis.org

0, 0, 0, 1, 3, 9, 43, 209, 1042, 5682, 32875, 200919, 1299092, 8848623, 63108778, 471509591, 3671980053, 29797471739, 251120234182, 2196428139810, 19882638695048, 186205573812059, 1799766634300161, 17946783669353462, 184277407872729741, 1947501874827169041
Offset: 0

Views

Author

Alois P. Heinz, Aug 08 2016

Keywords

Examples

			a(3) = 1: 12|3
a(4) = 3: 12|3|4, 13|2|4, 14|23.
a(5) = 9: 12|3|45, 12|3|4|5, 13|25|4, 13|2|4|5, 14|23|5, 1|23|4|5, 14|2|3|5, 15|24|3, 1|25|34.
		

Crossrefs

Formula

a(n) = A000110(n) - A275780(n).

Extensions

a(17)-a(25) from Christian Sievers, Aug 20 2024

A327903 Number of set-systems covering n vertices where every edge has a different sum.

Original entry on oeis.org

1, 1, 5, 77, 7369, 10561753, 839653402893, 15924566366443524837, 315320784127456186118309342769, 29238175285109256786706269143580213236526609, 59347643832090275881798554403880633753161146711444051797893301
Offset: 0

Views

Author

Gus Wiseman, Sep 30 2019

Keywords

Comments

A set-system is a set of nonempty sets. It is covering if there are no isolated (uncovered) vertices.

Examples

			The a(3) = 77 set-systems:
  123  1-23    1-2-3      1-2-3-13      1-2-3-13-23     1-2-3-13-23-123
       2-13    1-2-13     1-2-3-23      1-2-12-13-23    1-2-12-13-23-123
       1-123   1-2-23     1-2-12-13     1-2-3-13-123
       12-13   1-3-23     1-2-12-23     1-2-3-23-123
       12-23   2-3-13     1-2-13-23     1-2-12-13-123
       13-23   1-12-13    1-2-3-123     1-2-12-23-123
       2-123   1-12-23    1-3-13-23     1-2-13-23-123
       3-123   1-13-23    2-3-13-23     1-3-13-23-123
       12-123  1-2-123    1-12-13-23    2-3-13-23-123
       13-123  1-3-123    1-2-12-123    1-12-13-23-123
       23-123  2-12-13    1-2-13-123    2-12-13-23-123
               2-12-23    1-2-23-123
               2-13-23    1-3-13-123
               2-3-123    1-3-23-123
               3-13-23    2-12-13-23
               1-12-123   2-3-13-123
               1-13-123   2-3-23-123
               12-13-23   1-12-13-123
               1-23-123   1-12-23-123
               2-12-123   1-13-23-123
               2-13-123   2-12-13-123
               2-23-123   2-12-23-123
               3-13-123   2-13-23-123
               3-23-123   3-13-23-123
               12-13-123  12-13-23-123
               12-23-123
               13-23-123
		

Crossrefs

The antichain case is A326572.
The graphical case is A327904.

Programs

  • Mathematica
    stableSets[u_,Q_]:=If[Length[u]==0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r==w||Q[r,w]||Q[w,r]],Q]]]];
    qes[n_]:=Select[stableSets[Subsets[Range[n],{1,n}],Total[#1]==Total[#2]&],Union@@#==Range[n]&];
    Table[Length[qes[n]],{n,0,4}]
  • PARI
    \\ by inclusion/exclusion on covered vertices.
    C(v)={my(u=Vecrev(-1 + prod(k=1, #v, 1 + x^v[k]))); prod(i=1, #u, 1 + u[i])}
    a(n)={my(s=0); forsubset(n, v, s += (-1)^(n-#v)*C(v)); s} \\ Andrew Howroyd, Oct 02 2019

Extensions

Terms a(4) and beyond from Andrew Howroyd, Oct 02 2019

A327904 Number of labeled simple graphs with vertices {1..n} such that every edge has a different sum.

Original entry on oeis.org

1, 1, 2, 8, 48, 432, 5184, 82944, 1658880, 41472000, 1244160000, 44789760000, 1881169920000, 92177326080000, 5161930260480000, 330363536670720000, 23786174640291840000, 1926680145863639040000, 173401213127727513600000, 17340121312772751360000000
Offset: 0

Views

Author

Gus Wiseman, Sep 30 2019

Keywords

Examples

			The graph with edge-set {{1,2},{1,3},{1,4},{2,3}}, which looks like a triangle with a tail, has edges {1,4} and {2,3} with equal sum, so is not counted under a(4).
		

Crossrefs

The generalization to antichains is A326030.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          a(n-1)*ceil(n/2)*ceil(n/2+1/4))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Oct 03 2019
  • Mathematica
    stableSets[u_,Q_]:=If[Length[u]==0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r==w||Q[r,w]||Q[w,r]],Q]]]];
    qes[n_]:=stableSets[Subsets[Range[n],{2}],Total[#1]==Total[#2]&];
    Table[Length[qes[n]],{n,0,5}]
  • PARI
    a(n) = {prod(k=1, 2*n+1, ceil(k/4))} \\ Andrew Howroyd, Oct 02 2019

Formula

a(n) = Product_{k=1..2*n+1} ceiling(k/4). - Andrew Howroyd, Oct 02 2019

Extensions

Terms a(8) and beyond from Andrew Howroyd, Oct 02 2019

A336138 Number of set partitions of the binary indices of n with distinct block-sums.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 5, 2, 4, 5, 12, 1, 2, 2, 5, 2, 5, 4, 13, 2, 4, 5, 13, 5, 13, 13, 43, 1, 2, 2, 5, 2, 5, 5, 13, 2, 5, 4, 14, 5, 13, 14, 42, 2, 4, 5, 13, 5, 14, 13, 43, 5, 13, 14, 45, 14, 44, 44, 160, 1, 2, 2, 5, 2, 5, 5, 14, 2, 5, 5, 14, 4, 13
Offset: 0

Views

Author

Gus Wiseman, Jul 12 2020

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The a(n) set partitions for n = 3, 7, 11, 15, 23:
  {12}    {123}      {124}      {1234}        {1235}
  {1}{2}  {1}{23}    {1}{24}    {1}{234}      {1}{235}
          {13}{2}    {12}{4}    {12}{34}      {12}{35}
          {1}{2}{3}  {14}{2}    {123}{4}      {123}{5}
                     {1}{2}{4}  {124}{3}      {125}{3}
                                {13}{24}      {13}{25}
                                {134}{2}      {135}{2}
                                {1}{2}{34}    {15}{23}
                                {1}{23}{4}    {1}{2}{35}
                                {1}{24}{3}    {1}{25}{3}
                                {14}{2}{3}    {13}{2}{5}
                                {1}{2}{3}{4}  {15}{2}{3}
                                              {1}{2}{3}{5}
		

Crossrefs

The version for twice-partitions is A271619.
The version for partitions of partitions is (also) A271619.
These set partitions are counted by A275780.
The version for factorizations is A321469.
The version for normal multiset partitions is A326519.
The version for equal block-sums is A336137.
Set partitions with distinct block-lengths are A007837.
Set partitions of binary indices are A050315.
Twice-partitions with equal sums are A279787.
Partitions of partitions with equal sums are A305551.
Normal multiset partitions with equal block-lengths are A317583.
Multiset partitions with distinct block-sums are ranked by A326535.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[bpe[n]],UnsameQ@@Total/@#&]],{n,0,100}]

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

A301756 Number of ways to choose disjoint strict rooted partitions of each part in a strict rooted partition of n.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 7, 10, 15, 22, 30, 42, 60, 85, 114, 155, 206, 286, 394, 524, 683, 910, 1187, 1564, 2090, 2751, 3543, 4606, 5917, 7598, 9771, 12651, 16260, 20822, 26421, 33525, 42463, 53594, 67337, 85299
Offset: 1

Views

Author

Gus Wiseman, Mar 26 2018

Keywords

Comments

A rooted partition of n is an integer partition of n - 1.

Examples

			The a(8) = 10 rooted twice-partitions:
(6), (51), (42), (321),
(5)(), (41)(), (32)(), (4)(1), (3)(2),
(3)(1)().
		

Crossrefs

Programs

  • Mathematica
    twirtns[n_]:=Join@@Table[Tuples[IntegerPartitions[#-1]&/@ptn],{ptn,IntegerPartitions[n-1]}];
    Table[Select[twirtns[n],And[UnsameQ@@Total/@#,UnsameQ@@Join@@#]&]//Length,{n,20}]

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}]
Previous Showing 31-38 of 38 results.