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

A054654 Triangle of Stirling numbers of 1st kind, S(n, n-k), n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 0, 1, -1, 0, 1, -3, 2, 0, 1, -6, 11, -6, 0, 1, -10, 35, -50, 24, 0, 1, -15, 85, -225, 274, -120, 0, 1, -21, 175, -735, 1624, -1764, 720, 0, 1, -28, 322, -1960, 6769, -13132, 13068, -5040, 0
Offset: 0

Views

Author

N. J. A. Sloane, Apr 18 2000

Keywords

Comments

Triangle is the matrix product of the binomial coefficients with the Stirling numbers of the first kind.
Triangle T(n,k) giving coefficients in expansion of n!*C(x,n) in powers of x. E.g., 3!*C(x,3) = x^3-3*x^2+2*x.
The matrix product of binomial coefficients with the Stirling numbers of the first kind results in the Stirling numbers of the first kind again, but the triangle is shifted by (1,1).
Essentially [1,0,1,0,1,0,1,0,...] DELTA [0,-1,-1,-2,-2,-3,-3,-4,-4,...] where DELTA is the operator defined in A084938; mirror image of the Stirling-1 triangle A048994. - Philippe Deléham, Dec 30 2006
From Doudou Kisabaka, Dec 18 2009: (Start)
The sum of the entries on each row of the triangle, starting on the 3rd row, equals 0. E.g., 1+(-3)+2+0 = 0.
The entries on the triangle can be computed as follows. T(n,r) = T(n-1,r) - (n-1)*T(n-1,r-1). T(n,r) = 0 when r equals 0 or r > n. T(n,r) = 1 if n==1. (End)

Examples

			Matrix begins:
  1, 0,  0,  0,  0,   0,    0,     0,      0, ...
  0, 1, -1,  2, -6,  24, -120,   720,  -5040, ...
  0, 0,  1, -3, 11, -50,  274, -1764,  13068, ...
  0, 0,  0,  1, -6,  35, -225,  1624, -13132, ...
  0, 0,  0,  0,  1, -10,   85,  -735,   6769, ...
  0, 0,  0,  0,  0,   1,  -15,   175,  -1960, ...
  0, 0,  0,  0,  0,   0,    1,   -21,    322, ...
  0, 0,  0,  0,  0,   0,    0,     1,    -28, ...
  0, 0,  0,  0,  0,   0,    0,     0,      1, ...
  ...
Triangle begins:
  1;
  1,   0;
  1,  -1,   0;
  1,  -3,   2,    0;
  1,  -6,  11,   -6,    0;
  1, -10,  35,  -50,   24,     0;
  1, -15,  85, -225,  274,  -120,   0;
  1, -21, 175, -735, 1624, -1764, 720, 0;
  ...
		

References

  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 18, table 18:6:1 at page 152.

Crossrefs

Essentially Stirling numbers of first kind, multiplied by factorials - see A008276.
The Stirling2 counterpart is A106800.

Programs

  • Haskell
    a054654 n k = a054654_tabl !! n !! k
    a054654_row n = a054654_tabl !! n
    a054654_tabl = map reverse a048994_tabl
    -- Reinhard Zumkeller, Mar 18 2014
  • Maple
    a054654_row := proc(n) local k; seq(coeff(expand((-1)^n*pochhammer (-x,n)),x,n-k),k=0..n) end: # Peter Luschny, Nov 28 2010
    seq(seq(Stirling1(n, n-k), k=0..n), n=0..8); # Peter Luschny, Feb 21 2021
  • Mathematica
    row[n_] := Reverse[ CoefficientList[ (-1)^n*Pochhammer[-x, n], x] ]; Flatten[ Table[ row[n], {n, 0, 8}]] (* Jean-François Alcover, Feb 16 2012, after Maple *)
    Table[StirlingS1[n,n-k],{n,0,10},{k,0,n}]//Flatten (* Harvey P. Dale, Jun 17 2023 *)
  • PARI
    T(n,k)=polcoeff(n!*binomial(x,n), n-k)
    

Formula

n!*binomial(x, n) = Sum_{k=0..n} T(n, k)*x^(n-k).
(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]:=stirling1(j,i) with i from 1 to d, j from 1 to d, d=9.
T(n, k) = (-1)^k*Sum_{j=0..k} E2(k, j)*binomial(n+j-1, 2*k), where E2(k, j) are the second-order Eulerian numbers A340556. - Peter Luschny, Feb 21 2021

Extensions

Additional comments from Thomas Wieder, Dec 29 2006
Edited by N. J. A. Sloane at the suggestion of Eric W. Weisstein, Jan 20 2008

