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

A138378 Number of embedded coalitions in an n-person game.

Original entry on oeis.org

1, 3, 10, 37, 151, 674, 3263, 17007, 94828, 562595, 3535027, 23430840, 163254885, 1192059223, 9097183602, 72384727657, 599211936355, 5150665398898, 45891416030315, 423145657921379, 4031845922290572, 39645290116637023, 401806863439720943, 4192631462935194064
Offset: 1

Views

Author

David Yeung (wkyeung(AT)hkbu.edu.hk), May 08 2008

Keywords

Comments

Same as A005493, apart from offset. - R. J. Mathar, Sep 23 2011
The strategic behavior of players depends crucially on the coalition structures of a game.

Examples

			a(1) = combination(1,0) = 1,
a(2) = combination(2,1) + combination(2,0)= 3,
a(3) = combination(3,2)* a(1) + combination(3,2) + combination(3,1) + combination(3,0)= 10,
a(4) = combination(4,3)* {a(1) + a(2)} + combination(4,2)* a(1) + combination7(4,3)combination(4,2) + combination(4,1) + combination(4,0)= 37,
a(5) = combination(5,4)* {a(1) + a(2) + a(3)} combination(5,3)* {a(1) + a(2)} + combination(5,2)* a(1) + combination(5,4) + combination(5,3) + combination(5,2) + combination(5,1) + combination(5,0)= 151.
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Springer-Verlag, New York, 1995.

Crossrefs

Column k=1 of A283424.

