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

A269957 Triangle read by rows, T(n,k) = Sum_{j=k..n} A269940(n,j)*A269939(j,k), for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 5, 9, 0, 41, 210, 225, 0, 469, 5115, 14175, 11025, 0, 6889, 142492, 763350, 1455300, 893025, 0, 123605, 4566149, 41943090, 146522250, 212837625, 108056025, 0, 2620169, 166939742, 2462128095, 13973628900, 35936814375, 42141849750, 18261468225
Offset: 0

Views

Author

Peter Luschny, Mar 27 2016

Keywords

Examples

			Triangle starts:
[1]
[0, 1]
[0, 5, 9]
[0, 41, 210, 225]
[0, 469, 5115, 14175, 11025]
[0, 6889, 142492, 763350, 1455300, 893025]
		

Crossrefs

Programs

  • Sage
    F = lambda n,k,f: sum((-1)^(m+k)*binomial(n+k,n+m)*f(n+m,m) for m in (0..k))
    T = lambda n,k: sum(F(n, j, stirling_number1)*F(j, k, stirling_number2) for j in (k..n))
    for n in (0..6): print([T(n, k) for k in (0..n)])

Formula

T(n,n) = A001818(n).
T(n,1) = A032188(n+1) for n>=1.

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)

A268438 Triangle read by rows, T(n,k) = (-1)^k*(2*n)!*P[n,k](n/(n+1)) where P is the P-transform, for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 8, 6, 0, 180, 240, 90, 0, 8064, 14560, 10080, 2520, 0, 604800, 1330560, 1285200, 604800, 113400, 0, 68428800, 173638080, 209341440, 139708800, 49896000, 7484400, 0, 10897286400, 30858347520, 43770767040, 36970053120, 18918900000, 5448643200, 681080400
Offset: 0

Views

Author

Peter Luschny, Mar 07 2016

Keywords

Comments

The P-transform is defined in the link. Compare also the Sage and Maple implementations below.

Examples

			Triangle starts:
[1],
[0, 1],
[0, 8,        6],
[0, 180,      240,       90],
[0, 8064,     14560,     10080,     2520],
[0, 604800,   1330560,   1285200,   604800,    113400],
[0, 68428800, 173638080, 209341440, 139708800, 49896000, 7484400].
		

Crossrefs

Programs

  • Maple
    A268438 := proc(n,k) local F,T;
      F := proc(n,k) option remember;
      `if`(n=0 and k=0, 1,`if`(n=k, (4*n-2)*F(n-1,k-1),
      F(n-1,k)*(n+k))) end;
      T := proc(n, k) option remember;
      `if`(k=0 and n=0, 1,`if`(k<=0 or k>n, 0,
      (4*n-2)*n*(n+k-1)*(T(n-1,k)+T(n-1,k-1)))) end:
    T(n,k)/F(n,k) end:
    for n from 0 to 6 do seq(A268438(n,k), k=0..n) od;
    # Alternatively, with the function PTrans defined in A269941:
    A268438_row := n -> PTrans(n, n->n/(n+1),(n,k)->(-1)^k*(2*n)!):
    seq(lprint(A268438_row(n)), n=0..8);
  • Mathematica
    T[n_, k_] := (2n)!/FactorialPower[n+k, n] Sum[(-1)^(m+k) Binomial[n+k, n+m] Abs[StirlingS1[n+m, m]], {m, 0, k}];
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] (* Jean-François Alcover, Jun 15 2019 *)
  • Sage
    A268438 = lambda n,k: (factorial(2*n)/falling_factorial(n+k,n))*sum((-1)^(m+k)* binomial(n+k,n+m)*stirling_number1(n+m,m) for m in (0..k))
    for n in (0..7): print([A268438(n,m) for m in (0..n)])
    
  • Sage
    # uses[PtransMatrix from A269941]
    PtransMatrix(7, lambda n: n/(n+1), lambda n,k: (-1)^k*factorial(2*n))

Formula

T(n,k) = ((2*n)!/FF(n+k,n))*Sum_{m=0..k}(-1)^(m+k)*C(n+k,n+m)*Stirling1(n+m,m) where FF denotes the falling factorial function.
T(n,k) = ((2*n)!/FF(n+k,n))*A269940(n,k).
T(n,1) = (2*n)!/(n+1) = A060593(n) for n>=1.
T(n,n) = (2*n)!/2^n = A000680(n) for n>=0.

A118788 Triangle where T(n,k) = n!/(n-k)!*[x^k] ( x/(2*x + log(1-x)) )^(n+1), for n>=k>=0, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 5, 1, 6, 23, 41, 1, 10, 65, 255, 469, 1, 15, 145, 930, 3679, 6889, 1, 21, 280, 2590, 16429, 65247, 123605, 1, 28, 490, 6090, 54789, 344694, 1371887, 2620169, 1, 36, 798, 12726, 151599, 1338330, 8367785, 33347535, 64074901, 1, 45, 1230, 24360
Offset: 0

