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 41-50 of 63 results. Next

A090665 Triangle read by rows: T(n,k) = number of preferential arrangements of n things where the first object has rank k.

Original entry on oeis.org

1, 2, 1, 6, 5, 2, 26, 25, 18, 6, 150, 149, 134, 84, 24, 1082, 1081, 1050, 870, 480, 120, 9366, 9365, 9302, 8700, 6600, 3240, 720, 94586, 94585, 94458, 92526, 82320, 57120, 25200, 5040, 1091670, 1091669, 1091414, 1085364, 1038744, 871920, 554400, 221760, 40320
Offset: 1

Views

Author

Eugene McDonnell (eemcd(AT)mac.com), Dec 16 2003

Keywords

Comments

The rows are the reverses of the rows of A054255.
Row sums give A000670.
Column 1 is A000629. - Joerg Arndt, Dec 08 2014
From Vincent Jackson, May 01 2023: (Start)
The formula
T(n, k) = Sum_{i=k..n-1} i!*StirlingS2(n-1, i) + (k-1)!*StirlingS2(n-1,k-1)
can be derived by splitting the weak orders with the first object at rank k into three categories:
1. weak orders where another object (of the n-1 other objects) has rank k,
2. weak orders where all other objects have rank strictly less than k, and
3. weak orders where no other object is at rank k, but some object has rank greater than k.
The number of weak orders in the first category is Sum_{i=k..n-1} i!*StirlingS2(n-1, i), the number of weak orders of length n-1 with number of ranks between k and n-1 (i.e. A084416(n-1,k)). Given a weak order of length n-1 and number of ranks i >= k, the corresponding weak order of length n with the specified object at rank k is formed by inserting the new object into the appropriate rank.
The number of weak orders in the second category is (k-1)!*StirlingS2(n-1,k-1), the number of weak orders of length n-1 with number of ranks k-1. Given a weak order of length n-1 and number of ranks k-1, the corresponding weak order is formed by appending the new object in its own rank.
Lastly, the number of weak orders in the third category is (again) Sum_{i=k..n-1} i!*StirlingS2(n-1, i). Given a weak order of length n-1 and number of ranks k-1, the corresponding weak order is formed by inserting the new object in its own rank after the rank k-1, thereby shifting by one the ranks originally greater than or equal to k. (End)

Examples

			Triangle starts:
01: 1;
02: 2, 1;
03: 6, 5, 2;
04: 26, 25, 18, 6;
05: 150, 149, 134, 84, 24;
06: 1082, 1081, 1050, 870, 480, 120;
07: 9366, 9365, 9302, 8700, 6600, 3240, 720;
08: 94586, 94585, 94458, 92526, 82320, 57120, 25200, 5040;
09: 1091670, 1091669, 1091414, 1085364, 1038744, 871920, 554400, 221760, 40320;
10: 14174522, 14174521, 14174010, 14155350, 13950720, 12930120, 10190880, 5957280, 2177280, 362880;
...
		

Crossrefs

Programs

  • Mathematica
    T = {n, k} |-> 2*Sum[i!*StirlingS2[n-1, i], {i, k, n-1}] + (k-1)i!*StirlingS2[n-1, k-1]  (* Vincent Jackson, May 01 2023 *)

Formula

From Vincent Jackson, May 01 2023: (Start)
T(n, k) = 2*(Sum_{i=k..n-1} i!*StirlingS2(n-1, i)) + (k-1)!*StirlingS2(n-1,k-1).
T(n, k) = 2*A084416(n-1,k) + (k-1)!*StirlingS2(n-1,k-1).
T(n, k) = A084416(n-1,k) + A084416(n-1,k-1). (End)
Sum_{k=1..n} k * T(n,k) = A083410(n). - Alois P. Heinz, Feb 20 2025

Extensions

Corrected by Alois P. Heinz, Dec 08 2014
Name clarified by Vincent Jackson, May 01 2023

A094485 T(n, k) = Stirling1(n+1, k) - Stirling1(n, k-1), for 1 <= k <= n. Triangle read by rows.

Original entry on oeis.org