A269939 Triangle read by rows, Ward numbers T(n, k) = Sum_{m=0..k} (-1)^(m + k) * binomial(n + k, n + m) * Stirling2(n + m, m), for n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 0, 1, 10, 15, 0, 1, 25, 105, 105, 0, 1, 56, 490, 1260, 945, 0, 1, 119, 1918, 9450, 17325, 10395, 0, 1, 246, 6825, 56980, 190575, 270270, 135135, 0, 1, 501, 22935, 302995, 1636635, 4099095, 4729725, 2027025
Offset: 0

Views

Author

Peter Luschny, Mar 26 2016

Keywords

Comments

We propose to call this sequence the 'Ward set numbers' and sequence A269940 the 'Ward cycle numbers'. - Peter Luschny, Nov 25 2022

Examples

			Triangle starts:
  1;
  0, 1;
  0, 1,   3;
  0, 1,  10,   15;
  0, 1,  25,  105,   105;
  0, 1,  56,  490,  1260,    945;
  0, 1, 119, 1918,  9450,  17325,  10395;
  0, 1, 246, 6825, 56980, 190575, 270270, 135135;
		

Crossrefs

Variants: A134991 (main entry for this triangle), A181996.
Row sums are A000311.
Alternating row sums are signed factorials A133942.
Cf. A269940 (Stirling1 counterpart), A268437.

