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 22 results. Next

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

Original entry on oeis.org

1, 1, 2, 1, 1, 6, 3, 8, 6, 1, 1, 14, 7, 48, 36, 6, 56, 44, 12, 1, 1, 30, 15, 200, 150, 25, 560, 440, 120, 10, 552, 440, 140, 20, 1, 1, 62, 31, 720, 540, 90, 3640, 2860, 780, 65, 8280, 6600, 2100, 300, 15, 7202, 5632, 1920, 340, 30, 1, 1, 126, 63, 2408, 1806
Offset: 1

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Examples

			The T(3,3,1) = 8 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,3},{2}}
   {{1,3},{2}}  {{1},{2,3}}
   {{1,3},{2}}  {{1,2},{3}}
    {{1,2,3}}  {{1},{2},{3}}
Tetrangle begins:
   1   1     1       1            1
       2 1   6 3     14 7         30  15
             8 6 1   48 36 6      200 150 25
                     56 44 12 1   560 440 120 10
                                  552 440 140 20  1
		

Crossrefs

Programs

  • Mathematica
    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]]]]]]]]];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    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[Length[spmeet@@#]==k,Length[csm[Union@@#]]==j]&]],{n,6},{k,n},{j,k}]

A181939 Number of pairs of set partitions of {1,2,...,n} whose meet is {{1},{2},...,{n}} and join is {{1,2,...,n}}.

Original entry on oeis.org

1, 1, 2, 8, 56, 552, 7202, 118456, 2369922, 56230544, 1552048082, 49080888144, 1756527398738, 70427165428648, 3136819046716266, 154090456510590632, 8296738497931578818, 487014208107376581984, 31018372994440588508642, 2134584265273475942046304
Offset: 0

Views

Author

Alexander Steinhardt (asteinh1(AT)hs-mittweida.de), Jens Schreiter (jschrei1(AT)hs-mittweida.de), Frank Simon, Apr 03 2012

Keywords

Examples

			For n = 2 there are exactly the following two pairs ({{1,2}},{{1},{2}}), ({{1},{2}},{{1,2}}) satisfying the imposed conditions.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    m:= proc(n) option remember; add(stirling1(n, k)*bell(k)^2, k=0..n) end:
    a:= proc(n) option remember;
          m(n) -add(binomial(n-1,k)*m(k)*a(n-k), k=1..n-1)
        end:
    seq(a(n), n=0..20); # Alois P. Heinz, Apr 20 2012
  • Mathematica
    m[n_] := m[n] = Sum[StirlingS1[n, k]*BellB[k]^2, {k, 0, n}]; a[n_] := a[n] = m[n] - Sum[ Binomial[n-1, k]*m[k]*a[n-k], {k, 1, n-1}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)

Formula

E.g.f.: 1+log(M(x)), where M(x) is the e.g.f. of A059849 of all pairs of set partitions of {1,2,...,n} whose meet is {{1},{2},...,{n}}.
a(n) = m(n) - Sum_{k=1..n-1} C(n-1,k)*m(k)*a(n-k), where m(n) = A059849(n) of all pairs of set partitions of an n-element set having meet {{1},{2},...,{n}}.

Extensions

Terms corrected and more terms added, Alois P. Heinz, Apr 20 2012

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}]

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.

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}]

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

Original entry on oeis.org

1, 1, 2, 1, 6, 8, 1, 14, 48, 56, 1, 30, 200, 560, 552, 1, 62, 720, 3640, 8280, 7202, 1, 126, 2408, 19600, 77280, 151242, 118456, 1, 254, 7728, 95256, 579600, 1915732, 3316768, 2369922, 1, 510, 24200, 435120, 3836952, 19056492, 54726672, 85317192, 56230544, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Examples

			The T(3,3) = 8 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,3},{2}}
   {{1,3},{2}}  {{1},{2,3}}
   {{1,3},{2}}  {{1,2},{3}}
    {{1,2,3}}  {{1},{2},{3}}
Triangle begins:
    1
    1    2
    1    6    8
    1   14   48   56
    1   30  200  560  552
    1   62  720 3640 8280 7202
		

