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

A186021 a(n) = Bell(n)*(2 - 0^n).

Original entry on oeis.org

1, 2, 4, 10, 30, 104, 406, 1754, 8280, 42294, 231950, 1357140, 8427194, 55288874, 381798644, 2765917090, 20960284294, 165729739608, 1364153612318, 11665484410114, 103448316470744, 949739632313502, 9013431476894646, 88304011710168692, 891917738589610578, 9277180664459998706
Offset: 0

Views

Author

Paul Barry, Feb 10 2011

Keywords

Comments

a(n) is the number of collections of subsets of {1,2,...,n-1} that are pairwise disjoint. a(n+1) = 2*Sum_{j=0..n} C(n,j)*Bell(j). For example a(3)=10 because we have: {}, {{}}, {{1}}, {{2}}, {{1,2}}, {{},{1}}, {{},{2}}, {{},{1,2}}, {{1},{2}}, {{},{1},{2}}. - Geoffrey Critzer, Aug 28 2014
a(n) is the number of collections of subsets of [n] that are pairwise disjoint and cover [n], with [0] = {}. For disjoint collections of nonempty subsets see A000110. For arbitrary collections of subsets see A000371. For arbitrary collections of nonempty subsets see A003465. - Manfred Boergens, May 02 2024 and Apr 09 2025

Examples

			a(4) = A060719(3) + 1 = 29 + 1 = 30.
		

Crossrefs

Row sums of A186020 and A256894.
Main diagonal of A271466 (shifted) and A381682.

Programs

  • Magma
    [Bell(n)*(2-0^n): n in [0..50]]; // Vincenzo Librandi, Apr 06 2011
    
  • Maple
    A186021List := proc(m) local A, P, n; A := [1,2]; P := [2];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([P[-1], op(P)]);
    A := [op(A), P[-1]] od; A end: A186021List(26); # Peter Luschny, Mar 24 2022
  • Mathematica
    Prepend[Table[2 Sum[Binomial[n, j] BellB[j], {j, 0, n}], {n, 0, 25}], 1] (* Geoffrey Critzer, Aug 28 2014 *)
    With[{nmax = 50}, CoefficientList[Series[2*Exp[Exp[x] - 1] - 1, {x, 0, nmax}], x]*Range[0, nmax]!] (* G. C. Greubel, Jul 24 2017 *)
  • PARI
    x='x+O('x^50); Vec(serlaplace(2*exp(exp(x) - 1) -1)) \\ G. C. Greubel, Jul 24 2017
  • Python
    from itertools import accumulate
    def A186021_list(size):
        if size < 1: return []
        L, accu = [1], [2]
        for _ in range(size-1):
            accu = list(accumulate([accu[-1]] + accu))
            L.append(accu[0])
        return L
    print(A186021_list(26)) # Peter Luschny, Apr 25 2016
    

Formula

E.g.f.: 2*exp(exp(x)-1)-1. - Paul Barry, Apr 06 2011
a(n) = A000110(n)*A040000(n).
a(n+1) = 1 + Sum_{k=0..n} C(n,k)*a(k). - Franklin T. Adams-Watters, Oct 02 2011
From Sergei N. Gladkovskii, Nov 11 2012 to Mar 29 2013: (Start)
Continued fractions:
G.f.: A(x)= 1 + 2*x/(G(0)-x) where G(k)= 1 - x*(k+1)/(1 - x/G(k+1)).
G.f.: G(0)-1 where G(k) = 1-(x*k+1)/(x*k - 1 - x*(x*k - 1)/(x + (x*k + 1)/G(k+1))).
G.f.: (G(0)-2)/x - 1 where G(k) = 1 + 1/(1 - x/(x + (1 - x*k)/G(k+1))).
G.f.: (S-2)/x - 1 where S = 2*Sum_{k>=0} x^k/Product_{n=0..k-1}(1 - n*x).
G.f.: 1/(1-x) - x/(G(0)-x^2+x) where G(k) =x^2 + x - 1 + k*(2*x-x^2) - x^2*k^2 + x*(x*k - 1)*(x*k + 2*x - 1)^2/G(k+1).
E.g.f.: E(0) - 1 where E(k) = 1 + 1/(1 - 1/(1 + (k+1)/x*Bell(k)/Bell(k+1)/E(k+1))). (End)
a(n) = A060719(n-1) + 1, and the inverse binomial transform of A060719. - Gary W. Adamson, May 20 2013
G.f. A(x) satisfies: A(x) = 1 + (x/(1 - x)) * (1 + A(x/(1 - x))). - Ilya Gutkovskiy, Jun 30 2020

