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-10 of 20 results. Next

A345197 Concatenation of square matrices A(n), each read by rows, where A(n)(k,i) is the number of compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 2, 3, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 3, 4, 0, 0, 3, 4, 3, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 1, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Jul 03 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The matrices for n = 1..7:
  1   0 1   0 0 1   0 0 0 1   0 0 0 0 1   0 0 0 0 0 1   0 0 0 0 0 0 1
      1 0   1 1 0   1 1 1 0   1 1 1 1 0   1 1 1 1 1 0   1 1 1 1 1 1 0
            0 1 0   0 1 2 0   0 1 2 3 0   0 1 2 3 4 0   0 1 2 3 4 5 0
                    0 1 0 0   0 2 2 0 0   0 3 4 3 0 0   0 4 6 6 4 0 0
                              0 0 1 0 0   0 0 2 3 0 0   0 0 3 6 6 0 0
                                          0 0 1 0 0 0   0 0 3 3 0 0 0
                                                        0 0 0 1 0 0 0
Matrix n = 5 counts the following compositions:
           i=-3:        i=-1:          i=1:            i=3:        i=5:
        -----------------------------------------------------------------
   k=1: |    0            0             0               0          (5)
   k=2: |   (14)         (23)          (32)            (41)         0
   k=3: |    0          (131)       (221)(122)   (311)(113)(212)    0
   k=4: |    0       (1211)(1112)  (2111)(1121)         0           0
   k=5: |    0            0          (11111)            0           0
		

Crossrefs