-1, 2, -2, -6, 9, -3, 24, -44, 24, -4, -120, 250, -175, 50, -5, 720, -1644, 1350, -510, 90, -6, -5040, 12348, -11368, 5145, -1225, 147, -7, 40320, -104544, 105056, -54152, 15680, -2576, 224, -8, -362880, 986256, -1063116, 605556, -202041, 40824, -4914, 324, -9, 3628800, -10265760, 11727000, -7236800
Offset: 1

Views

Author

Vladeta Jovovic, Jun 05 2004

Keywords

Examples

			Triangle starts:
[n\k    1        2       3      4      5      6     7  8]
[1]    -1;
[2]     2,      -2;
[3]    -6,       9,     -3;
[4]    24,     -44,     24,     -4;
[5]  -120,     250,   -175,     50,    -5;
[6]   720,   -1644,   1350,   -510,    90,    -6;
[7] -5040,   12348, -11368,   5145, -1225,   147,   -7;
[8] 40320, -104544, 105056, -54152, 15680, -2576,  224,  -8;
		

Crossrefs

Programs

  • Maple
    T := (n, k) -> Stirling1(n+1, k) - Stirling1(n, k-1);
    seq(seq(T(n, k), k=1..n), n=1..9); # Peter Luschny, May 26 2020
  • Mathematica
    Table[StirlingS1[n+1,k]-StirlingS1[n,k-1],{n,10},{k,n}]//Flatten (* Harvey P. Dale, Jul 25 2024 *)

Formula

E.g.f.: -x*y*(1+y)^(x-1). [T(n,k) = n!*[x^k]([y^n] -x*y*(y+1)^(x-1)).]
The matrix inverse of the Worpitzky triangle. More precisely:
T(n, k) = -n!*InvW(n, k) where InvW is the matrix inverse of A028246. - Peter Luschny, May 26 2020

Extensions

Offset of k shifted and edited by Peter Luschny, May 26 2020

A125166 Triangle R(n,k), companion to A125165, left column n^3.

Original entry on oeis.org

1, 8, 1, 27, 9, 1, 64, 36, 10, 1, 125, 100, 46, 11, 1, 216, 225, 146, 57, 12, 1, 343, 441, 371, 203, 69, 13, 1, 512, 784, 812, 574, 272, 82, 14, 1, 729, 1296, 1596, 1386, 846, 354, 96, 15, 1, 1000, 2025, 2892, 2982, 2232, 1200, 450, 111, 16, 1
Offset: 0

Views

Author

Gary W. Adamson, Nov 22 2006

Keywords

Comments

Riordan array ((1 + 4*x + x^2)/(1 - x)^4, x/(1 - x)). - Philippe Deléham, Dec 09 2013

Examples

			With other offset (k >= 1) from first formula: R(5,3) = 146 = R(4,3) + R(4,2) = 46 + 100.
The Riordan triangle R begins:
  n\k|     0    1    2    3    4    5   6   7   8  9
  --------------------------------------------------
   0 |     1
   1 |     8    1
   2 |    27    9    1
   3 |    64   36   10    1
   4 |   125  100   46   11    1
   5 |   216  225  146   57   12    1
   6 |   343  441  371  203   69   13   1
   7 |   512  784  812  574  272   82  14   1
   8 |   729 1296 1596 1386  846  354  96  15   1
   9 |  1000 2025 2892 2982 2232 1200 450 111  16  1
... refomatted and extended by _Wolfdieter Lang_, Mar 25 2025.
		

Crossrefs

Cf. A000578 (column 0), A000537 (column 1), A024166 (column 2), A101094 (column 3).
Cf. A257448 (row sums).