Programs

  • Magma
    [&+[k*StirlingSecond(n, k): k in [1..n]]: n in [1..25]]; // Vincenzo Librandi, May 18 2019
  • Maple
    b:= proc(n, m) option remember;
         `if`(n=0, m, m*b(n-1, m)+b(n-1, m+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=1..24);  # Alois P. Heinz, Dec 10 2024
  • Mathematica
    a[n_] := Sum[Binomial[n, j] BellB[j], {j, 0, n-1}];
    Array[a, 24] (* Jean-François Alcover, Aug 19 2018 *)

Formula

a(1) = combination(1,0) = 1, a(2) = combination(2,1) + combination(2,0)= 3, a(n) = {SUM(i=2 to n-1) combination(n,i)} * {SUM(j=1 to i-1) a(n)} + SUM(i=0 to n-1) combination(n,i), for n > 2.
G.f.: 1/U(0) where U(k)= 1 - x*(k+3) - x^2*(k+1)/U(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 11 2012
G.f.: 1/(U(0)-x) where U(k)= 1 - x - x*(k+1)/(1 - x/U(k+1)); (continued fraction). - Sergei N. Gladkovskii, Oct 12 2012
G.f.: -G(0)/x^2 where G(k) = 1 - 1/(1-k*x)/(1-x/(x-1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Feb 08 2013
G.f.: Q(0)/x^2 -1/x^2, where Q(k) = 1 - x^2*(k+1)/( x^2*(k+1) - (1-x*(k+1))*(1-x*(k+2))/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 10 2013
a(n) = Bell(n+1)-Bell(n) = Sum_{k=1..n} k*Stirling2(n,k). - Alois P. Heinz, May 11 2017
E.g.f.: (exp(x) - 1) * exp(exp(x) - 1). - Ilya Gutkovskiy, Jan 26 2020

A285595 Sum T(n,k) of the k-th entries in all blocks of all set partitions of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 4, 2, 17, 10, 3, 76, 52, 18, 4, 362, 274, 111, 28, 5, 1842, 1500, 675, 200, 40, 6, 9991, 8614, 4185, 1380, 325, 54, 7, 57568, 51992, 26832, 9568, 2510, 492, 70, 8, 351125, 329650, 178755, 67820, 19255, 4206, 707, 88, 9, 2259302, 2192434, 1239351, 494828, 149605, 35382, 6629, 976, 108, 10
Offset: 1

Views

Author

Alois P. Heinz, Apr 22 2017

Keywords

Comments

T(n,k) is also k times the number of blocks of size >k in all set partitions of [n+1]. T(3,2) = 10 = 2 * 5 because there are 5 blocks of size >2 in all set partitions of [4], namely in 1234, 123|4, 124|3, 134|2, 1|234.

Examples

			T(3,2) = 10 because the sum of the second entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 2+2+3+3+0  = 10.
Triangle T(n,k) begins:
      1;
      4,     2;
     17,    10,     3;
     76,    52,    18,    4;
    362,   274,   111,   28,    5;
   1842,  1500,   675,  200,   40,   6;
   9991,  8614,  4185, 1380,  325,  54,  7;
  57568, 51992, 26832, 9568, 2510, 492, 70, 8;
  ...
		

Crossrefs

Column k=1 gives A124325(n+1).
Row sums give A000110(n) * A000217(n) = A105488(n+3).
Main diagonal and first lower diagonal give: A000027, A028552.

Programs

  • Maple
    T:= proc(h) option remember; local b; b:=
          proc(n, l) option remember; `if`(n=0, [1, 0],
            (p-> p+[0, (h-n+1)*p[1]*x^1])(b(n-1, [l[], 1]))+
             add((p-> p+[0, (h-n+1)*p[1]*x^(l[j]+1)])(b(n-1,
             sort(subsop(j=l[j]+1, l), `>`))), j=1..nops(l)))
          end: (p-> seq(coeff(p, x, i), i=1..n))(b(h, [])[2])
        end:
    seq(T(n), n=1..12);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0],
          add((p-> p+[0, p[1]*add(x^k, k=1..j-1)])(
             b(n-j)*binomial(n-1, j-1)), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)*i, i=1..n))(b(n+1)[2]):
    seq(T(n), n=1..12);
  • Mathematica
    b[n_] := b[n] = If[n == 0, {1, 0}, Sum[# + {0, #[[1]]*Sum[x^k, {k, 1, j-1} ]}&[b[n - j]*Binomial[n - 1, j - 1]], {j, 1, n}]];
    T[n_] := Table[Coefficient[#, x, i]*i, {i, 1, n}] &[b[n + 1][[2]]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, May 23 2018, translated from 2nd Maple program *)

Formula

T(n,k) = k * Sum_{j=k+1..n+1} binomial(n+1,j)*A000110(n+1-j).
T(n,k) = k * Sum_{j=k+1..n+1} A175757(n+1,j).
Sum_{k=1..n} T(n,k)/k = A278677(n-1).

A124325 Number of blocks of size >1 in all partitions of an n-set.

Original entry on oeis.org

0, 0, 1, 4, 17, 76, 362, 1842, 9991, 57568, 351125, 2259302, 15288000, 108478124, 805037105, 6233693772, 50257390937, 421049519856, 3659097742426, 32931956713294, 306490813820239, 2945638599347760, 29198154161188501
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Sum of the first entries in all blocks of all set partitions of [n-1]. a(4) = 17 because the sum of the first entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 1+4+3+3+6 = 17. - Alois P. Heinz, Apr 24 2017

Examples

			a(3) = 4 because in the partitions 123, 12|3, 13|2, 1|23, 1|2|3 we have four blocks of size >1.
		

Crossrefs

Column k=2 of A283424.

Programs

  • Maple
    with(combinat): c:=n->bell(n+1)-bell(n)-n*bell(n-1): seq(c(n),n=0..23);
  • Mathematica
    nn=22;Range[0,nn]!CoefficientList[Series[(Exp[x]-1-x)Exp[Exp[x]-1],{x,0,nn}],x]  (* Geoffrey Critzer, Mar 28 2013 *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    egf = (exp(x)-1-x)*exp(exp(x)-1) + 'c0;
    gf = serlaplace(egf);
    v = Vec(gf);  v[1]-='c0;  v
    /* Joerg Arndt, Mar 29 2013 */

Formula

a(n) = B(n+1)-B(n)-n*B(n-1), where B(q) are the Bell numbers (A000110).
E.g.f.: (exp(z)-1-z)*exp(exp(z)-1).
a(n) = Sum_{k=0..floor(n/2)} k*A124324(n,k).
a(n) = A285595(n-1,1). - Alois P. Heinz, Apr 24 2017
a(n) = Sum_{k=1..n*(n-1)/2} k * A124327(n-1,k) for n>1. - Alois P. Heinz, Dec 05 2023

A224271 Number of set partitions of {1,2,...,n} such that the element 1 is in an odd-sized block.

Original entry on oeis.org

1, 1, 3, 8, 28, 107, 459, 2151, 10931, 59700, 348146, 2155925, 14112377, 97266301, 703484851, 5323515156, 42040470092, 345670438963, 2953171501547, 26166317121747, 240047041176843, 2276607815242880, 22290187889601330, 225018607554567149, 2339331996135377345
Offset: 1

Views

Author

Geoffrey Critzer, Apr 02 2013

Keywords

Examples

			a(4) = 8 because we have: {{1},{2,3,4}}, {{1,3,4},{2}}, {{1,2,3},{4}}, {{1,2,4},{3}}, {{1},{2},{3,4}}, {{1},{2,3},{4}}, {{1},{2,4},{3}}, {{1},{2},{3},{4}}.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(multinomial(n, n-i*j, i$j)/j!*
          b(n-i*j, i-1)*`if`(irem(i, 2)=0, x^j, 1), j=0..n/i))))
        end:
    a:= n-> (p-> add(coeff(p, x, i)*(i+1), i=0..degree(p)))(b(n-1$2)):
    seq(a(n), n=1..15);  # Alois P. Heinz, Mar 08 2015
    # second Maple program:
    b:= proc(n, t, m) option remember; `if`(n=0, t, (m-1)*
          b(n-1, t, m)+b(n-1, 1-t, m)+b(n-1, t, m+1))
        end:
    a:= n-> b(n-1, 1$2):
    seq(a(n), n=1..25);  # Alois P. Heinz, May 17 2023
  • Mathematica
    nn=25;Drop[Range[0,nn]!CoefficientList[Series[Integrate[Exp[Cosh[x]-1]D[ Exp[Sinh[x]],x],x],{x,0,nn}],x],1]

Formula

E.g.f. A(x) satisfies: A'(x) = B'(x)*C(x) where B(x) is the e.g.f. for A003724 and C(x) is the e.g.f. for A005046.
a(n) = Sum_{k=0..floor((n-1)/2)} (k+1)*A124322(n-1,k). - Alois P. Heinz, Apr 02 2013
a(n) = Sum_{k=0..floor((n-1)/2)} binomial(n-1,2*k) * Bell(n-2*k-1). - Ilya Gutkovskiy, Apr 10 2022
From Alois P. Heinz, May 17 2023: (Start)
a(n) = Sum_{k=0..n-1} (-1)^k * A283424(n-1,k).
a(n) mod 2 = A131719(n+1). (End)

A288785 Number of blocks of size >= three in all set partitions of n.

Original entry on oeis.org

1, 5, 26, 137, 750, 4307, 25996, 164825, 1096217, 7633650, 55549664, 421599778, 3331027887, 27349472297, 232967157736, 2055635993935, 18762063976810, 176896220650029, 1720762736285790, 17249873608817569, 178010337967774511, 1889129778601708612
Offset: 3

Views

Author

Alois P. Heinz, Jun 15 2017

Keywords

Examples

			a(4) = 5: 1234, 123|4, 124|3, 134|2, 1|234.
a(5) = 26: 12345, 1234|5, 1235|4, 123|45, 123|4|5, 1245|3, 124|35, 124|3|5, 125|34, 12|345, 125|3|4, 1345|2, 134|25, 134|2|5, 135|24, 13|245, 135|2|4, 145|23, 14|235, 15|234, 1|2345, 1|234|5, 1|235|4, 145|2|3, 1|245|3, 1|2|345.
a(6) = 137: 123456, 12345|6, 12346|5, ..., 123|456, 124|356, 125|346, 126|345, 134|256, 135|246, 136|245, 145|236, 146|235, 156|234, ..., 1|256|3|4, 1|2|356|4, 1|2|3|456.
		

Crossrefs

Column k=3 of A283424.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    g:= proc(n, k) option remember; `if`(n g(n, 3):
    seq(a(n), n=3..30);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0], add((p-> p+[0,
         `if`(j>2, p[1], 0)])(b(n-j)*binomial(n-1, j-1)), j=1..n))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=3..30);  # Alois P. Heinz, Jan 06 2022
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n-j]*Binomial[n-1, j-1], {j, 1, n}]];
    g[n_, k_] := g[n, k] = If[n < k, 0, g[n, k+1] + Binomial[n, k]*b[n - k]];
    a[n_] := g[n, 3];
    Table[a[n], {n, 3, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

Formula

a(n) = Bell(n+1) - Sum_{j=0..2} binomial(n,j) * Bell(n-j).
a(n) = Sum_{j=0..n-3} binomial(n,j) * Bell(j).
a(n) = Sum_{k=1..n} k * A355144(n,k). - Alois P. Heinz, Jun 20 2022
E.g.f.: (exp(x) - 1 - x - x^2/2) * exp(exp(x) - 1). - Ilya Gutkovskiy, Jun 24 2022

A286896 Number of blocks of size >= n in all set partitions of [2n].

Original entry on oeis.org

1, 3, 17, 137, 1395, 16955, 237426, 3740609, 65197797, 1241499241, 25577181324, 565688751435, 13346516581331, 334144326030052, 8837737924901855, 245998212661731213, 7182425756528424275, 219332432679783740235, 6987451758608249737342, 231704015156531645221237
Offset: 0

Views

Author

Alois P. Heinz, May 15 2017

Keywords

Examples

			a(2) = 17: 1234, 123|4, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 14|23, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34. Here three set partitions contain 2 blocks of size 2.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k>n, 0,
          binomial(n, k)*combinat[bell](n-k)+b(n, k+1))
        end:
    a:= n-> b(2*n, n):
    seq(a(n), n=0..25);
  • Mathematica
    a[n_] := Sum[Binomial[2 n, j] BellB[j], {j, 0, n}];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 28 2018 *)

