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

A052841 Expansion of e.g.f.: 1/(exp(x)*(2-exp(x))).

Original entry on oeis.org

1, 0, 2, 6, 38, 270, 2342, 23646, 272918, 3543630, 51123782, 811316286, 14045783798, 263429174190, 5320671485222, 115141595488926, 2657827340990678, 65185383514567950, 1692767331628422662, 46400793659664205566, 1338843898122192101558, 40562412499252036940910
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

From Michael Somos, Mar 04 2004: (Start)
Stirling transform of A005359(n)=[0,2,0,24,0,720,...] is a(n)=[0,2,6,38,270,...].
Stirling transform of -(-1)^n*A052657(n-1)=[0,0,2,-6,48,-240,...] is a(n-1)=[0,0,2,6,38,270,...].
Stirling transform of -(-1)^n*A052558(n-1)=[1,-1,4,-12,72,-360,...] is a(n-1)=[1,0,2,6,38,270,...].
Stirling transform of 2*A052591(n)=[2,4,24,96,...] is a(n+1)=[2,6,38,270,...].
(End)
Also the central moments of a Geometric(1/2) random variable (for example the number of coin tosses until the first head). - Svante Janson, Dec 10 2012
Also the number of ordered set partitions of {1..n} with no cyclical adjacencies (successive elements in the same block, where 1 is a successor of n). - Gus Wiseman, Feb 13 2019
Also the number of ordered set partitions of {1..n} with an even number of blocks. - Geoffrey Critzer, Jul 04 2020

Examples

			From _Gus Wiseman_, Feb 13 2019: (Start)
The a(4) = 38 ordered set partitions with no cyclical adjacencies:
  {{1}{2}{3}{4}}  {{1}{24}{3}}  {{13}{24}}
  {{1}{2}{4}{3}}  {{1}{3}{24}}  {{24}{13}}
  {{1}{3}{2}{4}}  {{13}{2}{4}}
  {{1}{3}{4}{2}}  {{13}{4}{2}}
  {{1}{4}{2}{3}}  {{2}{13}{4}}
  {{1}{4}{3}{2}}  {{2}{4}{13}}
  {{2}{1}{3}{4}}  {{24}{1}{3}}
  {{2}{1}{4}{3}}  {{24}{3}{1}}
  {{2}{3}{1}{4}}  {{3}{1}{24}}
  {{2}{3}{4}{1}}  {{3}{24}{1}}
  {{2}{4}{1}{3}}  {{4}{13}{2}}
  {{2}{4}{3}{1}}  {{4}{2}{13}}
  {{3}{1}{2}{4}}
  {{3}{1}{4}{2}}
  {{3}{2}{1}{4}}
  {{3}{2}{4}{1}}
  {{3}{4}{1}{2}}
  {{3}{4}{2}{1}}
  {{4}{1}{2}{3}}
  {{4}{1}{3}{2}}
  {{4}{2}{1}{3}}
  {{4}{2}{3}{1}}
  {{4}{3}{1}{2}}
  {{4}{3}{2}{1}}
(End)
		

Crossrefs

