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.

Previous Showing 81-90 of 131 results. Next

A367891 Expansion of e.g.f. exp(4*(exp(x) - 1 - x)).

Original entry on oeis.org

1, 0, 4, 4, 52, 164, 1364, 7620, 60148, 449252, 3831700, 33811716, 320082228, 3178774564, 33234163668, 363535920196, 4153091085172, 49406896240996, 610777358429204, 7830140410294148, 103914148870277556, 1425254885630973604, 20173671034640405588
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2023

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 22; CoefficientList[Series[Exp[4 (Exp[x] - 1 - x)], {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = 4 Sum[Binomial[n - 1, k] a[n - k - 1], {k, 1, n - 1}]; Table[a[n], {n, 0, 22}]
    Table[Sum[Binomial[n, k] (-4)^(n - k) BellB[k, 4], {k, 0, n}], {n, 0, 22}]
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(exp(4*(exp(x) - 1 - x)))) \\ Michel Marcus, Dec 04 2023

Formula

G.f. A(x) satisfies: A(x) = 1 - 4 * x * ( A(x) - A(x/(1 - x)) / (1 - x) ).
a(n) = exp(-4) * Sum_{k>=0} 4^k * (k-4)^n / k!.
a(0) = 1; a(n) = 4 * Sum_{k=1..n-1} binomial(n-1,k) * a(n-k-1).
a(n) = Sum_{k=0..n} binomial(n,k) * (-4)^(n-k) * A078944(k).

A102287 Total number of even blocks in all partitions of n-set.

Original entry on oeis.org

0, 1, 3, 13, 55, 256, 1274, 6791, 38553, 232171, 1477355, 9898780, 69621864, 512585529, 3940556611, 31560327945, 262805569159, 2271094695388, 20333574916690, 188322882941471, 1801737999086129, 17783472151154007, 180866601699482803, 1893373126840572056
Offset: 1

Views

Author

Vladeta Jovovic, Feb 19 2005

Keywords

Examples

			a(3)=3 because in the 5 (=A000110(3)) partitions 123, (12)/3, (13)/2, 1/(23) and 1/2/3 of {1,2,3} we have 3 blocks of even size (shown between parentheses).
		

Crossrefs

Programs

  • Maple
    G:=(cosh(x)-1)*exp(exp(x)-1): Gser:=series(G,x=0,28): seq(n!*coeff(Gser,x^n),n=1..25); # Emeric Deutsch, Jun 22 2005
    # second Maple program:
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, 0],
           add((p->(p+[0, `if`(i::odd, 0, j)*p[1]]))(
           b(n-i*j, i-1))*multinomial(n, n-i*j, i$j)/j!, j=0..n/i))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=1..30);  # Alois P. Heinz, Sep 16 2015
  • Mathematica
    Range[0, nn]! CoefficientList[
      D[Series[Exp[y (Cosh[x] - 1) + Sinh[x]], {x, 0, nn}], y] /. y -> 1,  x]  (* Geoffrey Critzer, Aug 28 2012 *)

Formula

E.g.f: (cosh(x)-1)*exp(exp(x)-1).

Extensions

More terms from Emeric Deutsch, Jun 22 2005

A178979 Triangular array read by rows: T(n,k) is the number of set partitions of {1,2,...,n} in which the shortest block has length k (1 <= k <= n).

Original entry on oeis.org

1, 1, 1, 4, 0, 1, 11, 3, 0, 1, 41, 10, 0, 0, 1, 162, 30, 10, 0, 0, 1, 715, 126, 35, 0, 0, 0, 1, 3425, 623, 56, 35, 0, 0, 0, 1, 17722, 2934, 364, 126, 0, 0, 0, 0, 1, 98253, 15165, 2220, 210, 126, 0, 0, 0, 0, 1, 580317, 86900, 10560, 330, 462, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Geoffrey Critzer, Jan 02 2011

Keywords

Comments

Row sums are Bell numbers A000110.
Column 1 is A000296 (shifted).
From Peter Luschny, Apr 05 2011: (Start)
Sum_{k>1} T(n,k) = A000296(n) count the set partitions with blocks of size > 1.
T(n,1) = A000296(n-1) count the set partitions with blocks of size = 1. Thus for the Bell numbers A000110(n) = Sum_{k>=1} T(n,k) = A000296(n-1) + A000296(n). (End)

Examples

			T(4,2) = card ({12|34, 13|24, 14|23}) = 3. - _Peter Luschny_, Apr 05 2011
Triangle begins:
    1;
    1,   1;
    4,   0,  1;
   11,   3,  0,  1;
   41,  10,  0,  0,  1;
  162,  30, 10,  0,  0,  1;
  715, 126, 35,  0,  0,  0,  1;
  ...
		

