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-7 of 7 results.

A016098 Number of crossing set partitions of {1,2,...,n}.

Original entry on oeis.org

0, 0, 0, 0, 1, 10, 71, 448, 2710, 16285, 99179, 619784, 4005585, 26901537, 188224882, 1373263700, 10444784477, 82735225014, 681599167459, 5830974941867, 51717594114952, 474845349889731, 4506624255883683, 44151662795470696, 445957579390657965
Offset: 0

Views

Author

Keywords

Comments

A partition p of the set N_n = {1,2,...,n}, whose elements are arranged in their natural order, is crossing if there exist four numbers 1 <= i < k < j < l <= n such that i and j are in the same block, k and l are in the same block, but i,j and k,l belong to two different blocks. Noncrossing partitions are also called "planar rhyme schemes". - Peter Luschny, Apr 28 2011
Consider a set of A000217(n) balls of n colors in which, for each integer k = 1 to n, exactly one color appears in the set a total of k times. (Each ball has exactly one color and is indistinguishable from other balls of the same color.) a(n+1) equals the number of ways to choose 0 or more balls of each color while satisfying the following conditions:
1. No two colors are chosen the same positive number of times.
2. Among colors chosen at least once, there exists at least one pair of colors (c, d) such that color c is chosen more times than color d, but color d appears more times in the original set than color c.
If the second requirement is removed, the number of acceptable ways to choose equals A000110(n+1). The number of ways that meet the first requirement, but fail to meet the second, equals A000108(n+1). See related comment for A085082. - Matthew Vandermast, Nov 22 2010
In the May 1978 Scientific American, Martin Gardner mentions Lady Murasaki's The Tale of Genji in which chapter heads illustrate A000110(5) = 52. These are the "crossing" cases mentioned there as being discussed by JoAnne Growney's 1970 thesis. - Alford Arnold, expanded by Charles R Greathouse IV, Jun 21 2021

Examples

			13|24 is the only crossing partition of {1,2,3,4}.
G.f. = x^4 + 10*x^5 + 71*x^6 + 448*x^7 + 2710*x^8 + 16285*x^9 + ...
From _Gus Wiseman_, Feb 15 2019: (Start)
The a(5) = 10 crossing set partitions:
  {{1,2,4},{3,5}}
  {{1,3},{2,4,5}}
  {{1,3,4},{2,5}}
  {{1,3,5},{2,4}}
  {{1,4},{2,3,5}}
  {{1},{2,4},{3,5}}
  {{1,3},{2,4},{5}}
  {{1,3},{2,5},{4}}
  {{1,4},{2},{3,5}}
  {{1,4},{2,5},{3}}
(End)
		

References

  • JoAnne (Simpson) Growney, Structure Inherent in a Free Groupoid, PhD Dissertation, The University of Oklahoma, 1970.

Crossrefs

