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

A144385 Triangle read by rows: T(n,k) is the number of partitions of [1, 2, ..., k] into exactly n blocks, each of size 1, 2 or 3 (n >= 0, 0 <= k <= 3n).

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 0, 1, 3, 7, 10, 10, 0, 0, 0, 1, 6, 25, 75, 175, 280, 280, 0, 0, 0, 0, 1, 10, 65, 315, 1225, 3780, 9100, 15400, 15400, 0, 0, 0, 0, 0, 1, 15, 140, 980, 5565, 26145, 102025, 323400, 800800, 1401400, 1401400, 0, 0, 0, 0, 0, 0, 1, 21, 266, 2520, 19425, 125895, 695695, 3273270, 12962950, 42042000, 106506400, 190590400, 190590400
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Dec 07 2008, Dec 17 2008

Keywords

Comments

Row n has 3n+1 entries.

Examples

			Triangle begins:
[1]
[0, 1, 1, 1]
[0, 0, 1, 3, 7, 10, 10]
[0, 0, 0, 1, 6, 25, 75, 175, 280, 280]
[0, 0, 0, 0, 1, 10, 65, 315, 1225, 3780, 9100, 15400, 15400]
[0, 0, 0, 0, 0, 1, 15, 140, 980, 5565, 26145, 102025, 323400, 800800, 1401400, 1401400]
		

Crossrefs

See A144399, A144402, A144417, A111246 for other versions of this triangle.
Column sums give A001680, row sums give A144416. Taking last nonzero entry in each row gives A025035.
Diagonals include A000217, A001296, A027778, A144516; also A025035.
A generalization of the triangle in A144331 (and in several other entries).
Cf. A144643.