Crossrefs

Programs

  • Maple
    g := k-> exp(x)*(1-(GAMMA(k,x)/GAMMA(k))); egf := k-> exp(g(k))-exp(g(k+1));
    T := (n,k)-> n!*coeff(series(egf(k), x, n+1), x, n):
    seq(seq(T(n, k), k=1..n), n=1..9); # Peter Luschny, Apr 05 2011
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>n, 0,
           add(b(n-i*j, i+1) *n!/i!^j/(n-i*j)!/j!, j=0..n/i)))
        end:
    T:= (n, k)-> b(n, k) -b(n, k+1):
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Mar 25 2016
  • Mathematica
    a[k_]:= Exp[x]-Sum[x^i/i!,{i,0,k}]; Transpose[Table[Range[20]! Rest[CoefficientList[Series[Exp[a[k-1]]-Exp[a[k]],{x,0,20}],x]],{k,1,9}]]//Grid

Formula

E.g.f. for column k: exp((exp(x) - Sum_{i=0..k-1} x^i/i!)) - exp((exp(x) - Sum_{i=0..k} x^i/i!)).
From Ludovic Schwob, Jan 15 2022: (Start)
T(2n,n) = A001700(n) = C(2n-1,n) for n>0.
T(2n-1,n-1) = A001700(n) = C(2n-1,n) for n>1. (End)

A182930 Triangle read by rows: Number of set partitions of {1,2,..,n} such that |k| is a block and no block |m| with m < k exists, (1 <= n, 1 <= k <= n).

Original entry on oeis.org

1, 1, 0, 2, 1, 1, 5, 3, 2, 1, 15, 10, 7, 5, 4, 52, 37, 27, 20, 15, 11, 203, 151, 114, 87, 67, 52, 41, 877, 674, 523, 409, 322, 255, 203, 162, 4140, 3263, 2589, 2066, 1657, 1335, 1080, 877, 715, 21147, 17007, 13744, 11155, 9089, 7432, 6097, 5017, 4140, 3425
Offset: 1

Views

Author

Peter Luschny, Apr 08 2011

Keywords

Comments

Mirror image of A106436. - Alois P. Heinz, Jan 29 2019

Examples

			T(4,2) = card({2|134, 2|3|14, 2|4|13}) = 3.
[1]     1,
[2]     1,    0,
[3]     2,    1,    1,
[4]     5,    3,    2,    1,
[5]    15,   10,    7,    5,    4,
[6]    52,   37,   27,   20,   15,   11,
     [-1-] [-2-] [-3-] [-4-] [-5-] [-6-]
		

Crossrefs

T(2n+1,n+1) gives A020556.

Programs

  • Maple
    T := proc(n, k) option remember; if n = 1 then 1 elif n = k then T(n-1,1) - T(n-1,n-1) else T(n-1,k) + T(n, k+1) fi end:
    A182930 := (n,k) -> T(n,k); seq(print(seq(A182930(n,k),k=1..n)),n=1..6);
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n == 1, 1, n == k, T[n-1, 1] - T[n-1, n-1], True, T[n-1, k] + T[n, k+1]];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] (* Jean-François Alcover, Jun 22 2019 *)

Formula

Recursion: The value of T(n,k) is, if n < 0 or k < 0 or k > n undefined, else if n = 1 then 1 else if k = n then T(n-1,1) - T(n-1,n-1); in all other cases T(n,k) = T(n,k+1) + T(n-1,k).

A247491 Number of crossing partitions of {1,2,...,n} that contain no singletons.

Original entry on oeis.org

0, 0, 0, 0, 1, 5, 26, 126, 624, 3193, 17119, 96668, 576104, 3621982, 23980620, 166805068, 1215842905, 9263445775, 73599067250, 608471202527, 5224252803246, 46499854580107, 428369819029085, 4078345518655015, 40073659206668916, 405885206895408576, 4232705116291188276
Offset: 0

Views

Author

Peter Luschny, Sep 25 2014

Keywords

Comments