A102661 Triangle of partial sums of Stirling numbers of 2nd kind (A008277): T(n,k) = Sum_{i=1..k} Stirling2(n,i), 1<=k<=n.

Original entry on oeis.org

1, 1, 2, 1, 4, 5, 1, 8, 14, 15, 1, 16, 41, 51, 52, 1, 32, 122, 187, 202, 203, 1, 64, 365, 715, 855, 876, 877, 1, 128, 1094, 2795, 3845, 4111, 4139, 4140, 1, 256, 3281, 11051, 18002, 20648, 21110, 21146, 21147, 1, 512, 9842, 43947, 86472, 109299, 115179, 115929, 115974, 115975
Offset: 1

Views

Author

Vladeta Jovovic, Feb 03 2005

Keywords

Comments

T(n,k) is the number of ways to place n distinguishable balls into k indistinguishable bins. - Geoffrey Critzer, Mar 22 2011
From Mark Wildon, Aug 10 2015: (Start)
T(n,k) is the number of partitions of a set of size n into at most k parts.
T(n,k) is the number of sequences of n top-to-random shuffles of a deck of k cards that leave the deck invariant.
T(n,k) = where pi is the natural permutation character of the symmetric group Sym_k. This gives another combinatorial interpretation of T(n,k) as counting sequences of box moves on Young diagrams. Reference linked to below. (End)
Diagonal entries T(n,n) are the Bell numbers A000110. - Robert Israel, Aug 10 2015
From Manfred Boergens, Mar 18 2025: (Start)
The partitions in the second comment can be described as disjoint collections of subsets of [n] without the empty set with union = [n]. For instance, T(4,2)=8 is the number of partitions of [4] into 1 or 2 parts: 1234, 1 234, 2 134, 3 124, 4 123, 12 34, 13 24, 14 23.
For disjoint collections which may include one empty set see A381682.
For arbitrary collections without the empty set see A369950.
For arbitrary collections which may include one empty set see A381683. (End)

Examples

			Triangle begins:
  1;
  1,  2;
  1,  4,  5;
  1,  8, 14, 15;
  1, 16, 41, 51, 52;
  ...
		

References

  • Richard Stanley, Enumerative Combinatorics, Cambridge Univ. Press, 1997 page 38. (#7 of the twelvefold ways)

Crossrefs

Programs

  • Haskell
    a102661 n k = a102661_tabl !! (n-1) !! (k-1)
    a102661_row n = a102661_tabl !! (n-1)
    a102661_tabl = map (scanl1 (+) . tail) $ tail a048993_tabl
    -- Reinhard Zumkeller, Jun 19 2015
    
  • Maple
    with(combinat): A102661_row := proc(n) local k,j; seq(add(stirling2(n,j),j=1..k),k=1..n) end:
    seq(print(A102661_row(r)),r=1..6); # Peter Luschny, Sep 30 2011
  • Mathematica
    Table[Table[Sum[StirlingS2[n, i], {i, 1, k}], {k, 1, n}], {n, 1,10}] // Grid (* Geoffrey Critzer, Mar 22 2011*)
    Table[Accumulate[StirlingS2[n,Range[n]]],{n,10}]//Flatten (* Harvey P. Dale, Oct 28 2019 *)
  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(sum(i=1, k, stirling(n,i, 2)), ", ");); print(););} \\ Michel Marcus, Aug 10 2015
    
  • Sage
    def T(n,k):
        return sum([stirling_number2(n,j) for j in range(1,k+1)])
    # Danny Rorabaugh, Oct 13 2015

Formula

E.g.f. for row polynomials s(n,y) = Sum_{k=0..n} a(n,k)*y^k is (y*e^(e^(x*y)-1)- e^(y*(e^x-1)))/(y-1) - 1. - Robert Israel, Aug 10 2015