Programs

  • Maple
    T := proc(n, k)
    option remember;
    if n = k then 1;
    elif k < n then 0;
    elif n < 1 then 0;
    else T(n - 1, k - 1) + (k - 1)*T(n - 1, k - 2) + 1/2*(k - 1)*(k - 2)*T(n - 1, k - 3);
    end if;
    end proc;
    for n from 0 to 12 do lprint([seq(T(n,k),k=0..3*n)]); od:
  • Mathematica
    t[n_, n_] = 1; t[n_ /; n >= 0, k_] /; 0 <= k <= 3*n := t[n, k] = t[n-1, k-1] + (k-1)*t[n-1, k-2] + (1/2)*(k-1)*(k-2)*t[n-1, k-3]; t[, ] = 0; Table[t[n, k], {n, 0, 12}, {k, 0, 3*n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

Formula

T(n, k) = T(n - 1, k - 1) + (k - 1)*T(n - 1, k - 2) + (1/2)*(k - 1)*(k - 2)*T(n - 1, k - 3).
E.g.f.: Sum_{ n >= 0, k >= 0 } T(n, k) y^n x^k / k! = exp( y*(x+x^2/2+x^3/6) ). That is, the coefficient of y^n is the e.g.f. for row n. E.g. the e.g.f. for row 2 is (1/2)*(x+x^2/2+x^3/6)^2 = 1*x^2/2! + 3*x^3/3! + 7*x^4/4! + 10*x^5/5! + 10*x^6/6!.

A144644 Triangle in A144643 read by columns downwards.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 7, 6, 1, 0, 0, 15, 25, 10, 1, 0, 0, 25, 90, 65, 15, 1, 0, 0, 35, 280, 350, 140, 21, 1, 0, 0, 35, 770, 1645, 1050, 266, 28, 1, 0, 0, 0, 1855, 6930, 6825, 2646, 462, 36, 1, 0, 0, 0, 3675, 26425, 39795, 22575, 5880, 750, 45, 1
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Jan 25 2009

Keywords

Comments

The Bell transform of the sequence "g(n) = 1 if n<4 else 0". For the definition of the Bell transform see A264428. - Peter Luschny, Jan 19 2016

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1,  1;
  0, 1,  3,    1;
  0, 1,  7,    6,     1;
  0, 0, 15,   25,    10,      1;
  0, 0, 25,   90,    65,     15,      1;
  0, 0, 35,  280,   350,    140,     21,     1;
  0, 0, 35,  770,  1645,   1050,    266,    28,     1;
  0, 0,  0, 1855,  6930,   6825,   2646,   462,    36,    1;
  0, 0,  0, 3675, 26425,  39795,  22575,  5880,   750,   45,  1;
  0, 0,  0, 5775, 90475, 211750, 172095, 63525, 11880, 1155, 55, 1;
		

Crossrefs

Programs

  • Magma
    function t(n,k)
      if k eq n then return 1;
      elif k le n-1 or n le 0 then return 0;
      else return (&+[Binomial(k-1,j)*t(n-1,k-j-1): j in [0..3]]);
      end if;
    end function;
    A144644:= func< n,k | t(k,n) >;
    [A144644(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 11 2023
  • Mathematica
    With[{r=15}, Table[BellY[n, k, {1,1,1,1}], {n,0,r}, {k,0,n}]]//Flatten (* Jan Mangaldan, May 22 2016 *)
  • PARI
    \\ Function bell_matrix is defined in A264428.
    B = bell_matrix( n -> {if(n < 4, 1, 0)}, 9); for(n = 0, 9, printp(); for(k = 1, n, print1(B[n,k], " "))); \\ Peter Luschny, Apr 17 2019
    
  • Sage
    # uses[bell_matrix from A264428]
    bell_matrix(lambda n: 1 if n<4 else 0, 12) # Peter Luschny, Jan 19 2016
    

Formula

Bivariate e.g.f. A144644(x,t) = Sum_{n>=0, k>=0} T(n,k)*x^n*t^k/n! = exp(t*G4(x)), where G4(x) = Sum_{i=1..4} x^i/i! is the e.g.f. of column 1. - R. J. Mathar, May 28 2019
From G. C. Greubel, Oct 11 2023: (Start)
T(n, k) = A144643(k, n).
T(n, k) = A144645(n, n-k).
T(n, k) = t(k, n), where t(n, k) = Sum_{j=0..3} binomial(k-1, j) * t(n-1, k-j-1), with t(n,n) = 1, t(n,k) = 0 if n < 1 or n > k.
Sum_{k=0..n} T(n, k) = A001681(n). (End)

A151511 The triangle in A151359 read by rows downwards.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 7, 6, 1, 0, 1, 15, 25, 10, 1, 0, 1, 31, 90, 65, 15, 1, 0, 0, 63, 301, 350, 140, 21, 1, 0, 0, 119, 966, 1701, 1050, 266, 28, 1, 0, 0, 210, 2989, 7770, 6951, 2646, 462, 36, 1, 0, 0, 336, 8925, 33985, 42525, 22827, 5880, 750, 45, 1, 0, 0, 462, 25641
Offset: 0

Views

Author

N. J. A. Sloane, May 14 2009

Keywords

Comments

The Bell transform of g(n) = 1 if n<6 else 0. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 19 2016

Examples

			Triangle begins:
1
0 1
0 1 1
0 1 3 1
0 1 7 6 1
0 1 15 25 10 1
0 1 31 90 65 15 1
0 0 63 301 350 140 21 1
0 0 119 966 1701 1050 266 28 1
		

Crossrefs

Begins in same way as triangle of Stirling numbers of second kind, A048993, but is strictly different. N. J. A. Sloane, Aug 09 2017
Cf. A148092 (row sums), A122848, A111246, A144644, A151509.

Programs

  • Mathematica
    Unprotect[Power]; 0^0 = 1; a[n_ /; 1 <= n <= 6] = 1; a[] = 0; T[n, k_] := T[n, k] = If[k == 0, a[0]^n, Sum[Binomial[n - 1, j - 1] a[j] T[n - j, k - 1], {j, 0, n - k + 1}]]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 20 2016, after Peter Luschny *)
  • Sage
    # uses[bell_matrix from A264428]
    bell_matrix(lambda n: 1 if n<6 else 0, 12) # Peter Luschny, Jan 19 2016

Formula

Bivariate e.g.f. A151511(x,t) = Sum_{n>=0, k>=0} T(n,k)*x^n*t^k/n! = exp(t*G6(x)), where G6(x) = Sum_{i=1..6} x^i/i! is the e.g.f. of column 1. - R. J. Mathar, May 28 2019

Extensions

Row 9 added by Michel Marcus, Feb 13 2014
More rows from R. J. Mathar, May 28 2019

A151509 The triangle in A151338 read by rows downwards.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 7, 6, 1, 0, 1, 15, 25, 10, 1, 0, 0, 31, 90, 65, 15, 1, 0, 0, 56, 301, 350, 140, 21, 1, 0, 0, 91, 938, 1701, 1050, 266, 28, 1, 0, 0, 126, 2737, 7686, 6951, 2646, 462, 36, 1, 0, 0, 126, 7455, 32725, 42315, 22827, 5880, 750, 45, 1, 0, 0, 0, 18711, 132055
Offset: 0

Views

Author

N. J. A. Sloane, May 14 2009

Keywords

Comments

The Bell transform of the sequence "g(n) = 1 if n < 5, otherwise 0". For the definition of the Bell transform see A264428. - Peter Luschny, Jan 19 2016

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1,  1;
  0, 1,  3,   1;
  0, 1,  7,   6,    1;
  0, 1, 15,  25,   10,    1;
  0, 0, 31,  90,   65,   15,   1;
  0, 0, 56, 301,  350,  140,  21,  1;
  0, 0, 91, 938, 1701, 1050, 266, 28, 1;
		

Crossrefs

Cf. A110038 (row sums), A122848, A111246, A144644, A151511.

Programs

  • Mathematica
    rows = 10;
    BellMatrix[f_Function | f_Symbol, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    B = BellMatrix[If[# < 5, 1, 0]&, rows];
    Table[B[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 14 2018, after Peter Luschny *)
  • Sage
    # uses[bell_matrix from A264428]
    bell_matrix(lambda n: 1 if n<5 else 0, 12) # Peter Luschny, Jan 19 2016

Formula

Bivariate e.g.f A151509(x,t) = Sum_{n>=0, k>=0} T(n,k)*x^n*t^k/n! = exp(t*G5(x)), where G5(x) = Sum_{i=1..5} x^i/i! is the e.g.f. of column 1. - R. J. Mathar, May 28 2019

Extensions

Row 9 added by Michel Marcus, Feb 13 2014
More rows from R. J. Mathar, May 28 2019

A144402 Triangle in A144385 read downwards by columns.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 0, 7, 6, 1, 0, 0, 10, 25, 10, 1, 0, 0, 10, 75, 65, 15, 1, 0, 0, 0, 175, 315, 140, 21, 1, 0, 0, 0, 280, 1225, 980, 266, 28, 1, 0, 0, 0, 280, 3780, 5565, 2520, 462, 36, 1, 0, 0, 0, 0, 9100, 26145, 19425, 5670, 750, 45, 1, 0, 0, 0, 0, 15400
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Dec 07 2008

Keywords

Comments

The Bell transform of the sequence "g(n) = 1 if n<3 else 0". For the definition of the Bell transform see A264428. - Peter Luschny, Jan 19 2016

Crossrefs

Cf. A111246.

Programs

  • Mathematica
    BellMatrix[f_Function, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len-1}, {k, 0, len-1}]];
    rows = 12;
    M = BellMatrix[If[#<3, 1, 0]&, rows];
    Table[M[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 14 2018, after Peter Luschny *)
  • Sage
    # uses[bell_matrix from A264428]
    bell_matrix(lambda n: 1 if n<3 else 0, 12) # Peter Luschny, Jan 19 2016

A171998 In general, let A(n,k,m) denote the (n,k)-th entry of the inverse of the matrix consisting of the (n,k)-th m-restrained Stirling numbers of the second kind (-1)^(n-k) times the number of permutations of an n-set with k disjoint cycles of length less than or equal to m, as the (n+1,k+1)-th entry. The sequence shows A(n,k,3), which is a lower triangular matrix, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, -5, 7, 6, 1, -65, -15, 25, 10, 1, -455, -455, 0, 65, 15, 1, -1295, -4725, -1715, 140, 140, 21, 1
Offset: 1

Views

Author

Ji Young Choi, Jan 21 2010

Keywords

Comments

A(n,k,m) also can be expanded for nonpositive integers n and k using the m-restrained Stirling numbers of the first kind.

Examples

			A(1,1,3) = 1, A(1,2,3) = 0, A(1,3,3) = 0, A(1,4,3) = 0, ...
A(2,1,3) = 1, A(2,2,3) = 1, A(2,3,3) = 0, A(2,4,3) = 0, ...
A(3,1,3) = 1, A(3,2,3) = 3, A(3,3,3) = 1, A(3,4,3) = 0, ...
A(4,1,3) = -5, A(4,2,3) = 7, A(4,3,3) = 6, A(4,4,3) = 1, ...
In other words, A(n,k,3) is the matrix
1
1 1
1 3 1
-5 7 6 1
...
with all other entries in each row being 0. - _N. J. A. Sloane_, Dec 21 2019
		

Crossrefs

Formula

A(n,k,m) = A(n-1,k-1,m) - Sum_{i=1..m-1} (-1)^{i}(k)...(k+i-1) A(n,k+i,m) A(n,k,m) = A(n-1,k-1,m) + k A(n-1,k,m) + (-1)^m k(k+1)...(k+m-1)A(n,k+m,m).

A171996 A(n,k,m) is the number of permutations of an n-set with k disjoint cycles of length less than or equal to m, called the (n,k)-th m-restrained Stirling numbers of the first kind, and denoted by mS_1(n,k). The sequence shows the case of m=3.

Original entry on oeis.org

1, -1, 1, 2, -3, 1, 0, 11, -6, 1, 0, -20, 35, -10, 1, 0, 40, -135, 85, -15, 1, 0, 0, 490, -525, 175, -21, 1, 0, 0, -1120, 2905, -1540, 322, -28, 1, 0, 0, 2240, -12600, 11865, -3780, 546, -36, 1, 0, 0, 0, 47600, -76545, 38325, -8190, 870, -45, 1
Offset: 1

Views

Author

Ji Young Choi, Jan 21 2010

Keywords

Comments

A(n,k,m) is also the (n,k)-th entry in the matrix inverting the matrix consisting of the m-restrained Stirling numbers of the second kind.
Also the Bell transform of the sequence "g(n) = [1,-1,2][n] if n < 3, otherwise 0" (adding 1,0,0,.. as column 0). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 19 2016

Examples

			A(1,1,3)=1,  A(1,2,3)=0,   A(1,3,3)=0,   A(1,4,3)=0, ...
A(2,1,3)=-1, A(2,2,3)=1,   A(2,3,3)=0,   A(2,4,3)=0, ...
A(3,1,3)=2,  A(3,2,3)=-3,  A(3,3,3)=1,   A(3,4,3)=0, ...
A(4,1,3)=0,  A(4,2,3)=11,  A(4,3,3)=-6,  A(4,4,3)=1, ...
		

Crossrefs

Cf. A111246, A144633, A171998 (matrix inverse).

Programs

  • PARI
    T(n,k) = (-1)^(n-k)*n!*sum(j=0, k, binomial(j,n-k-j)*binomial(k,j)*3^(-n+k+j)*2^(n-k-2*j)/k!); \\ Jinyuan Wang, Dec 21 2019
  • Sage
    # uses[bell_matrix from A264428]
    # Adds a column 1, 0, 0, 0, ... at the left side of the triangle.
    bell_matrix(lambda n: [1,-1,2][n] if n < 3 else 0, 12) # Peter Luschny, Jan 19 2016
    

Formula

A(n,k,m) = Sum {(-1)^(n-k)*n!} /{1^{k_1}*2^{k_2}*...*m^{k_m}*(k_1!)*(k_2!)*...*(k_m!)}, where k_1 + 2*k_2 + ... + m*k_m = n and k_1 + k_2 + ... + k_m = k.
Recurrence A(n,k,m) = Sum_{i=1..m} (-1)^(i-1)*[n-1]_{i-1}*A(n-i,k-1,m).
A(n,k,m) = A(n-1,k-1,m) - (n-1)*A(n-1,k,m) - (-1)^m(n-1)*(n-2)*...*(n-m)*A(n-m-1,k-1,m).
Generating function f(t) = (1 + t - t^2/2 + t^3/3 + ... + (-1)^(m-1) t^m/m)^x, for an indeterminate x ===> the n-th derivative of f(t) at t=0, f^(n)(0) = Sum_{k=1..n} A(n,k,m)[x]_k, where [x]_k is the k-th falling factorial
T(n,k) = (-1)^(n-k)*n!*Sum_{j=0..k} C(j,n-k-j)*C(k,j)*3^(-n+k+j)*2^(n-k-2*j)/k!. - Vladimir Kruchinin, Oct 02 2019

Extensions

More terms from Peter Luschny, Jan 19 2016
Showing 1-7 of 7 results.