Crossrefs

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[Length[spmeet@@#]==k,Length[csm[Union@@#]]==1]&]],{n,6},{k,n}]

Formula

T(n,k) = S(n,k) * A181939(k) where S = A008277.

A256033 Number of idempotents of rank 1 in partition monoid P_n.

Original entry on oeis.org

1, 5, 43, 529, 8451, 167397, 3984807, 111319257, 3583777723, 131082199809, 5385265586075, 246172834737485, 12422776100542887, 687441750763500441, 41475644663003037947, 2714680813135603845921
Offset: 1

Views

Author

N. J. A. Sloane, Mar 14 2015

Keywords

Crossrefs

Programs

  • Maple
    e256033 := proc(n,r,s)
        option remember;
        local resu,m,a,b;
        if n <= 0 then
            return 0;
        end if;
        if s = 1 then
            combinat[stirling2](n,r) ;
        elif r= 1 then
            combinat[stirling2](n,s) ;
        else
            resu := s*procname(n-1,r-1,s)+r*procname(n-1,r,s-1)+r*s*procname(n-1,r,s) ;
            for m from 1 to n-2 do
            for a from 1 to r-1 do
            for b from 1 to s-1 do
                resu := resu + binomial(n-2,m) *(a*(s-b)+b*(r-a))
                    *procname(m,a,b)*procname(n-m-1,r-a,s-b);
            end do:
            end do:
            end do:
            resu ;
        end if;
    end proc:
    A256033 := proc(n)
        a := 0 ;
        for r from 1 to n do
        for s from 1 to n do
            a  := a+r*s*e256033(n,r,s) ;
        end do;
        end do;
    end proc:
    seq(A256033(n),n=1..16) ; # R. J. Mathar, Mar 23 2015
  • Mathematica
    f[n_, r_, s_] := f[n, r, s] = Module[{resu, m, a, b}, Which[n <= 0, 0, s == 1, StirlingS2[n, r], r == 1, StirlingS2[n, s], True, resu = s*f[n - 1, r - 1, s] + r*f[n - 1, r, s - 1] + r*s*f[n - 1, r, s]; Do[resu += Binomial[n - 2, m]*(b*(r - a) + a*(s - b))*f[m, a, b]*f[-m + n - 1, r - a, s - b], {m, n}, {a, r - 1}, {b, s - 1}]; resu]];
    a[n_] := Module[{b = 0}, Do[b += r*s*f[n, r, s], {r, n}, {s, n}]; b];
    Array[a, 16] (* Jean-François Alcover, Nov 23 2017, after R. J. Mathar *)
  • Sage
    @cached_function
    def F(n, r, s):
        if n <= 0: return 0
        if s == 1: return stirling_number2(n, r)
        if r == 1: return stirling_number2(n, s)
        ret = s*F(n-1,r-1,s)+r*F(n-1,r,s-1)+r*s*F(n-1,r,s)
        for m in (1..n-2):
            for a in (1..r-1):
                for b in (1..s-1):
                    ret += binomial(n-2,m)*(a*(s-b)+b*(r-a))*F(m,a,b)*F(n-m-1,r-a,s-b)
        return ret
    @cached_function
    def A256033(n):
        a = 0
        for r in (1..n):
            for s in (1..n):
                a += r*s*F(n, r, s)
        return a
    [A256033(n) for n in (1..9)] # Peter Luschny, Jan 17 2016

A318394 Number of finite sets of set partitions of {1,...,n} such that any two have meet {{1},...,{n}}.

Original entry on oeis.org

2, 4, 18, 316, 37492
Offset: 1

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Examples

			The a(3) = 18 sets of set partitions:
        0
    {{1,2,3}}
   {{1,3},{2}}
   {{1,2},{3}}
   {{1},{2,3}}
  {{1},{2},{3}}
   {{1,2},{3}}   {{1,3},{2}}
   {{1},{2,3}}   {{1,3},{2}}
   {{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,3},{2}}
  {{1},{2},{3}}  {{1,2},{3}}  {{1,3},{2}}
  {{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,3},{2}}
		

Crossrefs

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]]]];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    spmeet[a_,b_]:=DeleteCases[Union@@Outer[Intersection,a,b,1],{}];spmeet[a_,b_,c__]:=spmeet[spmeet[a,b],c];
    Table[Length[stableSets[sps[Range[n]],Max@@Length/@spmeet[#1,#2]>1&]],{n,5}]
Showing 1-10 of 22 results. Next