Views

Author

Paul D. Hanna, Apr 29 2006

Keywords

Comments

Row sums are A118789, where Sum_{n>=0} A118789(n)*x^n/n! = exp( Sum_{n>=1} A032188(n)*x^n/n! ).
Main diagonal is A032188(n) = number of labeled series-reduced mobiles (circular rooted trees) with n leaves.
Secondary diagonal is A118790.

Examples

			Row sums e.g.f. equals the exponential of the diagonal e.g.f.:
1 + x + 2*x^2/2! + 9*x^3/3! + 71*x^4/4! +...+ A118789(n)*x^n/n! +...
= exp(x + x^2/2! + 5*x^3/3! + 41*x^4/4! +...+ A032188(n)*x^n/n! +...).
Triangle begins:
  1;
  1, 1;
  1, 3, 5;
  1, 6, 23, 41;
  1, 10, 65, 255, 469;
  1, 15, 145, 930, 3679, 6889;
  1, 21, 280, 2590, 16429, 65247, 123605;
  1, 28, 490, 6090, 54789, 344694, 1371887, 2620169;
  1, 36, 798, 12726, 151599, 1338330, 8367785, 33347535, 64074901;
  ...
Triangle is formed from powers of F(x) = x/(2*x + log(1-x)):
  F(x)^1 = (1) + 1/2*x + 7/12*x^2 + 17/24*x^3 + 629/720*x^4 +...
  F(x)^2 = (1 + x) + 17/12*x^2 + 2*x^3 + 671/240*x^4 +...
  F(x)^3 = (1 + 3/2*x + 5/2*x^2) + 4*x^3 + 1489/240*x^4 +...
  F(x)^4 = (1 + 6/3*x + 23/6*x^2 + 41/6*x^3) + 8351/720*x^4 +...
  F(x)^5 = (1 + 10/4*x + 65/12*x^2 + 255/24*x^3 + 469/24*x^4) +...
		

Crossrefs

Third column is A241765.

Programs

  • PARI
    {T(n,k)=local(x=X+X^2*O(X^(k+2)));n!/(n-k)!*polcoeff((x/(2*x+log(1-x)))^(n+1),k,X)}

Formula

Main diagonal has e.g.f.: series_reversion[2*x+log(1-x)].
Conjecture: T(n,k) = Sum_{j=0..k} binomial(n+j, n-k)*A269940(k, j) for 0 <= k <= n. - Mikhail Kurkov, Feb 17 2025

A268440 Triangle read by rows, T(n,k) = C(2*n,n+k)*Sum_{m=0..k} (-1)^(m+k)*C(n+k,n+m)* Stirling1(n+m,m), for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 8, 3, 0, 90, 120, 15, 0, 1344, 3640, 1680, 105, 0, 25200, 110880, 107100, 25200, 945, 0, 570240, 3617460, 5815040, 2910600, 415800, 10395, 0, 15135120, 128576448, 303963660, 256736480, 78828750, 7567560, 135135
Offset: 0

Views

Author

Peter Luschny, Mar 08 2016

Keywords

Examples

			[1]
[0, 1]
[0, 8, 3]
[0, 90, 120, 15]
[0, 1344, 3640, 1680, 105]
[0, 25200, 110880, 107100, 25200, 945]
[0, 570240, 3617460, 5815040, 2910600, 415800, 10395]
		

Crossrefs

Programs

  • Maple
    # The function PTrans is defined in A269941.
    A268440_row := n -> PTrans(n, n->n/(n+1), (n,k) -> (-1)^k*(2*n)!/(k!*(n-k)!)):
    seq(print(A268440_row(n)), n=0..8);
  • Sage
    A268440 = lambda n, k: binomial(2*n,n+k)*sum((-1)^(m+k)*binomial(n+k,n+m)* stirling_number1(n+m, m) for m in (0..k))
    for n in (0..7): print([A268440(n, m) for m in (0..n)])
    
  • Sage
    # uses[PtransMatrix from A269941]
    # Alternatively
    PtransMatrix(7, lambda n: n/(n+1), lambda n,k: (-1)^k*factorial(2*n)/ (factorial(k)*factorial(n-k)))

Formula

T(n,k) = ((-1)^k*(2*n)!/(k!*(n-k)!))*P[n,k](n/(n+1)) where P is the P-transform. The P-transform is defined in the link.
T(n,k) = A269940*binomial(2*n,n+k).
T(n,k) = A268438(n,k)/(k!*(n-k)!).
T(n,1) = n*(2*n)!/(n+1)! for n>=1 (cf. A092956).
T(n,n) = (2*n-1)!! = A001147(n) for n>=0.