Main diagonal of A122101.
Inverse binomial transform of A000670.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40);
    Coefficients(R!(Laplace( Exp(-x)/(2-Exp(x)) ))); // G. C. Greubel, Jun 11 2024
    
  • Maple
    spec := [S,{B=Prod(C,C),C=Set(Z,1 <= card),S=Sequence(B)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    P := proc(n,x) option remember; if n = 0 then 1 else
    (n*x+2*(1-x))*P(n-1,x)+x*(1-x)*diff(P(n-1,x),x); expand(%) fi end:
    A052841 := n -> subs(x=2, P(n,x)):
    seq(A052841(n), n=0..21); # Peter Luschny, Mar 07 2014
    h := n -> add(combinat:-eulerian1(n, k)*2^k, k=0..n):
    a := n -> (h(n)+(-1)^n)/2: seq(a(n), n=0..21); # Peter Luschny, Sep 19 2015
    b := proc(n, m) option remember; if n = 0 then 1 else
         (m - 1)*b(n - 1, m) + (m + 1)*b(n - 1, m + 1) fi end:
    a := n -> b(n, 0): seq(a(n), n = 0..21); # Peter Luschny, Jun 23 2023
  • Mathematica
    a[n_] := If[n == 0, 1, (PolyLog[-n, 1/2]/2 + (-1)^n)/2]; (* or *)
    a[n_] := HurwitzLerchPhi[1/2, -n, -1]/2; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Feb 19 2016, after Vladeta Jovovic *)
    With[{nn=30},CoefficientList[Series[1/(Exp[x](2-Exp[x])),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Apr 08 2019 *)
  • PARI
    a(n)=if(n<0,0,n!*polcoeff(subst(1/(1-y^2),y,exp(x+x*O(x^n))-1),n))
    
  • PARI
    {a(n)=polcoeff(sum(m=0,n,(2*m)!*x^(2*m)/prod(k=1,2*m,1-k*x+x*O(x^n))),n)} /* Paul D. Hanna, Jul 20 2011 */
    
  • SageMath
    def A052841_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(-x)/(2-exp(x)) ).egf_to_ogf().list()
    A052841_list(40) # G. C. Greubel, Jun 11 2024

Formula

O.g.f.: Sum_{n>=0} (2*n)! * x^(2*n) / Product_{k=1..2*n} (1-k*x). - Paul D. Hanna, Jul 20 2011
a(n) = (A000670(n) + (-1)^n)/2 = Sum_{k>=0} (k-1)^n/2^(k+1). - Vladeta Jovovic, Feb 02 2003
Also, a(n) = Sum_{k=0..[n/2]} (2k)!*Stirling2(n, 2k). - Ralf Stephan, May 23 2004
a(n) = D^n*(1/(1-x^2)) evaluated at x = 0, where D is the operator (1+x)*d/dx. Cf. A000670 and A005649. - Peter Bala, Nov 25 2011
E.g.f.: 1/(2*G(0)), where G(k) = 1 - 2^k/(2 - 4*x/(2*x - 2^k*(k+1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 22 2012
a(n) ~ n!/(4*(log(2))^(n+1)). - Vaclav Kotesovec, Aug 10 2013
a(n) = (h(n)+(-1)^n)/2 where h(n) = Sum_{k=0..n} E(n,k)*2^k and E(n,k) the Eulerian numbers A173018 (see also A156365). - Peter Luschny, Sep 19 2015
a(n) = (-1)^n + Sum_{k=0..n-1} binomial(n,k) * a(k). - Ilya Gutkovskiy, Jun 11 2020

Extensions

Edited by N. J. A. Sloane, Sep 06 2013

A003436 Number of inequivalent labeled Hamiltonian circuits on n-octahedron. Interlacing chords joining 2n points on circle.

Original entry on oeis.org

1, 0, 1, 4, 31, 293, 3326, 44189, 673471, 11588884, 222304897, 4704612119, 108897613826, 2737023412199, 74236203425281, 2161288643251828, 67228358271588991, 2225173863019549229, 78087247031912850686, 2896042595237791161749, 113184512236563589997407
Offset: 0

Views

Author

Keywords

Comments

Also called the relaxed ménage problem (cf. A000179).
a(n) can be seen as a subset of the unordered pairings of the first 2n integers (A001147) with forbidden pairs (1,2n) and (i,i+1) for all i in [1,2n-1] (all adjacent integers modulo 2n). The linear version of this constraint is A000806. - Olivier Gérard, Feb 08 2011
Number of perfect matchings in the complement of C_{2n} where C_{2n} is the cycle graph on 2n vertices. - Andrew Howroyd, Mar 15 2016
Also the number of 2-uniform set partitions of {1...2n} containing no two cyclically successive vertices in the same block. - Gus Wiseman, Feb 27 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003435, A129348. A003437 gives unlabeled case.
First differences of A000806.
Column k=2 of A324428.

Programs

  • Maple
    A003436 := proc(n) local k;
          if n = 0 then 1
        elif n = 1 then 0
        else add( (-1)^k*binomial(n,k)*2*n/(2*n-k)*2^k*(2*n-k)!/2^n/n!,k=0..n) ;
        end if;
    end proc: # R. J. Mathar, Dec 11 2013
    A003436 := n-> `if`(n<2, 1-n, (-1)^n*2*hypergeom([n, -n], [], 1/2)):
    seq(simplify(A003436(n)), n=0..18); # Peter Luschny, Nov 10 2016
  • Mathematica
    a[n_] := (2*n-1)!! * Hypergeometric1F1[-n, 1-2*n, -2]; a[1] = 0;
    Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Apr 05 2013 *)
    twounifll[{}]:={{}};twounifll[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@twounifll[Complement[set,s]]]/@Table[{i,j},{j,If[i==1,Select[set,2<#i+1&]]}];
    Table[Length[twounifll[Range[n]]],{n,0,14,2}] (* Gus Wiseman, Feb 27 2019 *)

Formula

a(n) = A003435(n)/(n!*2^n).
a(n) = 2*n*a(n-1)-2*(n-3)*a(n-2)-a(n-3) for n>4. [Corrected by Vasu Tewari, Apr 11 2010, and by R. J. Mathar, Oct 02 2013]
G.f.: x + ((1-x)/(1+x)) * Sum_{n>=0} A001147(n)*(x/(1+x)^2)^n. - Vladeta Jovovic, Jun 27 2007
a(n) ~ 2^(n+1/2)*n^n/exp(n+1). - Vaclav Kotesovec, Aug 13 2013
a(n) = (-1)^n*2*hypergeom([n, -n], [], 1/2) for n >= 2. - Peter Luschny, Nov 10 2016

Extensions

a(0)=1 prepended by Gus Wiseman, Feb 27 2019

A278990 Number of loopless linear chord diagrams with n chords.

Original entry on oeis.org

1, 0, 1, 5, 36, 329, 3655, 47844, 721315, 12310199, 234615096, 4939227215, 113836841041, 2850860253240, 77087063678521, 2238375706930349, 69466733978519340, 2294640596998068569, 80381887628910919255, 2976424482866702081004, 116160936719430292078411
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2016

Keywords

Comments

See the signed version of these numbers, A000806, for much more information about these numbers.
From Gus Wiseman, Feb 27 2019: (Start)
Also the number of 2-uniform set partitions of {1..2n} containing no two successive vertices in the same block. For example, the a(3) = 5 set partitions are:
{{1,3},{2,5},{4,6}}
{{1,4},{2,5},{3,6}}
{{1,4},{2,6},{3,5}}
{{1,5},{2,4},{3,6}}
{{1,6},{2,4},{3,5}}
(End)
From Gus Wiseman, Jul 05 2020: (Start)
Also the number of permutations of the multiset {1,1,2,2,...,n,n} with no two consecutive terms equal and where the first i appears before the first j for i < j. For example, the a(3) = 5 permutations are the following.
(1,2,3,1,2,3)
(1,2,3,1,3,2)
(1,2,3,2,1,3)
(1,2,3,2,3,1)
(1,2,1,3,2,3)
(End)

Crossrefs

Column k=0 of A079267.
Column k=2 of A293157.
Row n=2 of A322013.
Cf. A000110, A000699 (topologically connected 2-uniform), A000806, A001147 (2-uniform), A003436 (cyclical version), A005493, A170941, A190823 (distance 3+ version), A322402, A324011, A324172.
Anti-run compositions are A003242.
Separable partitions are A325534.
Other sequences involving the multiset {1,1,2,2,...,n,n}: A001147, A007717, A020555, A094574, A316972.

Programs

  • Magma
    [n le 2 select 2-n else (2*n-3)*Self(n-1) + Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 26 2023
    
  • Mathematica
    RecurrenceTable[{a[n]== (2n-1)a[n-1] +a[n-2], a[0]==1, a[1]==0}, a, {n,0,20}] (* Vaclav Kotesovec, Sep 15 2017 *)
    FullSimplify[Table[-I*(BesselI[1/2+n,-1] BesselK[3/2,1] - BesselI[3/2,-1] BesselK[1/2+ n,1]), {n,0,20}]] (* Vaclav Kotesovec, Sep 15 2017 *)
    Table[(2 n-1)!! Hypergeometric1F1[-n,-2 n,-2], {n,0,20}] (* Eric W. Weisstein, Nov 14 2018 *)
    Table[Sqrt[2/Pi]/E ((-1)^n Pi BesselI[1/2+n,1] +BesselK[1/2+n,1]), {n,0,20}] // FunctionExpand // FullSimplify (* Eric W. Weisstein, Nov 14 2018 *)
    twouniflin[{}]:={{}};twouniflin[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@twouniflin[Complement[set,s]]]/@Table[{i,j},{j,Select[set,#>i+1&]}];
    Table[Length[twouniflin[Range[n]]],{n,0,14,2}] (* Gus Wiseman, Feb 27 2019 *)
  • PARI
    seq(N) = {
      my(a = vector(N)); a[1] = 0; a[2] = 1;
      for (n = 3, N, a[n] = (2*n-1)*a[n-1] + a[n-2]);
      concat(1, a);
    };
    seq(20) \\ Gheorghe Coserea, Dec 09 2016
    
  • SageMath
    def A278990_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(-1+sqrt(1-2*x))/sqrt(1-2*x) ).egf_to_ogf().list()
    A278990_list(30) # G. C. Greubel, Sep 26 2023

Formula

From Gheorghe Coserea, Dec 09 2016: (Start)
D-finite with recurrence a(n) = (2*n-1)*a(n-1) + a(n-2), with a(0) = 1, a(1) = 0.
E.g.f. y satisfies: 0 = (1-2*x)*y'' - 3*y' - y.
a(n) - a(n-1) = A003436(n) for all n >= 2. (End)
From Vaclav Kotesovec, Sep 15 2017: (Start)
a(n) = sqrt(2)*exp(-1)*(BesselK(1/2 + n, 1)/sqrt(Pi) - i*sqrt(Pi)*BesselI(1/2 + n, -1)), where i is the imaginary unit.
a(n) ~ 2^(n+1/2) * n^n / exp(n+1). (End)
a(n) = A114938(n)/n! - Gus Wiseman, Jul 05 2020 (from Alexander Burstein's formula at A114938).
From G. C. Greubel, Sep 26 2023: (Start)
a(n) = (-1)^n * (i/e)*Sqrt(2/Pi) * BesselK(n + 1/2, -1).
G.f.: sqrt(Pi/(2*x)) * exp(-(1+x)^2/(2*x)) * Erfi((1+x)/sqrt(2*x)).
E.g.f.: exp(-1 + sqrt(1-2*x))/sqrt(1-2*x). (End)

Extensions

a(0)=1 prepended by Gheorghe Coserea, Dec 09 2016

A124323 Triangle read by rows: T(n,k) is the number of partitions of an n-set having k singleton blocks (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 4, 4, 6, 0, 1, 11, 20, 10, 10, 0, 1, 41, 66, 60, 20, 15, 0, 1, 162, 287, 231, 140, 35, 21, 0, 1, 715, 1296, 1148, 616, 280, 56, 28, 0, 1, 3425, 6435, 5832, 3444, 1386, 504, 84, 36, 0, 1, 17722, 34250, 32175, 19440, 8610, 2772, 840, 120, 45, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Row sums are the Bell numbers (A000110). T(n,0)=A000296(n). T(n,k) = binomial(n,k)*T(n-k,0). Sum(k*T(n,k),k=0..n) = A052889(n) = n*B(n-1), where B(q) are the Bell numbers (A000110).
Exponential Riordan array [exp(exp(x)-1-x),x]. - Paul Barry, Apr 23 2009
Sum_{k=0..n} T(n,k)*2^k = A000110(n+1) is the number of binary relations on an n-set that are both symmetric and transitive. - Geoffrey Critzer, Jul 25 2014
Also the number of set partitions of {1, ..., n} with k cyclical adjacencies (successive elements in the same block, where 1 is a successor of n). Unlike A250104, we count {{1}} as having 1 cyclical adjacency. - Gus Wiseman, Feb 13 2019

Examples

			T(4,2)=6 because we have 12|3|4, 13|2|4, 14|2|3, 1|23|4, 1|24|3 and 1|2|34 (if we take {1,2,3,4} as our 4-set).
Triangle starts:
     1
     0    1
     1    0    1
     1    3    0    1
     4    4    6    0    1
    11   20   10   10    0    1
    41   66   60   20   15    0    1
   162  287  231  140   35   21    0    1
   715 1296 1148  616  280   56   28    0    1
  3425 6435 5832 3444 1386  504   84   36    0    1
From _Gus Wiseman_, Feb 13 2019: (Start)
Row n = 5 counts the following set partitions by number of singletons:
  {{1234}}    {{1}{234}}  {{1}{2}{34}}  {{1}{2}{3}{4}}
  {{12}{34}}  {{123}{4}}  {{1}{23}{4}}
  {{13}{24}}  {{124}{3}}  {{12}{3}{4}}
  {{14}{23}}  {{134}{2}}  {{1}{24}{3}}
                          {{13}{2}{4}}
                          {{14}{2}{3}}
... and the following set partitions by number of cyclical adjacencies:
  {{13}{24}}      {{1}{2}{34}}  {{1}{234}}  {{1234}}
  {{1}{24}{3}}    {{1}{23}{4}}  {{12}{34}}
  {{13}{2}{4}}    {{12}{3}{4}}  {{123}{4}}
  {{1}{2}{3}{4}}  {{14}{2}{3}}  {{124}{3}}
                                {{134}{2}}
                                {{14}{23}}
(End)
From _Paul Barry_, Apr 23 2009: (Start)
Production matrix is
0, 1,
1, 0, 1,
1, 2, 0, 1,
1, 3, 3, 0, 1,
1, 4, 6, 4, 0, 1,
1, 5, 10, 10, 5, 0, 1,
1, 6, 15, 20, 15, 6, 0, 1,
1, 7, 21, 35, 35, 21, 7, 0, 1,
1, 8, 28, 56, 70, 56, 28, 8, 0, 1 (End)
		

Crossrefs

A250104 is an essentially identical triangle, differing only in row 1.
For columns see A000296, A250105, A250106, A250107.

Programs

  • Maple
    G:=exp(exp(z)-1+(t-1)*z): Gser:=simplify(series(G,z=0,14)): for n from 0 to 11 do P[n]:=sort(n!*coeff(Gser,z,n)) od: for n from 0 to 11 do seq(coeff(P[n],t,k),k=0..n) od; # yields sequence in triangular form
    # Program from R. J. Mathar, Jan 22 2015:
    A124323 := proc(n,k)
        binomial(n,k)*A000296(n-k) ;
    end proc:
  • Mathematica
    Flatten[CoefficientList[Range[0,10]! CoefficientList[Series[Exp[x y] Exp[Exp[x] - x - 1], {x, 0,10}], x], y]] (* Geoffrey Critzer, Nov 24 2011 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],Count[#,{}]==k&]],{n,0,9},{k,0,n}] (* _Gus Wiseman, Feb 13 2019 *)

Formula

T(n,k) = binomial(n,k)*[(-1)^(n-k)+sum((-1)^(j-1)*B(n-k-j), j=1..n-k)], where B(q) are the Bell numbers (A000110).
E.g.f.: G(t,z) = exp(exp(z)-1+(t-1)*z).
G.f.: 1/(1-xy-x^2/(1-xy-x-2x^2/(1-xy-2x-3x^2/(1-xy-3x-4x^2/(1-... (continued fraction). - Paul Barry, Apr 23 2009

A306417 Number of self-conjugate set partitions of {1, ..., n}.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 7, 7, 46, 39, 321
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Comments

This sequence counts set partitions fixed under Callan's conjugation operation.

Examples

			The  a(3) = 1 through a(7) = 7 self-conjugate set partitions:
  {{12}{3}}  {{13}{24}}  {{123}{4}{5}}  {{135}{246}}    {{13}{246}{57}}
                         {{13}{2}{45}}  {{124}{35}{6}}  {{15}{246}{37}}
                                        {{13}{25}{46}}  {{1234}{5}{6}{7}}
                                        {{14}{2}{356}}  {{124}{3}{56}{7}}
                                        {{14}{236}{5}}  {{134}{2}{5}{67}}
                                        {{14}{25}{36}}  {{14}{2}{3}{567}}
                                        {{145}{26}{3}}  {{14}{23}{57}{6}}
		

Crossrefs

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

A306386 Number of chord diagrams with n chords all having arc length at least 3.

Original entry on oeis.org

1, 0, 0, 1, 7, 68, 837, 11863, 189503, 3377341, 66564396, 1439304777, 33902511983, 864514417843, 23735220814661, 698226455579492, 21914096529153695, 731009183350476805, 25829581529376423945, 963786767538027630275, 37871891147795243899204, 1563295398737378236910447
Offset: 0

Views

Author

Gus Wiseman, Feb 26 2019

Keywords

Comments

A cyclical form of A190823.
Also the number of 2-uniform set partitions of {1...2n} such that, when the vertices are arranged uniformly around a circle, no block has its two vertices separated by an arc length of less than 3.

Examples

			The a(8) = 7 2-uniform set partitions with all arc lengths at least 3:
  {{1,4},{2,6},{3,7},{5,8}}
  {{1,4},{2,7},{3,6},{5,8}}
  {{1,5},{2,6},{3,7},{4,8}}
  {{1,5},{2,6},{3,8},{4,7}}
  {{1,5},{2,7},{3,6},{4,8}}
  {{1,6},{2,5},{3,7},{4,8}}
  {{1,6},{2,5},{3,8},{4,7}}
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<8, [1, 0$2, 1, 7, 68, 837, 11863][n+1],
          ((8*n^4-64*n^3+142*n^2-66*n+109)    *a(n-1)
          -(24*n^4-248*n^3+870*n^2-1106*n+241)*a(n-2)
          +(24*n^4-264*n^3+982*n^2-1270*n+145)*a(n-3)
          -(8*n^4-96*n^3+374*n^2-486*n+33)    *a(n-4)
          -(4*n^3-24*n^2+39*n-2)              *a(n-5))/(4*n^3-36*n^2+99*n-69))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Feb 27 2019
  • Mathematica
    dtui[{},]:={{}};dtui[set:{i,___},n_]:=Join@@Function[s,Prepend[#,s]&/@dtui[Complement[set,s],n]]/@Table[{i,j},{j,Switch[i,1,Select[set,3<#i+2&]]}];
    Table[Length[dtui[Range[n],n]],{n,0,12,2}]

Formula

a(n) is even <=> n in { A135042 }. - Alois P. Heinz, Feb 27 2019

Extensions

a(10)-a(16) from Alois P. Heinz, Feb 26 2019
a(17)-a(21) from Alois P. Heinz, Feb 27 2019

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)

A324323 Regular triangle read by rows where T(n,k) is the number of topologically connected set partitions of {1,...,n} with k blocks, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 5, 0, 0, 0, 0, 1, 16, 4, 0, 0, 0, 0, 1, 42, 42, 0, 0, 0, 0, 0, 1, 99, 258, 27, 0, 0, 0, 0, 0, 1, 219, 1222, 465, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Feb 22 2019

Keywords

Comments

A set partition of {1,...,n} is topologically connected if the graph whose vertices are the blocks and whose edges are crossing pairs of blocks is connected, where two blocks cross each other if they are of the form {{...x...y...},{...z...t...}} for some x < z < y < t or z < x < t < y.

Examples

			Triangle begins:
    1
    0    1
    0    1    0
    0    1    0    0
    0    1    1    0    0
    0    1    5    0    0    0
    0    1   16    4    0    0    0
    0    1   42   42    0    0    0    0
    0    1   99  258   27    0    0    0    0
    0    1  219 1222  465    0    0    0    0    0
Row n = 6 counts the following set partitions:
  {{123456}}  {{1235}{46}}  {{13}{25}{46}}
              {{124}{356}}  {{14}{25}{36}}
              {{1245}{36}}  {{14}{26}{35}}
              {{1246}{35}}  {{15}{24}{36}}
              {{125}{346}}
              {{13}{2456}}
              {{134}{256}}
              {{1345}{26}}
              {{1346}{25}}
              {{135}{246}}
              {{1356}{24}}
              {{136}{245}}
              {{14}{2356}}
              {{145}{236}}
              {{146}{235}}
              {{15}{2346}}
		

Crossrefs

Programs

  • Mathematica
    croXQ[stn_]:=MatchQ[stn,{_,{_,x_,_,y_,_},_,{_,z_,_,t_,_},_}/;x0]&]},If[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
    crosscmpts[stn_]:=csm[Union[Subsets[stn,{1}],Select[Subsets[stn,{2}],croXQ]]];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],Length[crosscmpts[#]]<=1&&Length[#]==k&]],{n,0,6},{k,0,n}]

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)
Showing 1-10 of 12 results. Next