A256894 Triangle read by rows, T(n,k) = Sum_{j=0..n-k+1} C(n-1,j-1)*T(n-j,k-1) if k != 0 else 1, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 8, 13, 7, 1, 1, 16, 40, 35, 11, 1, 1, 32, 121, 155, 80, 16, 1, 1, 64, 364, 651, 490, 161, 22, 1, 1, 128, 1093, 2667, 2751, 1316, 294, 29, 1, 1, 256, 3280, 10795, 14721, 9597, 3108, 498, 37, 1, 1, 512, 9841, 43435, 76630, 65352
Offset: 0

Views

Author

Peter Luschny, Apr 28 2015

Keywords

Comments

Can be understood as a convolution matrix or as a sequence-to-triangle transformation similar to the partial Bell polynomials defined as: S -> T(n, k, S) = Sum_{j=0..n-k+1} C(n-1,j-1)*S(j)*T(n-j,k-1,S) if k != 0 else S(0)^n. Here S(n) = 1 for all n. The case S(n) = n gives the triangle of idempotent numbers A059297.
From Manfred Boergens, Mar 04 2025: (Start)
T(n,k) = number of collections of k+1 disjoint [n]-subsets covering [n], with [0]={}.
For disjoint covers (collections without an empty set) see A008277.
For non-disjoint collections see A163353.
For non-disjoint covers see A055154. (End)

Examples

			Triangle starts:
  1;
  1,  1;
  1,  2,   1;
  1,  4,   4,   1;
  1,  8,  13,   7,   1;
  1, 16,  40,  35,  11,   1;
  1, 32, 121, 155,  80,  16,  1;
  1, 64, 364, 651, 490, 161, 22, 1;
The signed version is the inverse of A326326:
   1;
  -1,   1;
   1,  -2,    1;
  -1,   4,   -4,    1;
   1,  -8,   13,   -7,    1;
  -1,  16,  -40,   35,  -11,   1;
   1, -32,  121, -155,   80, -16,   1;
  -1,  64, -364,  651, -490, 161, -22, 1. - _Peter Luschny_, Jul 02 2019
T(4,3)=7 is the number of disjoint [4]-covering collections of 4 subsets:
 {{1},{2},{3},{4}}
 {{1,2},{3},{4},{}}
 {{1,3},{2},{4},{}}
 {{1,4},{2},{3},{}}
 {{2,3},{1},{4},{}}
 {{2,4},{1},{3},{}}
 {{3,4},{1},{2},{}}. - _Manfred Boergens_, Mar 04 2025
		

Crossrefs

Row sums are A186021.
Partial row sums are A381682.
T(n+1,1) = A000079(n).
T(n+1,n) = A000124(n).

Programs

  • Maple
    # Implemented as a sequence transformation acting on f: n -> 1,1,1,1,... .
    F := proc(n, k, f) option remember; `if`(k=0, f(0)^n,
    add(binomial(n-1,j-1)*f(j)*F(n-j,k-1,f),j=0..n-k+1)) end:
    for n from 0 to 7 do seq(F(n,k,j->1), k=0..n) od;
  • Mathematica
    Table[StirlingS2[n, m+1]+StirlingS2[n, m], {n, 0, 10}, {m, 0, n}]//Flatten (* Manfred Boergens, Mar 04 2025 *)

Formula

From Manfred Boergens, Mar 04 2025: (Start)
T(n,k) = S2(n,k) + S2(n,k+1).
T(n,k) = A008277(n,k) + A008277(n,k+1) for n>=1, k>=1. (End)

A369950 Triangle read by rows: T(n,k) = number of j-covers of [n] with j<=k, k=1..2^n-1.

Original entry on oeis.org

1, 1, 4, 5, 1, 13, 45, 80, 101, 108, 109, 1, 40, 361, 1586, 4505, 9482, 15913, 22348, 27353, 30356, 31721, 32176, 32281, 32296, 32297, 1, 121, 2681, 27671, 182777, 894103, 3491513, 11348063, 31483113, 75820263, 160485753, 301604003
Offset: 1

Views

Author

Manfred Boergens, Feb 12 2024

Keywords

Comments

Partial row sums of A055154.
Also, number of k-covers of [n] allowing for empty subsets.
Amendments by Manfred Boergens, Mar 09 2025: (Start)
For covers which may include one empty set see A381683.
For disjoint covers see A102661.
For disjoint covers which may include one empty set see A381682. (End)

