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

A180338 Triangle by rows, A033452 convolved with A000079.

Original entry on oeis.org

1, 2, 5, 4, 10, 22, 8, 20, 44, 99, 16, 40, 88, 198, 471, 32, 80, 176, 396, 942, 2386, 64, 160, 352, 792, 1884, 4772, 12867, 128, 324, 704, 1584, 3768, 9544, 25734, 73681
Offset: 0

Views

Author

Gary W. Adamson, Aug 28 2010

Keywords

Comments

Row sums = A058681: (1, 7, 36, 171, 813, 4012, 20891,...).

Examples

			First few rows of the triangle =
1;
2, 5;
4, 10, 22;
8, 20, 44, 99;
16, 40, 88, 198, 471;
32, 80, 176, 396, 942, 2386;
64, 160, 352, 792, 1884, 4772, 12867;
128, 324, 704, 1584, 3768, 9544, 25734, 73681;
...
		

Crossrefs

Formula

Antidiagonals of a multiplication table generated from A033452 * powers of 2.

A123158 Square array related to Bell numbers read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 5, 5, 3, 1, 15, 15, 10, 5, 1, 52, 52, 37, 22, 6, 1, 203, 203, 151, 99, 31, 9, 1, 877, 877, 674, 471, 160, 61, 10, 1, 4140, 4140, 3263, 2386, 856, 385, 75, 14, 1, 21147, 21147, 17007, 12867, 4802, 2416, 520, 135, 15, 1
Offset: 0

Views

Author

Philippe Deléham, Oct 01 2006

Keywords

Examples

			Square array, A(n, k), begins:
   1,   1,   1,    1,    1, ... (Row n=0: A000012);
   1,   2,   3,    5,    6, ... (Row n=1: A117142);
   2,   5,  10,   22,   31, ...;
   5,  15,  37,   99,  160, ...;
  15,  52, 151,  471,  856, ...;
  52, 203, 674, 2386, 4802, ...;
Antidiagonals, T(n, k), begin as:
    1;
    1,   1;
    2,   2,   1;
    5,   5,   3,   1;
   15,  15,  10,   5,   1;
   52,  52,  37,  22,   6,  1;
  203, 203, 151,  99,  31,  9,   1;
  877, 877, 674, 471, 160, 61,  10,  1;
		

Crossrefs

Columns include: A000110 (Bell numbers), A003128, A005493, A033452.
Rows include: A000012, A117142.