Formula

a(n) = Sum_{j=0..n} binomial(2n,j) * Bell(j).
a(n) = A283424(2n,n).
a(n) ~ 2^(2*n) * exp(n/LambertW(n) - n - 1) * n^(n - 1/2) / (sqrt(Pi*(1 + LambertW(n))) * LambertW(n)^n). - Vaclav Kotesovec, Jul 23 2021

A288786 Number of blocks of size >= four in all set partitions of n.

Original entry on oeis.org

1, 6, 37, 225, 1395, 8944, 59585, 413117, 2981310, 22380814, 174600298, 1413841252, 11868587577, 103155618776, 927141821215, 8606806236367, 82430269073469, 813600584094320, 8267450613029789, 86406853732930699, 927993270700444588, 10232636504064477996
Offset: 4

Views

Author

Alois P. Heinz, Jun 15 2017

Keywords

Crossrefs

Column k=4 of A283424.
Cf. A000110.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    g:= proc(n, k) option remember; `if`(n g(n, 4):
    seq(a(n), n=4..30);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0], add((p-> p+[0,
         `if`(j>3, p[1], 0)])(b(n-j)*binomial(n-1, j-1)), j=1..n))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=4..30);  # Alois P. Heinz, Jan 06 2022
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n - j]*Binomial[n-1, j-1], {j, 1, n}]];
    g[n_, k_] := g[n, k] = If[n < k, 0, g[n, k+1] + Binomial[n, k]*b[n - k]];
    a[n_] := g[n, 4];
    Table[a[n], {n, 4, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

Formula

a(n) = Bell(n+1) - Sum_{j=0..3} binomial(n,j) * Bell(n-j).
a(n) = Sum_{j=0..n-4} binomial(n,j) * Bell(j).
E.g.f.: (exp(x) - Sum_{k=0..3} x^k/k!) * exp(exp(x) - 1). - Ilya Gutkovskiy, Jun 25 2022

A288787 Number of blocks of size >= five in all set partitions of n.

Original entry on oeis.org

1, 7, 50, 345, 2392, 16955, 123707, 932010, 7260709, 58509323, 487593202, 4199841037, 37361858716, 342989895895, 3246458915947, 31653980371254, 317654338317380, 3278058775976704, 34757921507150964, 378372365291381716, 4225533329681577846, 48375204740642752562
Offset: 5

Views

Author

Alois P. Heinz, Jun 15 2017

Keywords

Crossrefs

Column k=5 of A283424.
Cf. A000110.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    g:= proc(n, k) option remember; `if`(n g(n, 5):
    seq(a(n), n=5..30);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n - j]*Binomial[n-1, j-1], {j, 1, n}]];
    g[n_, k_] := g[n, k] = If[n < k, 0, g[n, k + 1] + Binomial[n, k]*b[n - k]];
    a[n_] := g[n, 5];
    Table[a[n], {n, 5, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

Formula

a(n) = Bell(n+1) - Sum_{j=0..4} binomial(n,j) * Bell(n-j).
a(n) = Sum_{j=0..n-5} binomial(n,j) * Bell(j).
E.g.f.: (exp(x) - Sum_{k=0..4} x^k/k!) * exp(exp(x) - 1). - Ilya Gutkovskiy, Jun 26 2022

A288788 Number of blocks of size >= 6 in all set partitions of n.

Original entry on oeis.org

1, 8, 65, 502, 3851, 29921, 237426, 1932529, 16173029, 139320277, 1235847277, 11288120480, 106132359679, 1026681599731, 10212591089574, 104393925768077, 1095895294558168, 11806719056706773, 130457490607638988, 1477428802636263486, 17138268233851671782
Offset: 6

Views

Author

Alois P. Heinz, Jun 15 2017

Keywords

Crossrefs

Column k=6 of A283424.
Cf. A000110.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    g:= proc(n, k) option remember; `if`(n g(n, 6):
    seq(a(n), n=6..30);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n - j]*Binomial[n-1, j-1], {j, 1, n}]];
    g[n_, k_] := g[n, k] = If[n < k, 0, g[n, k + 1] + Binomial[n, k]*b[n - k]];
    a[n_] := g[n, 6];
    Table[a[n], {n, 6, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

Formula

a(n) = Bell(n+1) - Sum_{j=0..5} binomial(n,j) * Bell(n-j).
a(n) = Sum_{j=0..n-6} binomial(n,j) * Bell(j).
E.g.f.: (exp(x) - Sum_{k=0..5} x^k/k!) * exp(exp(x) - 1). - Ilya Gutkovskiy, Jun 26 2022

A288789 Number of blocks of size >= 7 in all set partitions of n.

Original entry on oeis.org

1, 9, 82, 701, 5897, 49854, 427597, 3740609, 33479542, 307119477, 2890138160, 27911144971, 276632735047, 2813333368854, 29349063282197, 313940448544057, 3441759044602385, 38652680805862224, 444450158120668786, 5229815283321976222, 62942722623990478840
Offset: 7

Views

Author

Alois P. Heinz, Jun 15 2017

Keywords

Crossrefs

Column k=7 of A283424.
Cf. A000110.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    g:= proc(n, k) option remember; `if`(n g(n, 7):
    seq(a(n), n=7..30);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0], add((p-> p+
          `if`(j>6, [0, p[1]], 0))(b(n-j)*binomial(n-1, j-1)), j=1..n))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=7..30);  # Alois P. Heinz, Jun 26 2022
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n - j]*Binomial[n-1, j-1], {j, 1, n}]];
    g[n_, k_] := g[n, k] = If[n < k, 0, g[n, k + 1] + Binomial[n, k]*b[n - k]];
    a[n_] := g[n, 7];
    Table[a[n], {n, 7, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

Formula

a(n) = Bell(n+1) - Sum_{j=0..6} binomial(n,j) * Bell(n-j).
a(n) = Sum_{j=0..n-7} binomial(n,j) * Bell(j).
E.g.f.: (exp(x) - Sum_{k=0..6} x^k/k!) * exp(exp(x) - 1). - Ilya Gutkovskiy, Jun 26 2022
Showing 1-10 of 13 results. Next