Programs

  • Maple
    # first version
    A269939 := (n,k) -> add((-1)^(m+k)*binomial(n+k,n+m)*Stirling2(n+m, m), m=0..k):
    seq(seq(A269939(n,k), k=0..n), n=0..8);
    # Alternatively:
    T := proc(n,k) option remember;
        `if`(k=0 and n=0, 1,
        `if`(k<=0 or k>n, 0,
        k*T(n-1,k)+(n+k-1)*T(n-1,k-1))) end:
    for n from 0 to 6 do seq(T(n,k),k=0..n) od;
    # simple, third version
    T := (n,k)->  (n+k)!*coeftayl((exp(z)-z-1)^k/k!, z=0, n+k); # Marko Riedel, Apr 14 2016
  • Mathematica
    Table[Sum[(-1)^(m + k) Binomial[n + k, n + m] StirlingS2[n + m, m], {m, 0, k}], {n, 0, 8}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 15 2016 *)
  • PARI
    T(n) = {[Vecrev(Pol(p)) | p<-Vec(serlaplace(1/((1+y)*(1 + lambertw(-y/(1+y)*exp((x-y)/(1+y) + O(x*x^n)))))))]}
    { my(A=T(8)); for(n=1, #A, print(A[n])) } \\ Andrew Howroyd, Jan 14 2022
  • Sage
    T = lambda n,k: sum((-1)^(m+k)*binomial(n+k,n+m)*stirling_number2(n+m,m) for m in (0..k))
    for n in (0..6): print([T(n,k) for k in (0..n)])
    
  • Sage
    # uses[PtransMatrix from A269941]
    PtransMatrix(8, lambda n: 1/(n+1), lambda n, k: (-1)^k*falling_factorial(n+k,n))
    

Formula

T(n,k) = (-1)^k*FF(n+k,n)*P[n,k](1/(n+1)) where P is the P-transform and FF the falling factorial function. For the definition of the P-transform see the link.
T(n,k) = A268437(n,k)*FF(n+k,n)/(2*n)!.
T(n,k) = (n+k)! [z^{n+k}] (exp(z)-z-1)^k/k!. - Marko Riedel, Apr 14 2016
From Fabián Pereyra, Jan 12 2022: (Start)
T(n,k) = k*T(n-1,k) + (n+k-1)*T(n-1,k-1) for n > 0, T(0,0) = 1, T(n,0) = 0 for n > 0. (See the second Maple program.)
E.g.f.: A(x,t) = 1/((1+t)*(1 + W(-t/(1+t)*exp((x-t)/(1+t))))), where W(x) is the Lambert W-function.
T(n,k) = Sum_{j=0..k} E2(n,j)*binomial(n-j,k-j), where E2(n,k) are the second-order Eulerian numbers A340556.
T(n,k) = Sum_{j=k..n} (-1)^(n-j)*A112486(n,j)*binomial(j,k). (End)

A001662 Coefficients of Airey's converging factor.

Original entry on oeis.org

0, 1, 1, -1, -1, 13, -47, -73, 2447, -16811, -15551, 1726511, -18994849, 10979677, 2983409137, -48421103257, 135002366063, 10125320047141, -232033147779359, 1305952009204319, 58740282660173759, -1862057132555380307, 16905219421196907793, 527257187244811805207
Offset: 0

Views

Author

Keywords

Comments

A051711 times the coefficient in expansion of W(exp(x)) about x=1, where W is the Lambert function. - Paolo Bonzini, Jun 22 2016
The polynomials with coefficients in triangle A008517, evaluated at -1.

Examples

			G.f. = x + x^2 - x^3 - x^4 + 13*x^5 - 47*x^6 - 73*x^7 + 2447*x^8 + ... - _Michael Somos_, Jun 23 2019
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(combinat); A001662 := proc(n) add((-1)^k*eulerian2(n-1,k),k=0..n-1) end:
    seq(A001662(i),i=0..23); # Peter Luschny, Nov 13 2012
  • Mathematica
    a[0] = 0; a[n_] := Sum[ (n+k-1)! * Sum[ (-1)^j/(k-j)! * Sum[ 1/i! * StirlingS1[n-i+j-1, j-i] / (n-i+j-1)!, {i, 0, j}] * 2^(n-j-1), {j, 0, k}], {k, 0, n-1}]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jul 26 2013, after Vladimir Kruchinin *)
    a[ n_] := If[ n < 1, 0, 2^(n - 1) Sum[ (-2)^-j StirlingS1[n - i + j - 1, j - i] Binomial[n + k - 1, n + j - 1] Binomial[n + j - 1, i], {k, 0, n - 1}, {j, 0, k}, {i, 0, j}]]; (* Michael Somos, Jun 23 2019 *)
    len := 12; gf := (1/2) (LambertW[Exp[x + 1]] - 1);
    ser := Series[gf, { x, 0, len}]; norm := Table[n! 4^n, {n, 0, len}];
    CoefficientList[ser, x] * norm (* Peter Luschny, Jun 24 2019 *)
  • Maxima
    a(n):= if n=0 then 1 else (sum((n+k-1)!*sum(((-1)^(j)/(k-j)!*sum((1/i! *stirling1(n-i+j-1, j-i))/(n-i+j-1)!, i, 0, j))*2^(n-j-1), j, 0, k), k, 0, n-1)); /* Vladimir Kruchinin, Nov 11 2012 */
  • SageMath
    @CachedFunction
    def eulerian2(n, k):
        if k==0: return 1
        elif k==n: return 0
        return eulerian2(n-1, k)*(k+1)+eulerian2(n-1, k-1)*(2*n-k-1)
    def A001662(n): return add((-1)^k*eulerian2(n-1,k) for k in (0..n-1))
    [A001662(m) for m in (0..23)] # Peter Luschny, Nov 13 2012
    

Formula

Let b(n) = 0, 1, -1, 1, 1, -13,.. be the sequence with all signs but one reversed: b(1)=a(1), b(n)=-a(n) for n<>1. Define the e.g.f. B(x) = 2*Sum_{n>=0} b(n)*(x/2)^n/n!. B(x) satisfies exp(B(x)) = 1 + 2*x - B(x). [Bernstein/Sloane S52]
Similarly, c(0)=1, c(n)=-a(n+1) are the alternating row sums of the second-order Eulerian numbers A340556, or c(n) = E2poly(n,-1). - Peter Luschny, Feb 13 2021
a(n) = Sum_{k=0..n-1} (n+k-1)!*Sum_{j=0..k} ((-1)^j/(k-j)!)*Sum_{i=0..j} ((1/i!)*Stirling1(n-i+j-1,j-i)/(n-i+j-1)!)*2^(n-j-1), n > 0, a(0)=1. - Vladimir Kruchinin, Nov 11 2012
From Sergei N. Gladkovskii, Nov 24 2012, Aug 22 2013: (Start)
Continued fractions:
G.f.: 2*x - x/G(0) where G(k) = 1 - 2*x*k + x*(k+1)/G(k+1).
G.f.: 2*x - 2*x/U(0) where U(k) = 1 + 1/(1 - 4*x*(k+1)/U(k+1)).
G.f.: A(x) = x/G(0) where G(k) = 1 - 2*x*(k+1) + x*(k+1)/G(k+1).
G.f.: 2*x - x*W(0) where W(k) = 1 + x*(2*k+1)/( x*(2*k+1) + 1/(1 + x*(2*k+2)/( x*(2*k+2) + 1/W(k+1)))). (End)
a(n) = 4^n * Sum_{i=1..n} Stirling2(n,i)*A013703(i)/2^(2*i+1). - Paolo Bonzini, Jun 23 2016
E.g.f.: 1/2*(LambertW(exp(4*x+1))-1). - Vladimir Kruchinin, Feb 18 2018
a(0) = 0; a(1) = 1; a(n) = 2 * a(n-1) - Sum_{k=1..n-1} binomial(n-1,k) * a(k) * a(n-k). - Ilya Gutkovskiy, Aug 28 2020

Extensions

More terms from James Sellers, Dec 07 1999
Reverted to converging factors definition by Paolo Bonzini, Jun 23 2016

A106800 Triangle of Stirling numbers of 2nd kind, S(n, n-k), n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 6, 7, 1, 0, 1, 10, 25, 15, 1, 0, 1, 15, 65, 90, 31, 1, 0, 1, 21, 140, 350, 301, 63, 1, 0, 1, 28, 266, 1050, 1701, 966, 127, 1, 0, 1, 36, 462, 2646, 6951, 7770, 3025, 255, 1, 0, 1, 45, 750, 5880, 22827, 42525, 34105, 9330, 511, 1, 0
Offset: 0

Views

Author

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows, given by [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...] DELTA [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, May 19 2005

Examples

			From _Gheorghe Coserea_, Jan 30 2017: (Start)
Triangle starts:
  n\k  [0]  [1]   [2]    [3]    [4]    [5]    [6]   [7] [8] [9]
  [0]   1;
  [1]   1,   0;
  [2]   1,   1,    0;
  [3]   1,   3,    1,     0;
  [4]   1,   6,    7,     1,     0;
  [5]   1,  10,   25,    15,     1,     0;
  [6]   1,  15,   65,    90,    31,     1,     0;
  [7]   1,  21,  140,   350,   301,    63,     1,    0;
  [8]   1,  28,  266,  1050,  1701,   966,   127,    1,  0;
  [9]   1,  36,  462,  2646,  6951,  7770,  3025,  255,  1,  0;
  ...
(End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 835.
  • F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 223.
  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 2, table 2.14.1 at page 24.

Crossrefs

See A008277 and A048993, which are the main entries for this triangle of numbers.
The Stirling1 counterpart is A054654.
Row sum: A000110.
Column 0: A000012.
Column 1: A000217.
Main Diagonal: A000007.
1st minor diagonal: A000012.
2nd minor diagonal: A000225.
3rd minor diagonal: A000392.

Programs

  • Maple
    seq(seq(Stirling2(n, n-k), k=0..n), n=0..8); # Peter Luschny, Feb 21 2021
  • Mathematica
    Table[ StirlingS2[n, m], {n, 0, 10}, {m, n, 0, -1}]//Flatten (* Robert G. Wilson v, Jan 30 2017 *)
  • PARI
    N=11; x='x+O('x^N); t='t; concat(apply(p->Vec(p), Vec(serlaplace(exp(t*(exp(x)-1))))))  \\ Gheorghe Coserea, Jan 30 2017
    {T(n, k) = my(A, B); if( n<0 || k>n, 0, A = B = exp(x + x * O(x^n)); for(i=1, n, A = x * A'); polcoeff(A / B, n-k))}; /* Michael Somos, Aug 16 2017 */
    
  • Sage
    flatten([[stirling_number2(n, n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 11 2021

Formula

A(x;t) = exp(t*(exp(x)-1)) = Sum_{n>=0} P_n(t) * x^n/n!, where P_n(t) = Sum_{k=0..n} T(n,k)*t^(n-k). - Gheorghe Coserea, Jan 30 2017
Also, P_n(t) * exp(t) = (t * d/dt)^n exp(t). - Michael Somos, Aug 16 2017
T(n, k) = Sum_{j=0..k} E2(k, j)*binomial(n + k - j, 2*k), where E2(k, j) are the second-order Eulerian numbers A340556. - Peter Luschny, Feb 21 2021

A342312 T(n, k) = ((2*n + 1)/2)*Sum_{j, k, n} (-1)^(k + j)*(n + j)*binomial(2*n, n - j)* Stirling2(n - k + j, 1 - k + j) with T(0, 0) = 1. Triangle read by row, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 3, 0, 0, 10, 0, 0, -42, 21, 0, 0, 216, -288, 36, 0, 0, -1320, 3190, -1210, 55, 0, 0, 9360, -34632, 25584, -4056, 78, 0, 0, -75600, 389340, -462000, 152460, -11970, 105, 0, 0, 685440, -4621824, 7907040, -4368320, 762960, -32640, 136
Offset: 0

Views

Author

Peter Luschny, Mar 08 2021

Keywords

Comments

The triangle can be seen as representing the numerators of a sequence of rational polynomials. Let p_{n}(x) = Sum_{k=0..n} (T(n, k)/A342313(n, k))*x^k. Then p_{n}(1) = B_{n}(1), where B_{n}(x) are the Bernoulli polynomials.

Examples

			The triangle starts:
  [0] 1
  [1] 0, 3
  [2] 0, 0,    10
  [3] 0, 0,   -42,     21
  [4] 0, 0,   216,   -288,    36
  [5] 0, 0, -1320,   3190, -1210,    55
  [6] 0, 0,  9360, -34632, 25584, -4056, 78
The first few polynomials are P(n, k) = T(n, k) / A342313(n, k):
  1;
  0, 1/2;
  0,  0,  1/6;
  0,  0, -1/10,   1/10;
  0,  0,  3/35,  -4/21,   1/14;
  0,  0, -2/21,  29/84, -11/36,    1/18;
  0,  0, 10/77, -37/55, 164/165, -26/55, 1/22;
		

Crossrefs

Cf. A014105 (main diagonal), A342313 (denominators), A340556.

Programs

  • Maple
    T := (n, k) -> `if`(n = 0 and k = 0, 1, (n+1/2)*
    add((-1)^j*(n+k+j)*binomial(2*n, n-k-j)*Stirling2(n + j, j + 1) , j= 0..n-k)):
    seq(print(seq(T(n, k), k=0..n)), n=0..6);
  • Mathematica
    T[0, 0] := 1; T[n_, k_] := ((2n + 1)/2) Sum[(-1)^(k+j)(n+j) Binomial[2n, n-j] StirlingS2[n-k+j, 1-k+j], {j, k, n}];
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten

Formula

T(n, k) = numerator([x^k] p(n, x)) for n >= 2, where p(n, x) = (1/2)*Sum_{k=0..n-1} (-1)^k*x^(n-k)*E2(n - 1, k + 1) / binomial(2*n - 1, k + 1) and E2(n,k) denotes the second-order Eulerian numbers A340556.
Another representation of the polynomials for n >= 2 is p(n, x) = (1/2)*Sum_{k=0..n} x^k*Sum_{j=k..n} ((-1)^(j + k)*((n - k + 1)!*(n + k - 2)!)/((j + n - 1)!*(n - j)!))*Stirling2(n - k + j, j - k + 1).

A341102 T(n, k) = [n, k] - {n, k}, where [n, k] are the (unsigned) Stirling cycle numbers and {n, k} the Stirling set numbers. Table T(n, k) read by rows, for n >= 3 and 1 <= k <= n-2.

Original entry on oeis.org

1, 5, 4, 23, 35, 10, 119, 243, 135, 20, 719, 1701, 1323, 385, 35, 5039, 12941, 12166, 5068, 910, 56, 40319, 109329, 115099, 59514, 15498, 1890, 84, 362879, 1026065, 1163370, 689575, 226800, 40446, 3570, 120, 3628799, 10627617, 12725075, 8263750, 3170200, 722568, 93786, 6270, 165
Offset: 3

Views

Author

Peter Luschny, Feb 24 2021

Keywords

Examples

			Triangle starts:
[ 3] [1]
[ 4] [5,      4]
[ 5] [23,     35,      10]
[ 6] [119,    243,     135,     20]
[ 7] [719,    1701,    1323,    385,    35]
[ 8] [5039,   12941,   12166,   5068,   910,    56]
[ 9] [40319,  109329,  115099,  59514,  15498,  1890,  84]
[10] [362879, 1026065, 1163370, 689575, 226800, 40446, 3570, 120]
		

Crossrefs

Programs

  • Maple
    # Giving full rows for n >= 0:
    gf := (1 - z)^(-x) - exp(x*(exp(z) - 1));
    ser := series(gf, z, 20): coeffz := n -> coeff(ser,z,n):
    A341102row := n -> seq(n!*coeff(coeffz(n), x, k), k=0..n):
    for n from 0 to 9 do A341102row(n) od;
  • PARI
    T(n,k) = abs(stirling(n,k,1)) - stirling(n,k,2); \\ Michel Marcus, Feb 24 2021
  • SageMath
    for n in (3..11):
        print([stirling_number1(n, k) - stirling_number2(n, k) for k in (1..n-2)])
    

Formula

T(n, k) = Sum_{j=0..k} (binomial(n+j-1, 2*k) - binomial(n+k-j, 2*k))*A340556(k, j).
E.g.f.: (1 - z)^(-x) - exp(x*(exp(z) - 1)) (unrestricted rows and n >= 0).
Previous Showing 11-16 of 16 results.