A partition p of the set {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.
Also the number of crossing partitions of {1,2,...,n} that contain no cyclical adjacencies. e.g., a(5) = 5, [13|24|5, 13|25|4, 14|25|3, 14|2|35, 1|24|35]. - Yuchun Ji, Nov 13 2020

Examples

			The crossing partitions of {1,2,3,4,5} that contain no singletons are: [13|245], [14|235], [24,135], [25|134], [35|124].
		

Crossrefs

Programs

  • Maple
    A247491 := n -> (-1)^n-add((-1)^(n-k)*combinat:-bell(k), k = 0..n-1) - (-1)^n*hypergeom([-n, 1/2], [2], 4); seq(round(evalf(A247491(n), 100)), n=0..27);
  • Mathematica
    Table[Sum[(-1)^(n-k)*Binomial[n,k]*(BellB[k]-CatalanNumber[k]), {k,0,n}], {n, 0, 26}] (* Indranil Ghosh, Mar 04 2017 *)
  • PARI
    B(n) = sum(k=0, n, stirling(n,k,2));
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n,k)*(B(k)-binomial(2*k,k)/(k+1))); \\ Indranil Ghosh, Mar 04 2017
  • Sage
    A247491 = lambda n: sum((-1)^(n-k)*binomial(n,k)*(bell_number(k) - catalan_number(k)) for k in (0..n))
    [A247491(n) for n in range(27)]
    

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k)*C(n,k)*(Bell(k)-Catalan(k)).
a(n) = A000296(n) - A005043(n).
a(n) = A016098(n) - A247494(n); i.e., remove the partitions with cyclical adjacencies from the crossing partitions. - Yuchun Ji, Nov 17 2020

A247494 Number of crossing partitions of {1,2,...,n} that contain singletons.

Original entry on oeis.org

0, 0, 0, 0, 0, 5, 45, 322, 2086, 13092, 82060, 523116, 3429481, 23279555, 164244262, 1206458632, 9228941572, 73471779239, 608000100209, 5222503739340, 46493341311706, 428345495309624, 4078254436854598, 40073317276815681, 405883920183989049, 4232700263388189325
Offset: 0

Views

Author

Peter Luschny, Oct 02 2014

Keywords

Comments