Programs

  • Mathematica
    A125166[n_, k_] := A125166[n, k] = Switch[k, 0, (n + 1)^3, n, 1, _, A125166[n - 1, k - 1] + A125166[n - 1, k]];
    Table[A125166[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Apr 08 2025 *)
  • SageMath
    y = polygen(QQ, 'y')
    x = y.parent()[['x']].gen()
    gf = (1 + 4*x + x^2)/((x - 1)^3*(y*x + x - 1))
    [list(u) for u in list(gf.O(11))]  # Peter Luschny, Apr 02 2025

Formula

Binomial transform of an infinite matrix M with diagonal D, subdiagonal (D-1)..., etc; as follows: (D) = (1,1,1...); (D-1) = (7,7,7...); (D-2) = (12,12,12...); (D-3) = (6,6,6...). Alternatively, given left border n^3: (1, 8, 27, 64...); for k>1, R(n,k) = R(n-1,k) + R(n-1,k-1).
From Wolfdieter Lang, Mar 27 2025: (Start)
Riordan triangle (see a comment above):
R(n, 0) = (n+1)^3, R(n, k) = R(n-1, k-1) + R(n-1, k), for k >= 1. (from the (finite) A-sequence {1, 1} with offset 0),
R(n, 0) = Sum_{k=0..n-1} Z(j)*R(n-1, k), for n >= 1, and R(0, 0) = 1, with the Riordan Z-sequence A382057. For Riordan A- and Z-sequences see the first W. Lang link in A006232.
R(n, k) = Sum{j=0..n} (j+1)^3*A097805(n-j, k) (convolution property).
R(n, k) = Sum{j=0..3} A028246(4, j+1)*binomial(n, k+j). (Proof for k=0 with a standard (n+1)^3 formula, and for k >= 1 using the Pascal type recurrence for the triangle.)
O.g.f. column k (with leading 0s): ((1 + 4*x + x^2)/(1 - x)^4)*(x/(1-x))^k. (Numerator polynomial from row 3 of the triangle A008292.)
O.g.f. row polynomials P(n, y) = Sum_{k=0..n} R(n, k)*y^k:
G(y, x) = (1 + 4*x + x^2)/((1 - x)^3*(1 - (1+y)*x)). (End)

Extensions

a(27) corrected by Georg Fischer, Feb 18 2020

A142071 Expansion of the exponential generating function 1 - log(1 - x*(exp(z) - 1)), triangle read by rows, T(n,k) for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 2, 0, 1, 7, 12, 6, 0, 1, 15, 50, 60, 24, 0, 1, 31, 180, 390, 360, 120, 0, 1, 63, 602, 2100, 3360, 2520, 720, 0, 1, 127, 1932, 10206, 25200, 31920, 20160, 5040, 0, 1, 255, 6050, 46620, 166824, 317520, 332640, 181440, 40320, 0, 1, 511, 18660
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 15 2008

Keywords

Comments

Row n gives the coefficients which express the sums of the n-th powers of the integers as a linear combination of binomial coefficients, thus:
Sum_{k=1..r} k^n = A103438(n+r,r) = Sum_{k=0..n} T(n+1,k) * C(r,k),
where, by convention, C(r,k) = 0 whenever r < k. - Robert B Fowler, Jan 16 2023

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   3,    2;
  0, 1,   7,   12,     6;
  0, 1,  15,   50,    60,    24;
  0, 1,  31,  180,   390,   360,   120;
  0, 1,  63,  602,  2100,  3360,  2520,   720;
  0, 1, 127, 1932, 10206, 25200, 31920, 20160, 5040;
  ...
		

Crossrefs

Column k = 0 is A000007.
Cf. A028246, A163626, A000629 (row sums).
Cf. A103438, A007318 (binomial coefficients).

Programs

  • Maple
    CL := (f, x) -> PolynomialTools:-CoefficientList(f, x):
    A142071row := proc(n) 1 - log(1 - x*(exp(z) - 1)):
    series(%, z, 12): CL(n!*coeff(%, z, n), x) end:
    for n from 0 by 1 to 7 do A142071row(n) od;
    # Alternative:
    A142071Row := proc(n) if n=0 then [1] else
    CL(convert(series(polylog(-n+1, z/(1+z)), z, n*2), polynom), z) fi end:
    seq(A142071Row(n), n=0..6); # Peter Luschny, Sep 06 2018
  • Mathematica
    T[n_, k_] := If[k==0, Floor[1/(n + 1)], (k - 1)!*StirlingS2[n, k]]; Flatten[Table[T[n, k], {n, 0, 10}, {k, 0, n}]] (* Detlef Meya, Jan 06 2024 *)

Formula

Row n gives the coefficients of the polynomial defined by p(x, 0) = 1 and for n > 0 p(x, n) = Sum_{k >= 0} k^(n-1)*(x/(1 + x))^k = PolyLog(-n+1, x/(1+x)).
T(n, k) = (k - 1)! * Stirling2(n, k) for k > 0. - Detlef Meya, Jan 06 2024

Extensions

Edited, T(0,0) = 1 prepended and new name by Peter Luschny, Sep 06 2018

A176276 Worpitzky(n, k)*Harmonic(k), triangle read by rows.

Original entry on oeis.org

0, 0, 1, 0, 3, 3, 0, 7, 18, 11, 0, 15, 75, 110, 50, 0, 31, 270, 715, 750, 274, 0, 63, 903, 3850, 7000, 5754, 1764, 0, 127, 2898, 18711, 52500, 72884, 49392, 13068, 0, 255, 9075, 85470, 347550, 725004, 814968, 470448, 109584, 0, 511, 27990, 375155, 2126250, 6254598, 10372320, 9801000, 4931280, 1026576
Offset: 0

Views

Author

Peter Luschny, Apr 14 2010

Keywords

Examples

			Triangle begins as:
  0;
  0,  1;
  0,  3,   3;
  0,  7,  18,  11;
  0, 15,  75, 110,  50;
  0, 31, 270, 715, 750, 274;
		

Crossrefs

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> AbsInt(Stirling1(k+1, 2) * Stirling2(n+1, k+1)) ))); # G. C. Greubel, Nov 24 2019
  • Magma
    [Abs(StirlingFirst(k+1, 2)*StirlingSecond(n+1, k+1)): k in [0..n], n in [0..10]];
    
  • Maple
    T176276 := proc(n, k) local W, H;
    W := proc(n, k) stirling2(n+1, k+1)*k! end:
    H := proc(n) local i; add(1/i, i=1..n) end: # H(0) = 0 (empty sum convention)
    W(n, k)*H(k) end:
  • Mathematica
    T[n_, k_]:= StirlingS2[n+1, k+1]*k!*HarmonicNumber[k]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, Jul 29 2013 *)
  • PARI
    T(n,k) = k!*stirling(n+1,k+1,2)*sum(j=1,k,1/j); \\ G. C. Greubel, Nov 24 2019
    
  • Sage
    [[factorial(k)*stirling_number1(n+1,k+1)*harmonic_number(k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 24 2019
    

Formula

T(n, k) = abs(Stirling1(k+1, 2) * Stirling2(n+1, k+1)).

A176277 Sum over the odd entries of the rows in the triangle Worpitzky(n, k)*Harmonic(k) (A176276).

Original entry on oeis.org

0, 1, 3, 18, 125, 1020, 9667, 104790, 1281177, 17457840, 262493231, 4318429962, 77178551749, 1489209086820, 30859393432155, 683549418431934, 16118484827641841, 403156528379483160, 10661349675027656839
Offset: 0

Views

Author

Peter Luschny, Apr 14 2010

Keywords

Examples

			Let W(n, k) be the Worpitzky numbers and H(n) the harmonic numbers.
a(3) = W(3,1)H(1) + W(3,3)H(3) = 7*1 + 6*(11/6) = 18.
		

Crossrefs

Programs

  • GAP
    a:= function(n)
        if n<2 then return n;
        else return Sum([0..n], k-> AbsInt(Stirling1(k+1, 2) * Stirling2(n+1, k+1)))/2;
        fi; end;
    List([0..25], n-> a(n)); # G. C. Greubel, Nov 24 2019
  • Magma
    [n lt 2 select n else (&+[Abs(StirlingFirst(k+1, 2)*StirlingSecond(n+1, k+1)): k in [0..n]])/2: n in [0..25]];
    
  • Maple
    A176277 := proc(n) local k; add((k mod 2)*T176276(n, k), k=0..n) end;
  • Mathematica
    a[1] = 1; a[n_]:= Sum[ StirlingS2[n+1, k+1]*k!*HarmonicNumber[k], {k,0,n,2}]; Table[a[n], {n,0,20}] (* Jean-François Alcover, Jul 30 2013 *)
  • PARI
    a(n) = if(n<2, n, sum(k=0,n, k!*stirling(n+1,k+1,2)*sum(j=1,k,1/j)) ); \\ G. C. Greubel, Nov 24 2019
    
  • Sage
    def a(n):
        if (n<2): return n
        else: return sum( factorial(k)*stirling_number1(n+1,k+1)*harmonic_number(k) for k in (0..n))/2
    [a(n) for n in (0..25)] # G. C. Greubel, Nov 24 2019
    

Formula

a(n) = Sum_{k=0..n} (k mod 2) abs(Stirling1(k+1, 2)*Stirling2(n+1, k+1)).

A188881 Triangle of coefficients arising from an expansion of Integral( exp(exp(exp(x))), dx).

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 6, 11, 12, 6, 24, 50, 70, 60, 24, 120, 274, 450, 510, 360, 120, 720, 1764, 3248, 4410, 4200, 2520, 720, 5040, 13068, 26264, 40614, 47040, 38640, 20160, 5040, 40320, 109584, 236248, 403704, 538776, 544320, 393120, 181440, 40320
Offset: 1

Views

Author

N. J. A. Sloane, Apr 14 2011

Keywords

Comments

Also the coefficients of the polynomials which are generated by the exponential generating function -log(1 + x*log(1 - t)). The polynomials might be called 'logarithmic polynomials'. Note also A003713, and A263634 for a different use of this term. See the paper of F. Qi for a related, but different family of polynomials. - Peter Luschny, Jul 11 2020
Edgar remarks that these coefficients are related to Stirling numbers of the second kind (cf. A008277).
The first column and the main diagonal are the factorials (A000142). The n-th entry on the first subdiagonal is A001710(n+1). The second column is A000254, the third column is 2*A000399, and the fourth column is 6*A000454. In general, the k-th column is (k-1)!*s(n,k), where s(n,k) is the unsigned Stirling number of the first kind. - Nathaniel Johnston, Apr 15 2011
With offset n=0, k=0 : triangle T(n,k), read by rows,given by T(n,k) = k*T(n-1, k-1) + n*T(n-1, k) with T(0, 0) = 1. - Philippe Deléham, Oct 04 2011

Examples

			Triangle begins:
1
1    1
2    3    2
6    11   12   6
24   50   70   60   24
120  274  450  510  360  120
...
		

Crossrefs

Programs

  • Maple
    S:=proc(n,k)global s:if(n=0 and k=0)then s[0,0]:=1:elif(n=0 or k=0)then s[n,k]:=0:elif(not type(s[n,k],integer))then s[n,k]:=(n-1)*S(n-1,k)+S(n-1,k-1):fi:return s[n,k]:end:
    T:=proc(n,k)return (k-1)!*S(n,k);end:
    for n from 1 to 6 do for k from 1 to n do print(T(n,k)):od:od: # Nathaniel Johnston, Apr 15 2011
    # With offset n = 0, k = 0:
    A188881 := (n, k) -> k!*abs(Stirling1(n+1, k+1)):
    seq(seq(A188881(n,k), k=0..n), n=0..8); # Peter Luschny, Oct 19 2017
    # Alternative:
    gf := -log(1 + x*log(1 - t)): ser := series(gf, t, 18):
    toeff := n -> n!*expand(coeff(ser, t, n)):
    seq(print(seq(coeff(toeff(n), x, k), k=1..n)), n=1..8); # Peter Luschny, Jul 10 2020
  • Mathematica
    Table[(k - 1)! * Sum[StirlingS2[i, k] * (-1)^(n - i) * StirlingS1[n, i], {i, 0, k}], {n, 9}, {k, n}] // Flatten (* Michael De Vlieger, Apr 17 2015 *)
  • Maxima
    T(n,k):=(k-1)!*sum(stirling2(i,k)*(-1)^(n-i)*stirling1(n,i),i,0,k); /* Vladimir Kruchinin, Apr 17 2015 */
    
  • PARI
    {T(n, k) = if( k<1 || k>n, 0, (n-1)! * polcoeff( (x / (1 - exp(-x * (1 + x * O(x^n)))))^n, n-k))}; /* Michael Somos, May 10 2017 */
    
  • PARI
    {T(n, k) = if( k<1 || n<0, 0, (k-1)! * sum(i=0, k, stirling(i, k, 2) * (-1)^(n-i) * stirling(n, i, 1)))}; /* Michael Somos, May 10 2017 */

Formula

T(n, k) = (k-1)!*Sum_{i=0..k}(Stirling2(i,k)*(-1)^(n-i)*Stirling1(n,i)) =
T(n, k) = Sum_{i=0..k}(W(i,k)*(-1)^(n-i)*Stirling1(n,i)), where W(n,k) is the Worpitzky triangle A028246. - Vladimir Kruchinin, Apr 17 2015.
T(n,k) = [x^k] n!*[t^n](-log(1 + x*log(1 - t))). - Peter Luschny, Jul 10 2020
T(n,k) = Sum_{m=0..n-k} abs(Stirling1(n-1,m+k-1))*(k+m-1)!/m!. - Vladimir Kruchinin, Jul 14 2025

Extensions

a(11)-a(45) from Nathaniel Johnston, Apr 15 2011

A294032 Triangle read by rows, T(n, k) = Pochhammer(3, k)*Stirling2(3 + n, 3 + k) for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 6, 3, 25, 30, 12, 90, 195, 180, 60, 301, 1050, 1680, 1260, 360, 966, 5103, 12600, 15960, 10080, 2520, 3025, 23310, 83412, 158760, 166320, 90720, 20160, 9330, 102315, 510300, 1369620, 2116800, 1890000, 907200, 181440
Offset: 0

Views

Author

Peter Luschny, Oct 22 2017

Keywords

Examples

			Triangle starts:
[0]    1
[1]    6,      3
[2]   25,     30,     12
[3]   90,    195,    180,      60
[4]  301,   1050,   1680,    1260,     360
[5]  966,   5103,  12600,   15960,   10080,    2520
[6] 3025,  23310,  83412,  158760,  166320,   90720,  20160
[7] 9330, 102315, 510300, 1369620, 2116800, 1890000, 907200, 181440
		

Crossrefs

T(n, 0) = A000392(n+3), T(n, n) = A001710(n+2).
Row sums A002051(n+3), alternating row sums A000225(n+1).
Cf. A028246 (m=1), A053440 (m=2), this seq. (m=3), A293617 (hub).

Programs

  • Maple
    A294032 := (n, k) -> pochhammer(3, k)*Stirling2(n + 3, k + 3):
    seq(seq(A294032(n, k), k=0..n), n=0..7);
    T := (n, k) -> A293617(3, n, k): seq(seq(T(n, k), k=0..n), n=0..7);
  • Mathematica
    Table[Pochhammer[3, k] StirlingS2[3 + n, 3 + k], {n, 0, 7}, {k, 0, n}] // Flatten (* Michael De Vlieger, Oct 22 2017 *)
  • PARI
    for(n=0,10, for(k=0,n, print1((k+2)!*stirling(n+3,k+3,2)/2, ", "))) \\ G. C. Greubel, Nov 19 2017

Formula

E.g.f.: (1/2)*exp(x)*(2*y + 9*exp(2*x) + y^2+1-11*exp(3*x)*y + 15*y^2*exp(2*x) - 7*y^2*exp(x) - 13*y^2*exp(3*x) + 4*exp(4*x)*y^2 - 8*exp(x) + 24*y*exp(2*x) - 15*y*exp(x))/(1 - y*(exp(x) - 1))^3.
T(n, k) = A293617(3, n, k).

A298668 Number T(n,k) of set partitions of [n] into k blocks such that the absolute difference between least elements of consecutive blocks is always > 1; triangle T(n,k), n>=0, 0<=k<=ceiling(n/2), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 3, 0, 1, 7, 2, 0, 1, 15, 12, 0, 1, 31, 50, 6, 0, 1, 63, 180, 60, 0, 1, 127, 602, 390, 24, 0, 1, 255, 1932, 2100, 360, 0, 1, 511, 6050, 10206, 3360, 120, 0, 1, 1023, 18660, 46620, 25200, 2520, 0, 1, 2047, 57002, 204630, 166824, 31920, 720
Offset: 0

Views

Author

Alois P. Heinz, Jan 24 2018

Keywords

Examples

			T(5,1) = 1: 12345.
T(5,2) = 7: 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345.
T(5,3) = 2: 124|3|5, 12|34|5.
T(7,4) = 6: 1246|3|5|7, 124|36|5|7, 124|3|56|7, 126|34|5|7, 12|346|5|7, 12|34|56|7.
T(9,5) = 24: 12468|3|5|7|9, 1246|38|5|7|9, 1246|3|58|7|9, 1246|3|5|78|9, 1248|36|5|7|9, 124|368|5|7|9, 124|36|58|7|9, 124|36|5|78|9, 1248|3|56|7|9, 124|38|56|7|9, 124|3|568|7|9, 124|3|56|78|9, 1268|34|5|7|9, 126|348|5|7|9, 126|34|58|7|9, 126|34|5|78|9, 128|346|5|7|9, 12|3468|5|7|9, 12|346|58|7|9, 12|346|5|78|9, 128|34|56|7|9, 12|348|56|7|9, 12|34|568|7|9, 12|34|56|78|9.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1;
  0, 1,    1;
  0, 1,    3;
  0, 1,    7,     2;
  0, 1,   15,    12;
  0, 1,   31,    50,     6;
  0, 1,   63,   180,    60;
  0, 1,  127,   602,   390,    24;
  0, 1,  255,  1932,  2100,   360;
  0, 1,  511,  6050, 10206,  3360,  120;
  0, 1, 1023, 18660, 46620, 25200, 2520;
  ...
		

Crossrefs

Columns k=0-11 give (offsets may differ): A000007, A057427, A168604, A028243, A028244, A028245, A032180, A228909, A228910, A228911, A228912, A228913.
Row sums give A229046(n-1) for n>0.
T(2n+1,n+1) gives A000142.
T(2n,n) gives A001710(n+1).

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, x^m, add(
          b(n-1, max(m, j), `if`(j>m, 1, 0)), j=1..m+1-t))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..14);
    # second Maple program:
    T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), (k-1)!*Stirling2(n-k+1, k)):
    seq(seq(T(n, k), k=0..ceil(n/2)), n=0..14);
    # third Maple program:
    T:= proc(n, k) option remember; `if`(k<2, `if`(n=0 xor k=0, 0, 1),
          `if`(k>ceil(n/2), 0, add((k-j)*T(n-1-j, k-j), j=0..1)))
        end:
    seq(seq(T(n, k), k=0..ceil(n/2)), n=0..14);
  • Mathematica
    T[n_, k_] := T[n, k] = If[k < 2, If[Xor[n == 0, k == 0], 0, 1],
         If[k > Ceiling[n/2], 0, Sum[(k-j) T[n-1-j, k-j], {j, 0, 1}]]];
    Table[Table[T[n, k], {k, 0, Ceiling[n/2]}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Mar 08 2021, after third Maple program *)

Formula

T(n,k) = (k-1)! * Stirling2(n-k+1,k) for k>0, T(n,0) = A000007(n).
T(n,k) = Sum_{j=0..k-1} (-1)^j*C(k-1,j)*(k-j)^(n-k) for k>0, T(n,0) = A000007(n).
T(n,k) = (k-1)! * A136011(n,k) for n, k >= 1.
Sum_{j>=0} T(n+j,j) = A076726(n) = 2*A000670(n) = A000629(n) + A000007(n).

A054255 Triangle T(n,k) (n >= 1, 0<=k<=n) giving number of preferential arrangements of n things beginning with k (transposed, then read by rows).

Original entry on oeis.org

1, 1, 2, 2, 5, 6, 6, 18, 25, 26, 24, 84, 134, 149, 150, 120, 480, 870, 1050, 1081, 1082, 720, 3240, 6600, 8700, 9302, 9365, 9366, 5040, 25200, 57120, 82320, 92526, 94458, 94585, 94586, 40320, 221760, 554400, 871920, 1038744, 1085364, 1091414, 1091669, 1091670
Offset: 1

Views

Author

Eugene McDonnell (Eemcd(AT)aol.com), May 05 2000

Keywords

Comments

Can be generated from Stirling_2 triangle A008277 (cf. A028246, which is intermediate between the two arrays).

Examples

			   1;
   1,  2;
   2,  5,   6;
   6, 18,  25,  26;
  24, 84, 134, 149, 150;
  ...
		

Crossrefs

Row sums give A000670. First 3 rows are A000629, A002050 = A000629 - 1, 2*A002051 = (A000629 - 2^m) (m >= 0).
Cf. A090665 (triangle with rows reversed).

Extensions

More terms from James Sellers, May 05 2000
Previous Showing 41-50 of 63 results. Next