Programs

  • Magma
    [Bell(n)-Catalan(n): n in [0..25]]; // Vincenzo Librandi, Aug 31 2016
  • Maple
    A016098 := n -> combinat[bell](n) - binomial(2*n,n)/(n+1):
    seq(A016098(n),n=0..22); # Peter Luschny, Apr 28 2011
  • Mathematica
    Table[Sum[StirlingS2[n, k], {k, 0, n}] - Binomial[2*n, n]/(n + 1), {n, 0, 25}] (* T. D. Noe, May 29 2012 *)
    Table[BellB[n] - CatalanNumber[n], {n, 0, 40}] (* Vincenzo Librandi, Aug 31 2016 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    croXQ[stn_]:=MatchQ[stn,{_,{_,x_,_,y_,_},_,{_,z_,_,t_,_},_}/;xGus Wiseman, Feb 17 2019 *)
  • MuPAD
    combinat::bell(n)-combinat::catalan(n) $ n = 0..26 // Zerinvary Lajos, May 10 2008
    
  • Sage
    [bell_number(i)-catalan_number(i) for i in range(23)] # Zerinvary Lajos, Mar 14 2009
    

Formula

a(n) = A000110(n) - A000108(n).
a(n) = Sum_{k=0..n} S2(n,k) - binomial(2*n,n)/(n+1); S2(n,k) Stirling numbers of the second kind.
E.g.f.: exp(exp(x)-1) - (BesselI(0,2*x) - BesselI(1,2*x))*exp(2*x). - Ilya Gutkovskiy, Aug 31 2016

Extensions

Offset corrected by Matthew Vandermast, Nov 22 2010
New name from Peter Luschny, Apr 28 2011

A324012 Number of self-complementary set partitions of {1, ..., n} with no singletons or cyclical adjacencies (successive elements in the same block, where 1 is a successor of n).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 3, 2, 14, 11, 80, 85, 510
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2019

Keywords

Comments

The complement of a set partition pi of {1, ..., n} is defined as n + 1 - pi (elementwise) on page 3 of Callan. For example, the complement of {{1,5},{2},{3,6},{4}} is {{1,4},{2,6},{3},{5}}. This sequence counts certain self-conjugate set partitions, i.e., fixed points under Callan's conjugation operation.

Examples

			The  a(6) = 3 through a(9) = 11 self-complementary set partitions with no singletons or cyclical adjacencies:
  {{135}{246}}    {{13}{246}{57}}  {{1357}{2468}}      {{136}{258}{479}}
  {{13}{25}{46}}  {{15}{246}{37}}  {{135}{27}{468}}    {{147}{258}{369}}
  {{14}{25}{36}}                   {{146}{27}{358}}    {{148}{269}{357}}
                                   {{147}{258}{36}}    {{168}{249}{357}}
                                   {{157}{248}{36}}    {{13}{258}{46}{79}}
                                   {{13}{24}{57}{68}}  {{14}{258}{37}{69}}
                                   {{13}{25}{47}{68}}  {{14}{28}{357}{69}}
                                   {{14}{26}{37}{58}}  {{16}{258}{37}{49}}
                                   {{14}{27}{36}{58}}  {{16}{28}{357}{49}}
                                   {{15}{26}{37}{48}}  {{17}{258}{39}{46}}
                                   {{15}{27}{36}{48}}  {{18}{29}{357}{46}}
                                   {{16}{24}{38}{57}}
                                   {{16}{25}{38}{47}}
                                   {{17}{28}{35}{46}}
		

Crossrefs

Cf. A000110, A000126, A000296, A001610, A080107, A169985, A261139, A306417 (all self-conjugate set partitions), A324011 (self-complementarity not required), A324013 (adjacencies allowed), A324014 (singletons allowed), A324015.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    cmp[stn_]:=Union[Sort[Max@@Join@@stn+1-#]&/@stn];
    Table[Select[sps[Range[n]],And[cmp[#]==Sort[#],Count[#,{_}]==0,Total[If[First[#]==1&&Last[#]==n,1,0]+Count[Subtract@@@Partition[#,2,1],-1]&/@#]==0]&]//Length,{n,0,10}]

A268814 Number of purely crossing partitions of [n].

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 5, 14, 62, 298, 1494, 8140, 47146, 289250, 1873304, 12756416, 91062073, 679616480, 5290206513, 42858740990, 360686972473, 3147670023632, 28439719809159, 265647698228954, 2561823514680235, 25475177517626196, 260922963832247729, 2749617210928715246
Offset: 0

Views

Author

Michel Marcus, Feb 14 2016

Keywords

Comments

For the definition of a purely crossing partition refer to Dykema link (see PC(n) Definition 1.2 and Table 2).
From Gus Wiseman, Feb 23 2019: (Start)
For n >= 1, a set partition of {1,...,n} is purely crossing if it is topologically connected (A099947), has no successive elements in the same block (A000110(n - 1)), and the first and last vertices belong to different blocks (A005493(n - 2)). For example, the a(4) = 1, a(6) = 5, and a(7) = 14 purely crossing set partitions are:
{{13}{24}} {{135}{246}} {{13}{246}{57}}
{{13}{25}{46}} {{13}{257}{46}}
{{14}{25}{36}} {{135}{26}{47}}
{{14}{26}{35}} {{135}{27}{46}}
{{15}{24}{36}} {{136}{24}{57}}
{{136}{25}{47}}
{{14}{257}{36}}
{{14}{26}{357}}
{{146}{25}{37}}
{{146}{27}{35}}
{{15}{246}{37}}
{{15}{247}{36}}
{{16}{24}{357}}
{{16}{247}{35}}
(End)

Examples

			G.f.: A(x) = 1 + x^4 + 5*x^6 + 14*x^7 + 62*x^8 + 298*x^9 + 1494*x^10 + 8140*x^11 + 47146*x^12 +...
		

Crossrefs

Programs

  • Mathematica
    n = 30; F = x*Sum[BellB[k] x^k, {k, 0, n}] + O[x]^n; B = ComposeSeries[1/( InverseSeries[F, w]/w)-1, x/(1+x) + O[x]^n]; A = (B-x)/(1+x); Join[{1}, CoefficientList[A, x] // Rest] (* Jean-François Alcover, Feb 23 2016, adapted from K. J. Dykema's code *)
    intvQ[set_]:=Or[set=={},Sort[set]==Range[Min@@set,Max@@set]];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],And[!MatchQ[#,{_,{_,x_,y_,_},_}/;x+1==y],#=={}||And@@Not/@intvQ/@Union@@@Subsets[#,{1,Length[#]-1}],#=={}||Position[#,1][[1,1]]!=Position[#,n][[1,1]]]&]],{n,0,10}] (* Gus Wiseman, Feb 23 2019 *)
  • PARI
    lista(nn) = {c = x/serreverse(x*serlaplace(exp(exp(x+x*O(x^nn)) -1))); b = subst(c, x, x/(1+x)+ O(x^nn)); vb = Vec(b-1); va = vector(#vb); va[1] = 0; va[2] = 0; for (k=3, #va, va[k] = vb[k] - va[k-1]; ); concat(1, va); }
    
  • PARI
    {a(n) = my(A=1+x^3); for(i=1, n, A = sum(m=0, n, x^m/prod(k=1, m, (1+x)^2*A - k*x +x*O(x^n)) )/(1+x) ); polcoeff( A, n)}
    for(n=0,35,print1(a(n),", ")) \\ Paul D. Hanna, Mar 07 2016
    
  • PARI
    {Stirling2(n, k) = n!*polcoeff(((exp(x+x*O(x^n)) - 1)^k)/k!, n)}
    {Bell(n) = sum(k=0,n, Stirling2(n, k) )}
    {a(n) = my(A=1+x); for(i=1, n, A = sum(m=0, n, Bell(m)*x^m/((1+x +x*O(x^n))^(2*m+1)*A^m)) ); polcoeff(A, n)}
    for(n=0,25,print1(a(n),", ")) \\ Paul D. Hanna, Mar 07 2016

Formula

G.f.: G(x) satisfies B(x) = x + (1 + x)*G(x) where B(x) is the g.f. of A268815 (see A(x) in Dykema link p. 7).
From Paul D. Hanna, Mar 07 2016: (Start)
O.g.f. A(x) satisfies:
(1) A(x) = Sum_{n>=0} A000110(n)*x^n / ((1+x)^(2*n+1) * A(x)^n), where A000110 are the Bell numbers.
(2) A(x) = 1/(1+x) * Sum_{n>=0} x^n / Product_{k=1..n} ((1+x)^2*A(x) - k*x).
(3) A(x) = 1/(1+x - x/((1+x)*A(x) - 1*x/(1+x - x/((1+x)*A(x) - 2*x/(1+x - x/((1+x)*A(x) - 3*x/(1+x - x/((1+x)*A(x) - 4*x/(1+x - x/((1+x)*A(x) -...)))))))))), a continued fraction. (End)

A268815 Number of purely crossing + partitions of [n].

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 5, 19, 76, 360, 1792, 9634, 55286, 336396, 2162554, 14629720, 103818489, 770678553, 5969822993, 48148947503, 403545713463, 3508356996105, 31587389832791, 294087418038113, 2827471212909189, 28037001032306431, 286398141349873925, 3010540174760962975
Offset: 0

Views

Author

Michel Marcus, Feb 14 2016

Keywords

Comments

For the definition of these special purely crossing partitions refer to Dykema link (see PC+(n) Definition 2.1 and Table 2).
From Gus Wiseman, Feb 23 2019: (Start)
a(n) is the number of topologically connected (A099947) set partitions of {1,...,n} with no successive elements in the same block. For example, the a(4) = 1 through a(7) = 19 set partitions are:
{{13}{24}} {{135}{24}} {{135}{246}} {{1357}{246}}
{{13}{25}{46}} {{13}{246}{57}}
{{14}{25}{36}} {{13}{257}{46}}
{{14}{26}{35}} {{135}{26}{47}}
{{15}{24}{36}} {{135}{27}{46}}
{{136}{24}{57}}
{{136}{25}{47}}
{{137}{25}{46}}
{{14}{257}{36}}
{{14}{26}{357}}
{{146}{25}{37}}
{{146}{27}{35}}
{{147}{25}{36}}
{{147}{26}{35}}
{{15}{246}{37}}
{{15}{247}{36}}
{{157}{24}{36}}
{{16}{24}{357}}
{{16}{247}{35}}
(End)

Examples

			G.f.: A(x) = 1 + x + x^4 + x^5 + 5*x^6 + 19*x^7 + 76*x^8 + 360*x^9 + 1792*x^10 +...
		

Crossrefs

Programs

  • Mathematica
    n = 30; F = x*Sum[BellB[k] x^k, {k, 0, n}] + O[x]^n; B = ComposeSeries[1/( InverseSeries[F, w] /w)-1, x/(1+x) + O[x]^n]; CoefficientList[B, x] // Rest (* Jean-François Alcover, Feb 16 2016, adapted from K. J. Dykema's code *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    intvQ[set_]:=Or[set=={},Sort[set]==Range[Min@@set,Max@@set]];
    Table[Length[Select[sps[Range[n]],And[!MatchQ[#,{_,{_,x_,y_,_},_}/;x+1==y],#=={}||And@@Not/@intvQ/@Union@@@Subsets[#,{1,Length[#]-1}]]&]],{n,0,10}] (* Gus Wiseman, Feb 23 2019 *)
  • PARI
    lista(nn) = {c = x/serreverse(x*serlaplace(exp(exp(x+x*O(x^nn)) -1))); b = subst(c, x, x/(1+x) + O(x^nn)); Vec(b);}
    
  • PARI
    {a(n) = my(A=1+x); for(i=1, n, A = sum(m=0, n, x^m/prod(k=1, m, (1+x)*A - k*x +x*O(x^n)) )); polcoeff(A, n)}
    for(n=0,25,print1(a(n),", ")) \\ Paul D. Hanna, Mar 07 2016
    
  • PARI
    {Stirling2(n, k) = n!*polcoeff(((exp(x+x*O(x^n)) - 1)^k)/k!, n)}
    {Bell(n) = sum(k=0,n, Stirling2(n, k) )}
    {a(n) = my(A=1+x); for(i=1, n, A = sum(m=0, n, Bell(m)*x^m/((1+x)*A +x*O(x^n))^m) ); polcoeff(A, n)}
    for(n=0,25,print1(a(n),", ")) \\ Paul D. Hanna, Mar 07 2016

Formula

G.f.: G(x) satisfies C(x) = G(x/1-x) where C(x) is the g.f. of A099947 (see B(x) in Dykema link p. 7).
From Paul D. Hanna, Mar 07 2016: (Start)
O.g.f. A(x) satisfies
(1) A(x) = Sum_{n>=0} A000110(n)*x^n/((1+x)^n*A(x)^n), where A000110 are the Bell numbers.
(2) A(x) = Sum_{n>=0} x^n / Product_{k=1..n} ((1+x)*A(x) - k*x).
(3) A(x) = 1/(1 - x/((1+x)*A(x) - 1*x/(1 - x/((1+x)*A(x) - 2*x/(1 - x/((1+x)*A(x) - 3*x/(1 - x/((1+x)*A(x) - 4*x/(1 - x/((1+x)*A(x) - ... )))))))))), a continued fraction. (End)

A306419 Number of set partitions of {1, ..., n} whose blocks are all singletons and pairs, not including {1, n} or {i, i + 1} for any i.

Original entry on oeis.org

1, 1, 1, 1, 4, 11, 32, 99, 326, 1123, 4064, 15291, 59924, 242945, 1019584, 4409233, 19648674, 89938705, 422744384, 2035739041, 10039057524, 50610247483, 260704414816, 1370387233859, 7346982653702, 40131663286851, 223238920709024, 1263531826402891, 7273434344119460
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Comments

Also the number of spanning subgraphs of the complement of an n-cycle, with no overlapping edges.
I.e., for n >= 3, also the number of matchings in the complement of the cycle graph C_n. - Eric W. Weisstein, Sep 02 2025

Examples

			The a(1) = 1 through a(5) = 11 set partitions:
  {{1}}  {{1}{2}}  {{1}{2}{3}}  {{13}{24}}      {{1}{24}{35}}
                                {{1}{24}{3}}    {{13}{24}{5}}
                                {{13}{2}{4}}    {{13}{25}{4}}
                                {{1}{2}{3}{4}}  {{14}{2}{35}}
                                                {{14}{25}{3}}
                                                {{1}{2}{35}{4}}
                                                {{1}{24}{3}{5}}
                                                {{1}{25}{3}{4}}
                                                {{13}{2}{4}{5}}
                                                {{14}{2}{3}{5}}
                                                {{1}{2}{3}{4}{5}}
		

Crossrefs

Cf. A000085, A000110, A000296, A001006, A001610, A003436 (no singletons), A034807, A170941 (linear case), A278990 (linear case with no singletons), A306417.

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]]]];
    Table[Length[stableSets[Complement[Subsets[Range[n],{2}],Sort/@Partition[Range[n],2,1,1]],Intersection[#1,#2]!={}&]],{n,0,10}]
    (* Second program: *)
    CompoundExpression[
      b[n_] := I^(1 - n) 2^((n - 1)/2) HypergeometricU[(1 - n)/2, 3/2, -1/2],
      Join[{1, 1, 1}, Table[Sum[(-1)^k b[n - 2 k] n (n - 1 - k)!/(k! (n - 2 k)!), {k, 0, n/2}], {n, 3, 20}]]
    ] (* Eric W. Weisstein, Sep 02 2025 *)
  • PARI
    \\ here b(n) is A000085(n)
    b(n) = {sum(k=0, n\2, n!/((n-2*k)!*2^k*k!))}
    a(n) = {if(n < 3, n >= 0, sum(k=0, n\2, (-1)^k*b(n-2*k)*n*(n-1-k)!/(k!*(n-2*k)!)))} \\ Andrew Howroyd, Aug 30 2019

Formula

a(n) = Sum_{k=0..floor(n/2)} (-1)^k*A034807(n, k)*A000085(n-2*k) for n > 2. - Andrew Howroyd, Aug 30 2019

Extensions

Terms a(16) and beyond from Andrew Howroyd, Aug 30 2019

A306416 Number of ordered set partitions of {1, ..., n} with no singletons or cyclical adjacencies (successive elements in the same block, where 1 is a successor of n).

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 26, 84, 950, 6000, 62522, 556116, 6259598, 69319848, 874356338, 11384093196, 161462123894, 2397736692144, 37994808171962, 631767062124564, 11088109048500158, 203828700127054008, 3928762035148317314, 79079452776283889820, 1661265965479375937030, 36332908076071038467520, 826376466514358722894154
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Examples

			The a(4) = 2 ordered set partitions are: {{1,3},{2,4}}, {{2,4},{1,3}}.
		

Crossrefs

Cf. A000110, A000126, A000296, A000670, A001610, A032032 (adjacencies allowed), A052841 (singletons allowed), A124323, A169985, A306417, A324011 (orderless case), A324012, A324015.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Sum[Length[stn]!,{stn,Select[sps[Range[n]],And[Count[#,{_}]==0,Total[If[First[#]==1&&Last[#]==n,1,0]+Count[Subtract@@@Partition[#,2,1],-1]&/@#]==0]&]}],{n,0,10}]

Extensions

a(12)-a(26) from Alois P. Heinz, Feb 14 2019

A306418 Regular triangle read by rows where T(n, k) is the number of set partitions of {1, ..., n} requiring k steps of removing singletons and cyclical adjacency initiators until reaching a fixed point, n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 0, 2, 3, 0, 1, 2, 12, 0, 0, 0, 12, 35, 5, 0, 0, 5, 56, 100, 42, 0, 0, 0, 14, 282, 343, 231, 7, 0, 0, 0, 66, 1406, 1476, 1088, 104, 0, 0, 0, 0, 307, 7592, 7383, 4929, 909, 27, 0, 0, 0, 0, 1554, 44227, 40514, 22950, 6240, 470, 20, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Comments

See Callan's article for details on this transformation (SeparateIS).

Examples

			Triangle begins:
    1
    0    1
    0    2    0
    0    2    3    0
    1    2   12    0    0
    0   12   35    5    0    0
    5   56  100   42    0    0    0
   14  282  343  231    7    0    0    0
   66 1406 1476 1088  104    0    0    0    0
  307 7592 7383 4929  909   27    0    0    0    0
		

Crossrefs

Row sums are A000110. First column is A324011.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    qbj[stn_]:=With[{ini=Join@@Table[Select[s,If[#==Max@@Max@@@stn,MemberQ[s,First[Union@@stn]],MemberQ[s,(Union@@stn)[[Position[Union@@stn,#][[1,1]]+1]]]]&],{s,stn}],sng=Join@@Select[stn,Length[#]==1&]},DeleteCases[Table[Complement[s,Union[sng,ini]],{s,stn}],{}]];
    Table[Length[Select[sps[Range[n]],Length[FixedPointList[qbj,#]]-2==k&]],{n,0,8},{k,0,n}]
Showing 1-7 of 7 results.