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 32 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

A245732 Number T(n,k) of endofunctions on [n] such that at least one preimage with cardinality >=k exists and a nonempty preimage of j implies that all i<=j have preimages with cardinality >=k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 27, 13, 1, 1, 256, 75, 7, 1, 1, 3125, 541, 21, 1, 1, 1, 46656, 4683, 141, 21, 1, 1, 1, 823543, 47293, 743, 71, 1, 1, 1, 1, 16777216, 545835, 5699, 183, 71, 1, 1, 1, 1, 387420489, 7087261, 42241, 2101, 253, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 30 2014

Keywords

Comments

T(0,0) = 1 by convention.
In general, column k > 1 is asymptotic to n! / ((1+r^(k-1)/(k-1)!) * r^(n+1)), where r is the root of the equation 2 - exp(r) + Sum_{j=1..k-1} r^j/j! = 0. - Vaclav Kotesovec, Aug 02 2014

Examples

			Triangle T(n,k) begins:
0 :         1;
1 :         1,      1;
2 :         4,      3,    1;
3 :        27,     13,    1,   1;
4 :       256,     75,    7,   1,  1;
5 :      3125,    541,   21,   1,  1, 1;
6 :     46656,   4683,  141,  21,  1, 1, 1;
7 :    823543,  47293,  743,  71,  1, 1, 1, 1;
8 :  16777216, 545835, 5699, 183, 71, 1, 1, 1, 1;
		

Crossrefs

Column k=0 gives A000312.
Columns k=1-10 give (for n>0): A000670, A032032, A102233, A232475, A245790, A245791, A245792, A245793, A245794, A245795.
T(2n,n) gives A244174(n) or 1+A007318(2n,n) = 1+A000984(n) for n>0.
Cf. A245733.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-j, k)*binomial(n, j), j=k..n))
        end:
    T:= (n, k)-> `if`(k=0, n^n, `if`(n=0, 0, b(n, k))):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n-j, k]*Binomial[n, j], {j, k, n}]]; T[n_, k_] := If[k == 0, n^n, If[n == 0, 0, b[n, k]]]; T[0, 0] = 1; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 05 2015, after Alois P. Heinz *)

Formula

E.g.f. (for column k > 0): 1/(2 -exp(x) +Sum_{j=1..k-1} x^j/j!) -1. - Vaclav Kotesovec, Aug 02 2014

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

A102233 Number of preferential arrangements of n labeled elements when at least k=3 elements per rank are required.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 21, 71, 183, 2101, 13513, 64285, 629949, 5762615, 41992107, 427215283, 4789958371, 47283346849, 540921904725, 6980052633257, 85901272312905, 1129338979629643, 16398293425501375, 238339738265039119, 3588600147767147775, 58124879519314730741
Offset: 0

Views

Author

Thomas Wieder, Jan 01 2005

Keywords

Comments

The labeled case for at least k=2 elements per rank is given by A032032 = Partition n labeled elements into sets of sizes of at least 2 and order the sets. The unlabeled case for at least k=3 elements per rank is given by A000930 = A Lamé sequence of higher order. The unlabeled case for at least k=2 elements per rank is given by A000045 = Fibonacci numbers.
With m = floor(n/3), a(n) is the number of ways to distribute n different toys to m numbered children such that each child receiving a toy gets at least three toys and, if child k gets no toys, then each child numbered higher than k also gets no toys. Furthermore, a(n)= row sums of triangle A200092 for n>=3. - Dennis P. Walsh, Apr 15 2013
Row sums of triangle A200092. - Dennis P. Walsh, Apr 15 2013

Examples

			Let 1,2,3,4,5,6 denote six labeled elements. Let | denote a separation between two ranks. E.g., if elements 1,2 and 3 are on rank (also called level) one and elements 3,4 and 5 are on rank two, then we have the ranking 123|456.
For n=9 we have a(9)=2101 rankings. The order within a rank does not count. Six examples are: 123|456|789; 123456789; 12345|6789; 129|345678; 1235|46789; 789|123456.
		

Crossrefs

Cf. column k=3 of A245732.