Programs

  • Magma
    function A(n,k)
      if k lt 0 or n lt 0 then return 0;
      elif n eq 0 then return 1;
      elif (k mod 2) eq 1 then return A(n,k-1) + (1/2)*(k+1)*A(n-1,k+1);
      else return A(n,k-1) + A(n-1,k+1);
      end if;
    end function;
    T:= func< n,k | A(n-k,k) >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 18 2023
    
  • Mathematica
    A[0, _?NonNegative] = 1;
    A[n_, k_]:= A[n, k]= If[n<0 || k<0, 0, If[OddQ[k], A[n, k-1] + (1/2)(k+1) A[n-1, k+1], A[n, k-1] + A[n-1, k+1]]];
    Table[A[n-k, k], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, Feb 21 2020 *)
  • SageMath
    @CachedFunction
    def A(n,k):
        if (k<0 or n<0): return 0
        elif (n==0): return 1
        elif (k%2==1): return A(n,k-1) +(1/2)*(k+1)*A(n-1,k+1)
        else: return A(n,k-1) +A(n-1,k+1)
    def T(n,k): return A(n-k,k)
    flatten([[T(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Jul 18 2023

Formula

A(n, k) = 0 if n < 0, A(0, k) = 1 for k >= 0, A(n, k) = A(n, k-1) + (1/2)*(k+1)*A(n-1, k+1) if k is an odd number, A(n, k) = A(n, k-1) + A(n-1, k+1) if k is an even number (array).
A(n, 0) = A000110(n).
A(n, 1) = A000110(n+1).
A(n, 2) = A005493(n).
A(n, 3) = A033452(n).
A(n, 4) = A003128(n+2).
T(n, k) = A(n-k, k) (antidiagonals).

A126350 Triangle read by rows: matrix product of the binomial coefficients with the Stirling numbers of the second kind.

Original entry on oeis.org

1, 1, 2, 1, 5, 5, 1, 9, 22, 15, 1, 14, 61, 99, 52, 1, 20, 135, 385, 471, 203, 1, 27, 260, 1140, 2416, 2386, 877, 1, 35, 455, 2835, 9156, 15470, 12867, 4140, 1, 44, 742, 6230, 28441, 72590, 102215, 73681, 21147
Offset: 1

Views

Author

Thomas Wieder, Dec 29 2006

Keywords

Comments

Many well-known integer sequences arise from such a matrix product of combinatorial coefficients. In the present case we have as the first row (not surprisingly) A000110 = Bell or exponential numbers: ways of placing n labeled balls into n indistinguishable boxes . As second row we have A033452 = "STIRLING" transform of squares A000290. As the column sums we have 1, 3, 11, 47, 227, 1215, 7107, 44959, 305091 which is A035009 = STIRLING transform of [1,1,2,4,8,16,32, ...].

Examples

			Matrix begins:
1 2 5 15 52 203  877  4140  21147
0 1 5 22 99 471 2386 12867  73681
0 0 1  9 61 385 2416 15470 102215
0 0 0  1 14 135 1140  9156  72590
0 0 0  0 1   20  260  2835  28441
0 0 0  0 0    1   27   455   6230
0 0 0  0 0    0    1    35    742
0 0 0  0 0    0    0     1     44
0 0 0  0 0    0    0     0      1
		

Crossrefs

Programs

  • Maple
    T:= (n, k)-> add(Stirling2(n, j)*binomial(j-1, n-k), j=n-k+1..n):
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Sep 03 2019
  • Mathematica
    T[dim_] := T[dim] = Module[{M}, M[n_, n_] = 1; M[, ] = 0; Do[M[n, k] = M[n-1, k-1] + (k+2) M[n-1, k] + (k+1) M[n-1, k+1], {n, 0, dim-1}, {k, 0, n-1}]; Array[M, {dim, dim}, {0, 0}]];
    dim = 9;
    Table[T[dim][[n]][[1 ;; n]] // Reverse, {n, 1, dim}] (* Jean-François Alcover, Jun 27 2019, from Sage *)
  • Sage
    def A126350_triangle(dim): # rows in reversed order
        M = matrix(ZZ,dim,dim)
        for n in (0..dim-1): M[n,n] = 1
        for n in (1..dim-1):
            for k in (0..n-1):
                M[n,k] = M[n-1,k-1]+(k+2)*M[n-1,k]+(k+1)*M[n-1,k+1]
        return M
    A126350_triangle(9) # Peter Luschny, Sep 19 2012

Formula

(In Maple notation:) Matrix product A.B of matrix A[i,j]:=binomial(j-1,i-1) with i = 1 to p+1, j = 1 to p+1, p=8 and of matrix B[i,j]:=stirling2(j,i) with i from 1 to d, j from 1 to d, d=9.

A108458 Triangle read by rows: T(n,k) is the number of set partitions of {1,2,...,n} in which the last block is the singleton {k}, 1<=k<=n; the blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 3, 5, 0, 1, 5, 10, 15, 0, 1, 9, 22, 37, 52, 0, 1, 17, 52, 99, 151, 203, 0, 1, 33, 130, 283, 471, 674, 877, 0, 1, 65, 340, 855, 1561, 2386, 3263, 4140, 0, 1, 129, 922, 2707, 5451, 8930, 12867, 17007, 21147, 0, 1, 257, 2572, 8919, 19921, 35098, 53411, 73681, 94828, 115975
Offset: 1

Views

Author

Christian G. Bower, Jun 03 2005; Emeric Deutsch, Nov 14 2006

Keywords

Comments

Another way to obtain this sequence (with offset 0): Form the infinite array U(n,k) = number of labeled partitions of (n,k) into pairs (i,j), for n >= 0, k >= 0 and read it by antidiagonals. In other words, U(n,k) = number of partitions of n black objects labeled 1..n and k white objects labeled 1..k. Each block must have at least one white object.
Then T(n,k)=U(n+k,k+1). Thus the two versions are related like "multichoose" to "choose". - Augustine O. Munagi, Jul 16 2007

Examples

			Triangle T(n,k) starts:
  1;
  0,1;
  0,1,2;
  0,1,3,5;
  0,1,5,10,15;
T(5,3)=5 because we have 1245|3, 145|2|3, 14|25|3, 15|24|3 and 1|245|3.
The arrays U(n,k) starts:
   1  0  0   0   0 ...
   1  1  1   1   1 ...
   2  3  5   9  17 ...
   5 10 22  52 130 ...
  15 37 99 283 855 ...
		

Crossrefs

Row sums of T(n, k) yield A124496(n, 1).
Cf. A108461.
Columns of U(n, k): A000110, A005493, A033452.
Rows of U(n, k): A000007, A000012, A000051.
Main diagonal: A108459.

Programs

  • Mathematica
    T[n_, k_] := Sum[If[n == k, 1, i^(n-k)]*StirlingS2[k, i], {i, 0, k}];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 10 2024, after Vladeta Jovovic *)

Formula

T(n,1)=0 for n>=2; T(n,2)=1 for n>=2; T(n,3)=1+2^(n-3) for n>=3; T(n,n)=B(n-1), T(n,n-1)=B(n-1)-B(n-2), where B(q) are the Bell numbers (A000110).
Double e.g.f.: exp(exp(x)*(exp(y)-1)).
U(n,k) = Sum_{i=0..k} i^(n-k)*Stirling2(k,i). - Vladeta Jovovic, Jul 12 2007

Extensions

Edited by N. J. A. Sloane, May 22 2008, at the suggestion of Vladeta Jovovic. This entry is a composite of two entries submitted independently by Christian G. Bower and Emeric Deutsch, with additional comments from Augustine O. Munagi.

A078468 Distinct compositions of the complete graph with one edge removed (K^-_n).

Original entry on oeis.org

1, 4, 13, 47, 188, 825, 3937, 20270, 111835, 657423, 4097622, 26965867, 186685725, 1355314108, 10289242825, 81481911259, 671596664012, 5749877335253, 51042081429213, 469037073951694, 4454991580211951, 43677136038927595, 441452153556357966, 4594438326374915007
Offset: 0

Views

Author

Ralf Stephan, Jan 02 2003

Keywords

Examples

			a(5) = A000110(7)-A000110(5) = 825.
		

Crossrefs

Programs

  • Maple
    with(combinat): a:=n->bell(n+2)-bell(n): seq(a(n), n=0..21); # Zerinvary Lajos, Jul 01 2007

Formula

a(n) = A000110(n+2) - A000110(n).
E.g.f.: (-1+exp(x)+exp(2*x))*exp(exp(x)-1).
G.f.: (G(0)*(1-x)-1-x)/x^2 where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k-1) - x*(2*k+1)*(2*k+3)*(2*x*k-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k+x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 03 2013
G.f.: - G(0)*(1+1/x) where G(k) = 1 - 1/(1-x*(k+1))/(1-x/(x-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 07 2013
G.f.: (Q(0) -1)*(1+x)/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) = Sum_{k=0..n} Stirling2(n,k) * (k+1)^2. - Ilya Gutkovskiy, Aug 09 2021

A282179 E.g.f.: exp(exp(x) - 1)*(exp(3*x) - 2*exp(x) + 1).

Original entry on oeis.org

0, 1, 9, 52, 283, 1561, 8930, 53411, 334785, 2199034, 15119621, 108644581, 814474176, 6358910949, 51615342685, 434865155292, 3796991928727, 34308796490005, 320379418256794, 3087939032182127, 30683582797977749, 313977721545709002, 3305220440084030809, 35759627532783842561
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 08 2017

Keywords

Comments

Stirling transform of the cubes (A000578).
Exponential convolution of the sequences A000110 and A058481 (with a(0) = 0).

Examples

			E.g.f.: A(x) = x/1! + 9*x^2/2! + 52*x^3/3! + 283*x^4/4! + 1561*x^5/5! + 8930*x^6/6! + ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0,
           m^3, m*b(n-1, m)+b(n-1, m+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..27);  # Alois P. Heinz, Jul 15 2022
  • Mathematica
    Range[0, 23]! CoefficientList[Series[Exp[Exp[x] - 1] (Exp[3 x] - 2 Exp[x] + 1), {x, 0, 23}], x]
    Table[Sum[StirlingS2[n, k] k^3, {k, 0, n}], {n, 0, 23}]
    Table[Sum[Binomial[n, k] BellB[n-k] (3^k - 2), {k, 1, n}], {n, 0, 23}]
    Table[BellB[n+3] - 3*BellB[n+2] + BellB[n], {n, 0, 23}] (* Vaclav Kotesovec, Aug 06 2021 *)

Formula

a(n) = Sum_{k=0..n} Stirling2(n,k)*A000578(k).
a(n) = A000110(n) + A005494(n) - A186021(n+1).

A344054 a(n) = Sum_{k = 0..n} E1(n, k)*k^2, where E1 are the Eulerian numbers A173018.

Original entry on oeis.org

0, 0, 1, 8, 64, 540, 4920, 48720, 524160, 6108480, 76809600, 1037836800, 15008716800, 231437606400, 3792255667200, 65819609856000, 1206547550208000, 23297526540288000, 472708591939584000, 10055994967130112000, 223826984752250880000, 5202760944485744640000, 126075414965721661440000, 3179798058882852126720000, 83346901966165164687360000, 2267221868000212451328000000
Offset: 0

Views

Author

Peter Luschny, May 11 2021

Keywords

Comments

The Eulerian transform of the squares.

Crossrefs

Transforms of the squares: A151881 (StirlingCycle), A033452 (StirlingSet), A105219 (Laguerre), A103194 (Lah), A065096 (SchröderBig), A083411 (Fubini), A141222 (Narayana), A000330 (Units A000012).
Cf. A173018.

Programs

  • Maple
    a := n -> add(combinat[eulerian1](n, k)*k^2, k = 0..n):
    # Recurrence:
    a := proc(n) option remember; if n < 2 then 0 elif n = 2 then 1 else
    ((n-3)*(n-1)*(23*n-44)*a(n-2) + ((159 - 7*n)*n - 286)*a(n-1))/(16*(n - 2)) fi end:
    seq(a(n), n = 0..29);
  • Mathematica
    a[n_] := Sum[Sum[(-1)^j Binomial[n + 1, j] k^2 (k + 1 - j)^n, {j,0,k}], {k,0,n}]; a[0] := 0; Table[a[n], {n, 0, 25}]
  • SageMath
    def aList(len):
        R. = PowerSeriesRing(QQ, default_prec=len+2)
        f = x^2*(-x^2 + x - 3)/(6*(x - 1)^3)
        return f.egf_to_ogf().list()[:len]
    print(aList(20))

Formula

a(n) = n! * [x^n] x^2*(-x^2 + x - 3)/(6*(x - 1)^3).
a(n) = Sum_{k=0..n} Sum_{j=0..k} (-1)^j*binomial(n + 1, j)*k^2*(k + 1 - j)^n.
a(n) = ((n - 3)*(n - 1)*(23*n - 44)*a(n-2) + ((159 - 7*n)*n - 286)*a(n-1))/(16*(n - 2)) for n >= 3.

A372803 Expansion of e.g.f. exp(1 - exp(-x)) * (exp(-x) - 1) * (exp(-x) - 2).

Original entry on oeis.org

0, 1, 3, -2, -11, 31, 14, -349, 1047, 820, -21265, 90355, -26352, -2086083, 14092615, -32449650, -241320287, 3080629195, -15455723498, -2456654665, 760213889483, -7097893818852, 28459679925187, 125560349169887, -3153253543188992, 26852335900600041, -86130449768002245
Offset: 0

Views

Author

Ilya Gutkovskiy, May 14 2024

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 26; CoefficientList[Series[Exp[1 - Exp[-x]] (Exp[-x] - 1) (Exp[-x] - 2), {x, 0, nmax}], x] Range[0, nmax]!
    Table[Sum[(-1)^(n - k) StirlingS2[n, k] k^2, {k, 0, n}], {n, 0, 26}]

Formula

G.f.: Sum_{k>=0} k^2 * x^k / Product_{j=0..k} (1 + j*x).
a(n) = Sum_{k=0..n} (-1)^(n-k) * Stirling2(n,k) * k^2.
Showing 1-8 of 8 results.