The number of nonzero terms in each matrix appears to be A000096.
The number of zeros in each matrix appears to be A000124.
Row sums and column sums both appear to be A007318 (Pascal's triangle).
The matrix sums are A131577.
Antidiagonal sums appear to be A163493.
The reverse-alternating version is also A345197 (this sequence).
Antidiagonals are A345907.
Traces are A345908.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Other tetrangles: A318393, A318816, A320808, A321912.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==k&&ats[#]==i&]],{n,0,6},{k,1,n},{i,-n+2,n,2}]

A360071 Regular tetrangle where T(n,k,i) = number of integer partitions of n of length k with i distinct parts.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 1, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 1, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 28 2023

Keywords

Comments

I call this a tetrangle because it is a sequence of finite triangles. - Gus Wiseman, Jan 30 2023

Examples

			Tetrangle begins:
  1   1     1       1         1           1             1
      1 0   0 1     1 1       0 2         1 2           0 3
            1 0 0   0 1 0     0 2 0       1 1 1         0 3 1
                    1 0 0 0   0 1 0 0     0 2 0 0       0 2 1 0
                              1 0 0 0 0   0 1 0 0 0     0 2 0 0 0
                                          1 0 0 0 0 0   0 1 0 0 0 0
                                                        1 0 0 0 0 0 0
For example, finite triangle n = 5 counts the following partitions:
    (5)
     .    (41)(32)
     .   (311)(221)  .
     .     (2111)    .   .
  (11111)     .      .   .   .
		

Crossrefs

Row sums are A008284 (partitions by number of parts), reverse A058398.
First columns i = 1 are A051731.
Last columns i = k are A060016.
Column sums are A116608 (partitions by number of distinct parts).
Positive terms are counted by A360072.
A000041 counts partitions, strict A000009.
Other tetrangles: A318393, A318816, A320808, A334433, A345197.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Length[#]==k&&Length[Union[#]]==i&]],{n,1,9},{k,1,n},{i,1,k}]

A345908 Traces of the matrices (A345197) counting integer compositions by length and alternating sum.

Original entry on oeis.org

1, 1, 0, 1, 3, 3, 6, 15, 24, 43, 92, 171, 315, 629, 1218, 2313, 4523, 8835, 17076, 33299, 65169
Offset: 0

Views

Author

Gus Wiseman, Jul 26 2021

Keywords

Comments

The matrices (A345197) count the integer compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2. Here, the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. So a(n) is the number of compositions of n of length (n + s)/2, where s is the alternating sum of the composition.

Examples

			The a(0) = 1 through a(7) = 15 compositions of n = 0..7 of length (n + s)/2 where s = alternating sum (empty column indicated by dot):
  ()  (1)  .  (2,1)  (2,2)    (2,3)    (2,4)      (2,5)
                     (1,1,2)  (1,2,2)  (1,3,2)    (1,4,2)
                     (2,1,1)  (2,2,1)  (2,3,1)    (2,4,1)
                                       (1,1,3,1)  (1,1,3,2)
                                       (2,1,2,1)  (1,2,3,1)
                                       (3,1,1,1)  (2,1,2,2)
                                                  (2,2,2,1)
                                                  (3,1,1,2)
                                                  (3,2,1,1)
                                                  (1,1,1,1,3)
                                                  (1,1,2,1,2)
                                                  (1,1,3,1,1)
                                                  (2,1,1,1,2)
                                                  (2,1,2,1,1)
                                                  (3,1,1,1,1)
		

Crossrefs

Traces of the matrices given by A345197.
Diagonals and antidiagonals of the same matrices are A346632 and A345907.
Row sums of A346632.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
Other diagonals are A008277 of A318393 and A055884 of A320808.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==(n+ats[#])/2&]],{n,0,15}]

A318391 Regular triangle where T(n,k) is the number of pairs of set partitions of {1,...,n} with meet of length k.

Original entry on oeis.org

1, 1, 3, 1, 9, 15, 1, 21, 90, 113, 1, 45, 375, 1130, 1153, 1, 93, 1350, 7345, 17295, 15125, 1, 189, 4515, 39550, 161420, 317625, 245829, 1, 381, 14490, 192213, 1210650, 4023250, 6883212, 4815403, 1, 765, 45375, 878010, 8014503, 40020750, 113572998, 173354508, 111308699
Offset: 1

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Examples

			The T(3,2) = 9 pairs of set partitions:
  {{1},{2,3}}  {{1},{2,3}}
  {{1},{2,3}}   {{1,2,3}}
  {{1,2},{3}}  {{1,2},{3}}
  {{1,2},{3}}   {{1,2,3}}
  {{1,3},{2}}  {{1,3},{2}}
  {{1,3},{2}}   {{1,2,3}}
   {{1,2,3}}   {{1},{2,3}}
   {{1,2,3}}   {{1,2},{3}}
   {{1,2,3}}   {{1,3},{2}}
Triangle begins:
     1
     1     3
     1     9    15
     1    21    90   113
     1    45   375  1130  1153
     1    93  1350  7345 17295 15125
		

Crossrefs

Programs

  • Mathematica
    Table[StirlingS2[n,k]*Sum[StirlingS1[k,i]*BellB[i]^2,{i,k}],{n,10},{k,n}]
  • PARI
    row(n) = {my(b=Vec(serlaplace(exp(exp(x + O(x*x^n))-1)-1))); vector(n, k, stirling(n,k,2)*sum(i=1, k, stirling(k,i,1)*b[i]^2))}
    { for(n=1, 10, print(row(n))) } \\ Andrew Howroyd, Jan 19 2023

Formula

T(n,k) = S(n,k) * Sum_{i=1..k} s(k,i) * B(i)^2 where S = A008277, s = A048994, B = A000110.

A318389 Regular triangle where T(n,k) is the number of pairs of set partitions of {1,...,n} with meet {{1},...,{n}} and join of length k.

Original entry on oeis.org

1, 2, 1, 8, 6, 1, 56, 44, 12, 1, 552, 440, 140, 20, 1, 7202, 5632, 1920, 340, 30, 1, 118456, 89278, 31192, 6160, 700, 42, 1, 2369922, 1708016, 595448, 124432, 16240, 1288, 56, 1, 56230544, 38592786, 13214672, 2830632, 400512, 37296, 2184, 72, 1, 1552048082
Offset: 1

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Examples

			The T(3,2) = 6 pairs of set partitions:
  {{1},{2},{3}}  {{1},{2,3}}
  {{1},{2},{3}}  {{1,2},{3}}
  {{1},{2},{3}}  {{1,3},{2}}
   {{1},{2,3}}  {{1},{2},{3}}
   {{1,2},{3}}  {{1},{2},{3}}
   {{1,3},{2}}  {{1},{2},{3}}
Triangle begins:
     1
     2    1
     8    6    1
    56   44   12    1
   552  440  140   20    1
  7202 5632 1920  340   30    1
		

Crossrefs

Row sums are A059849. First column is A181939.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]]>0]&]},If[c=={},s,csm[Union[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
    spmeet[a_,b_]:=DeleteCases[Union@@Outer[Intersection,a,b,1],{}];spmeet[a_,b_,c__]:=spmeet[spmeet[a,b],c];
    Table[Length[Select[Tuples[sps[Range[n]],2],And[Max@@Length/@spmeet@@#==1,Length[csm[Union@@#]]==k]&]],{n,5},{k,n}]

A318396 Number of pairs of integer partitions (y, v) of n such that there exists a pair of set partitions of {1,...,n} with meet {{1},...,{n}}, the first having block sizes y and the second v.

Original entry on oeis.org

1, 1, 3, 6, 15, 28, 64, 116, 238, 430, 818, 1426, 2618, 4439, 7775, 12993, 22025, 35946, 59507, 95319, 154073, 243226, 385192, 598531, 933096, 1429794, 2193699, 3322171, 5027995, 7524245, 11253557, 16661211, 24637859, 36130242, 52879638, 76830503, 111422013, 160505622
Offset: 0

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Comments

A multiset is normal if it spans an initial interval of positive integers, and strongly normal if in addition it has weakly decreasing multiplicities. a(n) is also the number of combinatory separations (see A269134 for definition) of strongly normal multisets of size n into normal sets.
From Andrew Howroyd, Oct 31 2019: (Start)
Also, the number of distinct unordered row and column sums of binary matrices without empty columns or rows and with a total of n ones. Only matrices in which both row and columns sums are weakly increasing need to be considered.
By the Gale-Ryser theorem this is equivalent to the number of pairs of integer partitions (y,v) of n with y dominating v. (End)

Examples

			The a(4) = 15 pairs of integer partitions:
     4, 1111
    22, 22
    22, 211
    22, 1111
    31, 211
    31, 1111
   211, 22
   211, 31
   211, 211
   211, 1111
  1111, 4
  1111, 22
  1111, 31
  1111, 211
  1111, 1111
The a(4) = 15 combinatory separations:
  1111<={1,1,1,1}
  1112<={1,1,12}
  1112<={1,1,1,1}
  1122<={12,12}
  1122<={1,1,12}
  1122<={1,1,1,1}
  1123<={1,123}
  1123<={12,12}
  1123<={1,1,12}
  1123<={1,1,1,1}
  1234<={1234}
  1234<={1,123}
  1234<={12,12}
  1234<={1,1,12}
  1234<={1,1,1,1}
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    strnorm[n_]:=Flatten[MapIndexed[Table[#2,{#1}]&,#]]&/@IntegerPartitions[n];
    normize[m_]:=m/.Rule@@@Table[{Union[m][[i]],i},{i,Length[Union[m]]}];
    Table[Length[Select[Union@@Table[{m,Sort[normize/@#]}&/@mps[m],{m,strnorm[n]}],And@@UnsameQ@@@#[[2]]&]],{n,6}]
  • PARI
    IsDom(p,q)=if(#q<#p, 0, my(s=0,t=0); for(i=0, #p-1, s+=p[#p-i]; t+=q[#q-i]; if(t>s, return(0))); 1)
    a(n)={if(n<1, n==0, my(s=0); forpart(p=n, forpart(q=n, s+=IsDom(p,q), [1, p[#p]], [#p, n])); s)} \\ Andrew Howroyd, Oct 31 2019
    
  • PARI
    \\ faster version.
    a(n)={local(Cache=Map());
      my(recurse(b, c, s, t)=my(hk=Vecsmall([b, c, s, t]), z);
         if(!mapisdefined(Cache, hk, &z),
           z = if(s, sum(i=1, min(s, b), sum(j=1, min(t-s+i, c), self()(i, j, s-i, t-j))),
               if(t, sum(j=1, min(t, c), self()(b, j, s, t-j)), 1));
           mapput(Cache, hk, z)); z);
      recurse(n, n, n, n)
    } \\ Andrew Howroyd, Oct 31 2019

Extensions

Terms a(9) and beyond from Andrew Howroyd, Oct 31 2019

A322442 Number of pairs of set partitions of {1,...,n} where every block of one is a subset or superset of some block of the other.

Original entry on oeis.org

1, 1, 4, 25, 195, 1894, 22159, 303769, 4790858, 85715595, 1720097275, 38355019080, 942872934661, 25383601383937, 744118939661444, 23635548141900445, 809893084668253151, 29822472337116844174, 1175990509568611058299, 49504723853840395163221, 2218388253903492656783562
Offset: 0

Views

Author

Gus Wiseman, Dec 08 2018

Keywords

Examples

			The a(3) = 25 pairs of set partitions (these are actually all pairs of set partitions of {1,2,3}):
  (1)(2)(3)|(1)(2)(3)
  (1)(2)(3)|(1)(23)
  (1)(2)(3)|(12)(3)
  (1)(2)(3)|(13)(2)
  (1)(2)(3)|(123)
    (1)(23)|(1)(2)(3)
    (1)(23)|(1)(23)
    (1)(23)|(12)(3)
    (1)(23)|(13)(2)
    (1)(23)|(123)
    (12)(3)|(1)(2)(3)
    (12)(3)|(1)(23)
    (12)(3)|(12)(3)
    (12)(3)|(13)(2)
    (12)(3)|(123)
    (13)(2)|(1)(2)(3)
    (13)(2)|(1)(23)
    (13)(2)|(12)(3)
    (13)(2)|(13)(2)
    (13)(2)|(123)
      (123)|(1)(2)(3)
      (123)|(1)(23)
      (123)|(12)(3)
      (123)|(13)(2)
      (123)|(123)
Non-isomorphic representatives of the pairs of set partitions of {1,2,3,4} for which the condition fails:
    (12)(34)|(13)(24)
    (12)(34)|(1)(3)(24)
  (1)(2)(34)|(13)(24)
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    costabQ[s_,t_]:=And@@Cases[s,x_:>Select[t,SubsetQ[x,#]||SubsetQ[#,x]&]!={}];
    Table[Length[Select[Tuples[sps[Range[n]],2],And[costabQ@@#,costabQ@@Reverse[#]]&]],{n,5}]
  • PARI
    F(x)={my(bell=(exp(y*(exp(x) - 1))  )); subst(serlaplace( serconvol(bell, bell)), y, exp(exp(x) - 1)-1)}
    seq(n) = {my(x=x + O(x*x^n)); Vec(serlaplace( exp( 2*exp(exp(x) - 1) - exp(x) - 1) * F(x) ))} \\ Andrew Howroyd, Jan 19 2024

Formula

E.g.f.: exp(exp(x)-1) * (2*B(x) - 1) where B(x) is the e.g.f. of A319884. - Andrew Howroyd, Jan 19 2024

Extensions

a(8) onwards from Andrew Howroyd, Jan 19 2024

A318392 Regular triangle where T(n,k) is the number of pairs of set partitions of {1,...,n} with join of length k.

Original entry on oeis.org

1, 3, 1, 15, 9, 1, 119, 87, 18, 1, 1343, 1045, 285, 30, 1, 19905, 15663, 4890, 705, 45, 1, 369113, 286419, 95613, 16450, 1470, 63, 1, 8285261, 6248679, 2147922, 410053, 44870, 2730, 84, 1, 219627683, 159648795, 55211229, 11202534, 1394883, 105714, 4662, 108, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Examples

			The T(3,2) = 9 pairs of set partitions:
  {{1},{2},{3}}  {{1},{2,3}}
  {{1},{2},{3}}  {{1,2},{3}}
  {{1},{2},{3}}  {{1,3},{2}}
   {{1},{2,3}}  {{1},{2},{3}}
   {{1},{2,3}}   {{1},{2,3}}
   {{1,2},{3}}  {{1},{2},{3}}
   {{1,2},{3}}   {{1,2},{3}}
   {{1,3},{2}}  {{1},{2},{3}}
   {{1,3},{2}}   {{1,3},{2}}
Triangle begins:
      1
      3     1
     15     9     1
    119    87    18     1
   1343  1045   285    30     1
  19905 15663  4890   705    45     1
		

Crossrefs

Row sums are A001247. First column is A060639.

Programs

  • Mathematica
    nn=5;Table[n!*SeriesCoefficient[Sum[BellB[n]^2*x^n/n!,{n,0,nn}]^t,{x,0,n},{t,0,k}],{n,nn},{k,n}]

Formula

E.g.f.: (Sum_{n>=0} B(n)^2 x^n/n!)^t where B = A000110.

A318559 Number of combinatory separations of the multiset of prime factors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 5, 1, 4, 1, 4, 2, 2, 1, 7, 2, 2, 3, 4, 1, 3, 1, 7, 2, 2, 2, 8, 1, 2, 2, 7, 1, 3, 1, 4, 4, 2, 1, 12, 2, 4, 2, 4, 1, 7, 2, 7, 2, 2, 1, 8, 1, 2, 4, 11, 2, 3, 1, 4, 2, 3, 1, 15, 1, 2, 4, 4, 2, 3, 1, 12, 5, 2, 1, 8, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2018

Keywords

Comments

A multiset is normal if it spans an initial interval of positive integers. The type of a multiset is the unique normal multiset that has the same sequence of multiplicities when its entries are taken in increasing order. For example the type of 335556 is 112223. A (headless) combinatory separation of a multiset m is a multiset of normal multisets {t_1,...,t_k} such that there exist multisets {s_1,...,s_k} with multiset union m and such that s_i has type t_i for each i = 1...k.

Examples

			The a(60) = 8 combinatory separations of {2,2,3,5}:
  {1123},
  {1,112}, {1,123}, {11,12}, {12,12},
  {1,1,11}, {1,1,12},
  {1,1,1,1}.
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    normize[m_]:=m/.Rule@@@Table[{Union[m][[i]],i},{i,Length[Union[m]]}];
    Table[Length[Union[Sort/@Map[normize,mps[primeMS[n]],{2}]]],{n,100}]

A322441 Number of pairs of set partitions of {1,...,n} where no block of one is a subset or equal to any block of the other.

Original entry on oeis.org

1, 0, 0, 0, 6, 60, 630, 9660, 192906
Offset: 0

Views

Author

Gus Wiseman, Dec 08 2018

Keywords

Comments

For any pair (X,Y) meeting the requirement, so does the pair (Y,X) which must be distinct from (X,Y), except for X = Y = {} when n = 0. Therefore all a(n) are even for n > 0. - M. F. Hasler, Dec 30 2020

Examples

			The a(4) = 6 pairs of set partitions:
  {{1,2},{3,4}} and {{1,3},{2,4}},
  {{1,2},{3,4}} and {{1,4},{2,3}},
  {{1,3},{2,4}} and {{1,2},{3,4}},
  {{1,3},{2,4}} and {{1,4},{2,3}},
  {{1,4},{2,3}} and {{1,2},{3,4}},
  {{1,4},{2,3}} and {{1,3},{2,4}}.
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    stabQ[u_]:=stabQ[u,SubsetQ];stabQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Table[Length[Select[Tuples[sps[Range[n]],2],And[UnsameQ@@Join@@#,stabQ[Join@@#]]&]],{n,6}]
Showing 1-10 of 20 results. Next