Programs

  • Maple
    seq (n! *coeff (series (1- (z^2-2*exp(z)+2+2*z) /(4-2*exp(z)+2*z+z^2), z=0, n+1), z, n), n=0..30);
    with(combstruct): SeqSetL := [S, {S=Sequence(U), U=Set(Z, card >= 3)}, labeled]: seq(count(SeqSetL, size=j), j=0..23); # Zerinvary Lajos, Oct 19 2006
    # third Maple program:
    b:= proc(n) b(n):= `if`(n=0, 1, add(b(n-j)/j!, j=3..n)) end:
    a:= n-> n!*b(n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 29 2014
  • Mathematica
    CoefficientList[Series[1-(x^2-2*E^x+2+2*x)/(4-2*E^x+2*x+x^2), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Sep 29 2013 *)
    b[n_] := b[n] = If[n==0, 1, Sum[b[n-j]/j!, {j, 3, n}]]; a[n_] := n!*b[n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 31 2016, after Alois P. Heinz *)
  • PARI
    z='z+O('z^66); Vec(serlaplace( 1-(z^2-2*exp(z)+2+2*z) / (4-2*exp(z)+2*z+z^2) ) ) \\ Joerg Arndt, Apr 16 2013

Formula

E.g.f.: 1-(z^2-2*exp(z)+2+2*z)/(4-2*exp(z)+2*z+z^2).
a(n) = n! * sum(m=1..n, sum(k=0..m, k!*(-1)^(m-k) *binomial(m,k) *sum(i=0..n-m, stirling2(i+k,k) *binomial(m-k,n-m-i) *2^(-n+m+i) /(i+k)!))); a(0)=1. - Vladimir Kruchinin, Feb 01 2011
a(n) ~ 2*n!/((2+r^2)*r^(n+1)), where r = 1.56811999239... is the root of the equation 4+2*r+r^2 = 2*exp(r). - Vaclav Kotesovec, Sep 29 2013
a(0) = 1; a(n) = Sum_{k=3..n} binomial(n,k) * a(n-k). - Ilya Gutkovskiy, Feb 09 2020
E.g.f.: 1/(2 + x + x^2/2 - exp(x)). - Christian Sievers, Oct 27 2024

Extensions

a(0) changed to 1 at the suggestion of Zerinvary Lajos, Oct 26 2006

A232475 Number of preferential arrangements of n labeled elements when at least k=4 elements per rank are required.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 71, 253, 673, 1585, 38149, 277707, 1402831, 5923503, 85577571, 937629969, 7475614341, 48939413477, 587610659505, 7906296686903, 87384175023995, 804959532778571, 9729015122635103, 144711323234918941, 2009073351016603121
Offset: 0

Views

Author

N. J. A. Sloane, Nov 27 2013

Keywords

Crossrefs

Cf. column k=4 of A245732.

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, add(b(n-j)/j!, j=4..n)) end:
    a:= n-> n!*b(n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 29 2014
  • Mathematica
    CoefficientList[Series[1/(2 + x - E^x + x^2/2 + x^3/6),{x,0,20}],x]*Range[0,20]! (* Vaclav Kotesovec, Aug 02 2014 *)

Formula

E.g.f.: 1/(2 + x - exp(x) + x^2/2 + x^3/6). - Vaclav Kotesovec, Aug 02 2014
a(n) ~ n! / ((1+r^3/6) * r^(n+1)), where r = 1.97615974210650519398... is the root of the equation 2 + r - exp(r) + r^2/2 + r^3/6 = 0. - Vaclav Kotesovec, Aug 02 2014
a(0) = 1; a(n) = Sum_{k=4..n} binomial(n,k) * a(n-k). - Ilya Gutkovskiy, Feb 09 2020

Extensions

More terms from Alois P. Heinz, Jul 29 2014

A337059 E.g.f.: 1 / (2 + x^3/6 - exp(x)).

Original entry on oeis.org

1, 1, 3, 12, 67, 461, 3823, 36933, 407963, 5068909, 69982083, 1062784273, 17607354955, 316012688213, 6108011298847, 126490611884013, 2794122884322635, 65578524701197341, 1629676370022564219, 42748628870263418761, 1180373377691425730235
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 13 2020

Keywords

Crossrefs

Programs

  • Maple
    S:= series(1/(2+x^3/6-exp(x)),x,31):
    seq(coeff(S,x,i)*i!,i=0..30); # Robert Israel, Aug 28 2020
  • Mathematica
    nmax = 20; CoefficientList[Series[1/(2 + x^3/6 - Exp[x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = a[1] = 1; a[n_] := a[n] = n (a[n - 1] + (n - 1) a[n - 2]/2) + Sum[Binomial[n, k] a[n - k], {k, 4, n}]; Table[a[n], {n, 0, 20}]

Formula

a(0) = a(1) = 1; a(n) = n * (a(n-1) + (n-1) * a(n-2) / 2) + Sum_{k=4..n} binomial(n,k) * a(n-k).

A337058 E.g.f.: 1 / (2 + x^2/2 - exp(x)).

Original entry on oeis.org

1, 1, 2, 7, 33, 191, 1323, 10711, 99151, 1032385, 11943003, 151979213, 2109829857, 31730171539, 513903517585, 8917723105003, 165065061436755, 3246274767649637, 67598797715175999, 1485845872704318265, 34378343609138619685, 835190283258080561671
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 13 2020

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 21; CoefficientList[Series[1/(2 + x^2/2 - Exp[x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = n a[n - 1] + Sum[Binomial[n, k] a[n - k], {k, 3, n}]; Table[a[n], {n, 0, 21}]

Formula

a(0) = 1; a(n) = n * a(n-1) + Sum_{k=3..n} binomial(n,k) * a(n-k).

A200091 The number of ways of putting n labeled items into k labeled boxes so that each box receives at least 2 objects.

Original entry on oeis.org

1, 1, 1, 6, 1, 20, 1, 50, 90, 1, 112, 630, 1, 238, 2940, 2520, 1, 492, 11508, 30240, 1, 1002, 40950, 226800, 113400, 1, 2024, 137610, 1367520, 2079000, 1, 4070, 445896, 7271880, 22869000, 7484400, 1, 8164, 1410552, 35692800, 196396200, 194594400, 1, 16354
Offset: 2

Views

Author

Peter Bala, Dec 04 2011

Keywords

Comments

Equivalently, the number of ordered set partitions of the set [n] into k blocks of size at least two. When the boxes are unlabeled or the set partitions unordered we obtain A008299.
The number of doubly-surjective functions f:[n]->[k], where a doubly-surjective function f has pre-image sets of size at least 2 for each element of the codomain. Also, the number of ways to distribute n different toys to k different children so that each child gets at least two toys. - Dennis P. Walsh, Apr 09 2013
T(n,k) is the number of chains 0 = x_0 < x_1 < ... < x_k = 1 in the Boolean lattice of rank n, such that x_i is not covered by x_(i+1) for all i. - Geoffrey Critzer, Jul 15 2018

Examples

			Table begins
  n |k=1   2     3     4
----+-------------------
  2 |  1
  3 |  1
  4 |  1   6
  5 |  1  20
  6 |  1  50    90
  7 |  1 112   630
  8 |  1 238  2940  2520
  9 |  1 492 11508 30240
  ...
T(4,2) = 6: The arrangements of 4 objects into 2 boxes { } and [ ] so that each box contains at least 2 items are {1,2}[3,4], {1,3}[2,4], {2,3}[1,4] and the 3 other possibilities where the contents of a pair of boxes are swapped.
		

References

  • P. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009, page 100-109.

Crossrefs

T(n,2) = A052515(n), T(n,3) = A224541(n), T(n,4) = A224542(n).
Cf. A032032 (row sums).

Programs

  • GAP
    Flat(List([2..14],n->List([1..Int(n/2)],k->Sum([0..k],j->(-1)^j*Binomial(k,j)*(Sum([0..j],i->Binomial(j,i)*(Binomial(n,i)*Factorial(i)*(k-j)^(n-i)))))))); # Muniru A Asiru, Jul 17 2018
  • Maple
    seq(seq(eval(diff((exp(x)-x-1)^k,x$n),x=0),k=1..floor(n/2)),n=2..20); # Dennis P. Walsh, Apr 09 2013
    T := proc(n,k) local r; k!* add(binomial(n,r)*(-1)^r*Stirling2(n-r,k-r), r=0..min(n,k)); end; # Marko Riedel, Mar 25 2022
  • Mathematica
    t[n_, k_] := k! * Sum[ (-1)^i*Binomial[n, i] * Sum[ (-1)^j*(k - i - j)^(n - i) / (j!*(k - i - j)!), {j, 0, k - i}], {i, 0, k}]; Table[ t[n, k], {n, 2, 14}, {k, 1, n/2}] // Flatten (* Jean-François Alcover, Apr 10 2013 *)

Formula

E.g.f. with additional 1: 1/(1-t*(exp(x)-1-x)) = 1 + t*x^2/2! + t*x^3/3! + (t+6*t^2)*x^4/4! + ....
E.g.f. (k fixed): (exp(x)-x-1)^k. - Dennis P. Walsh, Apr 09 2013
Recurrence relation: T(n+1,k) = k*(T(n,k) + n*T(n-1,k-1)). T(n,k) = k!*A008299(n,k).
T(n,k+j) = Sum_{i=0..n} C(n,i)*T(i,k)*T(n-i,j). - Dennis P. Walsh, Apr 09 2013
T(n,k) = Sum_{j=0..k} (-1)^j*C(k,j)*(Sum_{i=0..j} C(j,i)*C(n,i)*i!*(k-j)^(n-i)) for 1 <= k <= n/2 and n >= 2. - Dennis P. Walsh, Apr 10 2013
T(n,k) = k!*Sum_{r=0..min(n,k)} binomial(n,r)*(-1)^r*Stirling2(n-r, k-r). - Marko Riedel, Mar 25 2022

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

A343787 Number of ordered partitions of an n-set without blocks of size 4.

Original entry on oeis.org

1, 1, 3, 13, 74, 531, 4563, 45753, 524345, 6760039, 96837333, 1525909903, 26230304235, 488472319271, 9796281435125, 210496933103743, 4824574494068495, 117490079786298641, 3029472152485535343, 82454398253005541089, 2362311059301928969755, 71063998308414194250901
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 29 2021

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          `if`(j=4, 0, a(n-j)*binomial(n, j)), j=1..n))
        end:
    seq(a(n), n=0..21);  # Alois P. Heinz, Apr 29 2021
  • Mathematica
    nmax = 21; CoefficientList[Series[1/(2 + x^4/4! - Exp[x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[n_] := a[n] = If[n == 0, 1, Sum[If[k == 4, 0, Binomial[n, k] a[n - k]], {k, 1, n}]]; Table[a[n], {n, 0, 21}]

Formula

E.g.f.: 1 / (2 + x^4/4! - exp(x)).
Showing 1-10 of 32 results. Next