Examples

			Triangle (with rows n >= 1 and columns k >= 1) begins as follows:
 1;
 1, 4, 5;
 1, 13, 45, 80, 101, 108, 109;
 1, 40, 361, 1586, 4505, 9482, 15913, 22348, 27353, 30356, 31721, 32176, 32281, 32296, 32297;
 ...
There are T(3,2) = 13 covers of [3] consisting of up to 2 subsets (brackets and commas omitted):
 123
 123 1
 123 2
 123 3
 123 12
 123 13
 123 23
 12 13
 12 23
 13 23
 12 3
 13 2
 23 1
		

Crossrefs

Cf. A055154, A003465 (diagonal), A102661, A381682, A381683.

Programs

  • Mathematica
    Flatten[Table[Sum[Sum[StirlingS1[i+1, j+1] (2^j-1)^n, {j, 0, i}]/i!, {i, k}], {n, 6}, {k, 2^n-1}]]
  • Python
    from math import comb
    def A369950(n,k): return sum((-1)**j*comb(n, j)*comb(2**(n-j)-1, i) for j in range(n+1) for i in range(1,k+1)) # John Tyler Rascoe, Mar 06 2025

Formula

T(n,k) = Sum_{i=1..k} (1/i!)*Sum_{j=0..i} Stirling1(i+1, j+1)*(2^j-1)^n.
T(n,k) = Sum_{i=1..k} Sum_{j=0..n} (-1)^j*C(n, j)*C(2^(n-j)-1, i).
T(n,2^n-1) = A003465(n).

A381683 Triangle read by rows: T(n,k) = number of collections of up to k subsets of [n] covering [n], with [0]={}; n>=0, k=0..2^n.

Original entry on oeis.org

1, 2, 0, 1, 2, 0, 1, 5, 9, 10, 0, 1, 14, 58, 125, 181, 209, 217, 218, 0, 1, 41, 401, 1947, 6091, 13987, 25395, 38261, 49701, 57709, 62077, 63897, 64457, 64577, 64593, 64594, 0, 1, 122, 2802, 30352, 210448, 1076880, 4385616, 14839576, 42831176, 107303376, 236306016, 462089756, 809460556, 1280895556, 1846618196, 2447698581
Offset: 0

Views

Author

Manfred Boergens, Mar 04 2025

Keywords

Comments

Partial row sums of A163353.
For covers (collections without an empty set) see A369950.
For disjoint collections see A381682.
For disjoint covers see A102661.

Examples

			Triangle begins:
  1 2
  0 1  2
  0 1  5   9   10
  0 1 14  58  125  181   209   217   218
  0 1 41 401 1947 6091 13987 25395 38261 49701 57709 62077 63897 64457 64577 64593 64594
  ...
T(3,2)=14 is the number of covering collections of 1 or 2 subsets of [3]:
  {{1,2,3}}
  {{},{1,2,3}}
  {{1},{2,3}}
  {{1},{1,2,3}}
  {{2},{1,3}}
  {{2},{1,2,3}}
  {{3},{1,2}}
  {{3},{1,2,3}}
  {{1,2},{1,3}}
  {{1,2},{2,3}}
  {{1,3},{2,3}}
  {{1,2},{1,2,3}}
  {{1,3},{1,2,3}}
  {{2,3},{1,2,3}}.
		

Crossrefs

Cf. A000371 (diagonal).

Programs

  • Mathematica
    Table[Sum[Sum[(-1)^(n-i)*Binomial[n, i]*Binomial[2^i, j], {i, 0, n}], {j, 0, k}], {n, 0, 4}, {k, 0, 2^n}]//Flatten
  • PARI
    T(n,k) = sum(j=0,k, sum(i=0,n, (-1)^(n-i)*binomial(n,i)*binomial(2^i,j)));
    for(n=0,5,for(k=0,2^n,print1(T(n,k),", "))); \\ Joerg Arndt, Mar 04 2025

Formula

T(n,k) = Sum_{j=0..k} Sum_{i=0..n} (-1)^(n-i)*binomial(n,i)*binomial(2^i,j).
Showing 1-5 of 5 results.