A partition p of the set {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.
Also number of crossing partitions of {1,2,...,n} that contain cyclical adjacencies. a(5) = 5, [124|35, 134|25, 135|24, 13|245, 14|235]. - Yuchun Ji, Nov 13 2020

Examples

			The crossing partitions of {1,2,3,4,5} that contain singletons are: [1|24|35], [2|14|35], [3|14|25], [4|13|25], [5|13|24].
		

Crossrefs

Programs

  • Maple
    A247494 := n -> add((-1)^(n-k+1)*combinat:-bell(k+1), k=0..n-1) + (-1)^n*hypergeom([-n,1/2],[2],4) - binomial(2*n,n)/(n+1):
    seq(round(evalf(A247494(n),100)), n=0..25);
  • Mathematica
    Table[Sum[(-1)^(n-k+1)*Binomial[n,k]*(BellB[k]-CatalanNumber[k]),{k,0,n-1}],{n,0,25}] (* Indranil Ghosh, Mar 04 2017 *)
  • PARI
    B(n) = sum(k=0, n, stirling(n,k,2));
    a(n) = sum(k=0, n-1, (-1)^(n-k+1)*binomial(n,k)*(B(k) - binomial(2*k,k)/(k+1))); \\ Indranil Ghosh, Mar 04 2017
  • Sage
    A247494 = lambda n: sum((-1)^(n-k+1)*binomial(n,k)*(bell_number(k)-catalan_number(k)) for k in (0..n-1))
    [A247494(n) for n in range(26)]
    

Formula

a(n) = Sum_{k = 0..n-1} (-1)^(n-k+1)*binomial(n,k)*(Bell(k)-Catalan(k)).
a(n) = A016098(n) - A247491(n).
a(n) = A000296(n+1) - A106640(n-1), for n>0 (i.e., remove the non-crossing partitions from the cyclical adjacencies partitions). - Yuchun Ji, Nov 11 2020

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

A306437 Regular triangle read by rows where T(n,k) is the number of non-crossing set partitions of {1, ..., n} in which all blocks have size k.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 0, 0, 0, 1, 1, 5, 3, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 14, 0, 4, 0, 0, 0, 1, 1, 0, 12, 0, 0, 0, 0, 0, 1, 1, 42, 0, 0, 5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 132, 55, 22, 0, 6, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 429, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 15 2019

Keywords

Examples

			Triangle begins:
  1
  1   1
  1   0   1
  1   2   0   1
  1   0   0   0   1
  1   5   3   0   0   1
  1   0   0   0   0   0   1
  1  14   0   4   0   0   0   1
  1   0  12   0   0   0   0   0   1
  1  42   0   0   5   0   0   0   0   1
  1   0   0   0   0   0   0   0   0   0   1
  1 132  55  22   0   6   0   0   0   0   0   1
Row 6 counts the following non-crossing set partitions (empty columns not shown):
  {{1}{2}{3}{4}{5}{6}}  {{12}{34}{56}}  {{123}{456}}  {{123456}}
                        {{12}{36}{45}}  {{126}{345}}
                        {{14}{23}{56}}  {{156}{234}}
                        {{16}{23}{45}}
                        {{16}{25}{34}}
		

Crossrefs

Row sums are A194560. Column k=2 is A126120. Trisection of column k=3 is A001764.

Programs

  • Maple
    T:= (n, k)-> `if`(irem(n, k)=0, binomial(n, n/k)/(n-n/k+1), 0):
    seq(seq(T(n,k), k=1..n), n=1..14);  # Alois P. Heinz, Feb 16 2019
  • Mathematica
    Table[Table[If[Divisible[n,d],d/n*Binomial[n,n/d-1],0],{d,n}],{n,15}]

Formula

If d|n, then T(n, d) = binomial(n, n/d)/(n - n/d + 1); otherwise T(n, k) = 0 [Theorem 1 of Kreweras].

A323949 Number of set partitions of {1, ..., n} with no block containing three distinct cyclically successive vertices.

Original entry on oeis.org

1, 1, 2, 4, 10, 36, 145, 631, 3015, 15563, 86144, 508311, 3180930, 21018999, 146111543, 1065040886, 8117566366, 64531949885, 533880211566, 4587373155544, 40865048111424, 376788283806743, 3590485953393739, 35312436594162173, 357995171351223109, 3736806713651177702
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Comments

Cyclically successive means 1 is a successor of n.

Examples

			The a(1) = 1 through a(4) = 10 set partitions:
  {{1}}  {{1,2}}    {{1},{2,3}}    {{1,2},{3,4}}
         {{1},{2}}  {{1,2},{3}}    {{1,3},{2,4}}
                    {{1,3},{2}}    {{1,4},{2,3}}
                    {{1},{2},{3}}  {{1},{2},{3,4}}
                                   {{1},{2,3},{4}}
                                   {{1,2},{3},{4}}
                                   {{1},{2,4},{3}}
                                   {{1,3},{2},{4}}
                                   {{1,4},{2},{3}}
                                   {{1},{2},{3},{4}}
		

Crossrefs

Programs

  • Mathematica
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Select[Partition[Range[n],3,1,1],Function[ed,UnsameQ@@ed&&Complement[ed,#]=={}]]=={}&],Range[n]]],{n,8}]

Extensions

a(12)-a(25) from Alois P. Heinz, Feb 10 2019

A323955 Regular triangle read by rows where T(n, k) is the number of set partitions of {1, ..., n} with no block containing k cyclically successive vertices, n >= 1, 2 <= k <= n + 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 5, 4, 10, 14, 15, 11, 36, 46, 51, 52, 41, 145, 184, 196, 202, 203, 162, 631, 806, 855, 869, 876, 877, 715, 3015, 3847, 4059, 4115, 4131, 4139, 4140, 3425, 15563, 19805, 20813, 21056, 21119, 21137, 21146, 21147, 17722, 86144, 109339, 114469
Offset: 1

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Comments

Cyclically successive means 1 is a successor of n.

Examples

			Triangle begins:
    1
    1    2
    1    4    5
    4   10   14   15
   11   36   46   51   52
   41  145  184  196  202  203
  162  631  806  855  869  876  877
  715 3015 3847 4059 4115 4131 4139 4140
Row 4 counts the following partitions:
  {{13}{24}}      {{12}{34}}      {{1}{234}}      {{1234}}
  {{1}{24}{3}}    {{13}{24}}      {{12}{34}}      {{1}{234}}
  {{13}{2}{4}}    {{14}{23}}      {{123}{4}}      {{12}{34}}
  {{1}{2}{3}{4}}  {{1}{2}{34}}    {{124}{3}}      {{123}{4}}
                  {{1}{23}{4}}    {{13}{24}}      {{124}{3}}
                  {{12}{3}{4}}    {{134}{2}}      {{13}{24}}
                  {{1}{24}{3}}    {{14}{23}}      {{134}{2}}
                  {{13}{2}{4}}    {{1}{2}{34}}    {{14}{23}}
                  {{14}{2}{3}}    {{1}{23}{4}}    {{1}{2}{34}}
                  {{1}{2}{3}{4}}  {{12}{3}{4}}    {{1}{23}{4}}
                                  {{1}{24}{3}}    {{12}{3}{4}}
                                  {{13}{2}{4}}    {{1}{24}{3}}
                                  {{14}{2}{3}}    {{13}{2}{4}}
                                  {{1}{2}{3}{4}}  {{14}{2}{3}}
                                                  {{1}{2}{3}{4}}
		

Crossrefs

First column (k = 2) is A000296. Second column (k = 3) is A323949. Rightmost terms are A000110. Second to rightmost terms are A058692.

Programs

  • Mathematica
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Select[Partition[Range[n],k,1,1],Function[ed,UnsameQ@@ed&&Complement[ed,#]=={}]]=={}&],Range[n]]],{n,7},{k,2,n+1}]
Previous Showing 81-90 of 131 results. Next