A358622 Regular triangle read by rows. T(n, k) = [[n, k]], where [[n, k]] are the second order Stirling cycle numbers (or second order reciprocal Stirling numbers). T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 6, 3, 0, 0, 0, 24, 20, 0, 0, 0, 0, 120, 130, 15, 0, 0, 0, 0, 720, 924, 210, 0, 0, 0, 0, 0, 5040, 7308, 2380, 105, 0, 0, 0, 0, 0, 40320, 64224, 26432, 2520, 0, 0, 0, 0, 0, 0, 362880, 623376, 303660, 44100, 945, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Peter Luschny, Nov 23 2022

Keywords

Comments

[[n, k]] are the number of permutations of an n-set having at least two elements in each orbit. These permutations have no fixed points and therefore [[n, k]] is the number of k-orbit derangements of an n-set. This is the definition and notation (doubling the stacked delimiters of the Stirling cycle numbers) as given by Fekete (see link).
The formal definition expresses the second order Stirling cycle numbers as a binomial sum over second order Eulerian numbers (see the first formula below). The terminology 'associated Stirling numbers of first kind' used elsewhere should be dropped in favor of the more systematic one used here.
Also the Bell transform of the factorial numbers with 0! = 0. For the definition of the Bell transform see A264428.

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0,     0;
[2] 0,     1,     0;
[3] 0,     2,     0,     0;
[4] 0,     6,     3,     0,    0;
[5] 0,    24,    20,     0,    0,  0;
[6] 0,   120,   130,    15,    0,  0,  0;
[7] 0,   720,   924,   210,    0,  0,  0,  0;
[8] 0,  5040,  7308,  2380,  105,  0,  0,  0,  0;
[9] 0, 40320, 64224, 26432, 2520,  0,  0,  0,  0,  0;
		

References

  • Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, Addison-Wesley, Reading, 2nd ed. 1994, thirty-fourth printing 2022.

Crossrefs

A008306 is an irregular subtriangle with more information.
Cf. A000166 (row sums), A024000 (alternating row sums).

Programs

  • Maple
    P := (n, x) -> (-x)^n*hypergeom([-n, x], [], 1/x):
    row := n -> seq(coeff(simplify(P(n, x)), x, k), k = 0..n):
    for n from 0 to 9 do row(n) od;
    # Alternative:
    T := (n, k) -> add(binomial(n, k - j)*abs(Stirling1(n - k + j, j))*(-1)^(k - j), j =  0..k): for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Using the e.g.f.:
    egf := (exp(t)*(1 - t))^(-z): ser := series(egf, t, 12):
    seq(print(seq(n!*coeff(coeff(ser, t, n), z, k), k=0..n)), n = 0..9);
    # Using second order Eulerian numbers:
    A358622 := proc(n, k) local j;
    add(binomial(j, n - 2*k)*combinat:-eulerian2(n - k, j), j = 0..n-k) end:
    seq(seq(A358622(n, k), k = 0..n), n = 0..12);
    # Using generalized Laguerre polynomials:
    P := (n, x) -> (-1)^n*n!*LaguerreL(n, -n - x, -x):
    row := n -> seq(coeff(simplify(P(n, x)), x, k), k = 0..n):
    seq(print(row(n)), n = 0..9);
  • Python
    # recursion over rows
    from functools import cache
    @cache
    def StirlingCycleOrd2(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [0, 0]
        rov: list[int] = StirlingCycleOrd2(n - 2)
        row: list[int] = StirlingCycleOrd2(n - 1) + [0]
        for k in range(1, n // 2 + 1):
            row[k] = (n - 1) * (rov[k - 1] + row[k])
        return row
    for n in range(9): print(StirlingCycleOrd2(n))
    # Alternative, using function BellMatrix from A264428.
    from math import factorial
    def f(k: int) -> int:
        return factorial(k) if k > 0 else 0
    print(BellMatrix(f, 9))

Formula

T(n, k) = Sum_{j=0..n-k} binomial(j, n - 2*k)*<>, where <> denote the second order Eulerian numbers (extending Knuth's notation).
T(n, k) = [x^n] (-x)^n * hypergeom([-n, x], [], -1/x).
T(n, k) = n!*[z^k][t^n] (exp(t)*(1 - t))^(-z). (Compare with (exp(t)/(1 - t))^z, which is the e.g.f. of the Sylvester polynomials A341101.)
T(n, k) = [x^k] (-1)^n * n! * L(n, -x - n, -x), where L(n, a, x) is the n-th generalized Laguerre polynomial.
T(n, k) = Sum_{j=0..k} binomial(n, k - j)*[n - k + j, j]*(-1)^(k - j), where [n, k] denotes the (signless) Stirling cycle numbers.
T(n, k) = (n - 1) * (T(n-2, k-1) + T(n-1, k)) with suitable boundary conditions.
T(n + k, k) = A269940(n, k), which might be called the Ward cycle numbers.
Showing 1-6 of 6 results.