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

A269944 Triangle read by rows, Stirling cycle numbers of order 2, T(n, n) = 1, T(n, k) = 0 if k < 0 or k > n, otherwise T(n, k) = T(n-1, k-1) + (n-1)^2*T(n-1, k), for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 5, 1, 0, 36, 49, 14, 1, 0, 576, 820, 273, 30, 1, 0, 14400, 21076, 7645, 1023, 55, 1, 0, 518400, 773136, 296296, 44473, 3003, 91, 1, 0, 25401600, 38402064, 15291640, 2475473, 191620, 7462, 140, 1
Offset: 0

Views

Author

Peter Luschny, Mar 22 2016

Keywords

Comments

Also known as central factorial numbers |t(2*n, 2*k)| (cf. A008955).
The analog for the Stirling set numbers is A269945.

Examples

			Triangle starts:
  [1]
  [0,     1]
  [0,     1,     1]
  [0,     4,     5,    1]
  [0,    36,    49,   14,    1]
  [0,   576,   820,  273,   30,  1]
  [0, 14400, 21076, 7645, 1023, 55, 1]
		

Crossrefs

Variants: A204579 (signed, row 0 missing), A008955.
Cf. A007318 (order 0), A132393 (order 1), A269947 (order 3).
Cf. A000330 (subdiagonal), A001044 (column 1), A101686 (row sums), A269945 (Stirling set), A269941 (P-transform).

Programs

  • Maple
    T := proc(n, k) option remember; if n=k then return 1 fi; if k<0 or k>n then return 0 fi; T(n-1, k-1)+(n-1)^2*T(n-1, k) end: seq(seq(T(n, k), k=0..n), n=0..8);
    # Alternatively with the P-transform (cf. A269941):
    A269944_row := n -> PTrans(n, n->`if`(n=1, 1, (n-1)^2/(n*(4*n-2))), (n,k)->(-1)^k*(2*n)!/(2*k)!): seq(print(A269944_row(n)), n=0..8);
    # From Peter Luschny, Feb 29 2024: (Start)
    # Computed as the coefficients of polynomials:
    P := (x, n) -> local j; mul((j - x)*(j + x), j = 0..n-1):
    T := (n, k) -> (-1)^k*coeff(P(x, n), x, 2*k):
    for n from 0 to 6 do seq(T(n, k), k = 0..n) od;
    # Alternative, using the exponential generating function:
    egf := cosh(2*arcsin(sqrt(t)*x/2)/sqrt(t)):
    ser := series(egf, x, 20): cx := n -> coeff(ser, x, 2*n):
    Trow := n -> local k; seq((2*n)!*coeff(cx(n), t, n-k), k = 0..n):
    seq(print(Trow(n)), n = 0..9);  # (End)
    # Alternative, row polynomials:
    rowpoly := n -> pochhammer(-sqrt(x), n) * pochhammer(sqrt(x), n):
    row := n -> local k; seq((-1)^k*coeff(expand(rowpoly(n)), x, k), k = 0..n):
    seq(print(row(n)), n = 0..6);  # Peter Luschny, Aug 03 2024
  • Mathematica
    T[n_, n_] = 1; T[n_, k_] /; 0 <= k <= n := T[n, k] = T[n - 1, k - 1] + (n - 1)^2*T[n - 1, k]; T[, ] = 0; Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten
    (* Jean-François Alcover, Jul 25 2019 *)
  • Sage
    stircycle2 = lambda n: 1 if n == 1 else (n-1)^2/(n*(4*n-2))
    norm = lambda n,k: (-1)^k*factorial(2*n)/factorial(2*k)
    M = PtransMatrix(7, stircycle2, norm)
    for m in M: print(m)

Formula

T(n,k) = (-1)^k*((2*n)! / (2*k)!)*P[n, k](s(n)) where P is the P-transform and s(n) = (n - 1)^2 / (n*(4*n - 2)). The P-transform is defined in the link. See the Sage and Maple implementations below.
T(n, 1) = ((n - 1)!)^2 for n >= 1 (cf. A001044).
T(n, n-1) = n*(n - 1)*(2*n - 1)/6 for n >= 1 (cf. A000330).
Row sums: Product_{k=1..n} ((k - 1)^2 + 1) for n >= 0 (cf. A101686).
From Fabián Pereyra, Apr 25 2022: (Start)
T(n,k) = (-1)^(n-k)*Sum_{j=2*k..2*n} Stirling1(2*n,j)*binomial(j,2*k)*(n-1)^(j-2*k).
T(n,k) = Sum_{j=0..2*k} (-1)^(j - k)*Stirling1(n, j)*Stirling1(n, 2*k - j). (End)
From Peter Luschny, Feb 29 2024: (Start)
T(n, k) = (-1)^k*[x^(2*k)] P(x, n) where P(x, n) = Product_{j=0..n-1} (j-x)*(j+x).
T(n, k) = (2*n)!*[t^(n-k)] [x^(2*n)] cosh(2*arcsin(sqrt(t)*x/2)/sqrt(t)). (End)
T(n, k) = (-1)^k*[x^k] Pochhammer(-sqrt(x), n) * Pochhammer(sqrt(x), n). - Peter Luschny, Aug 03 2024

A370707 Triangle read by rows: T(n, k) = (-1)^k*Product_{j=0..k-1} (j - n)*(j + n), for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 4, 12, 1, 9, 72, 360, 1, 16, 240, 2880, 20160, 1, 25, 600, 12600, 201600, 1814400, 1, 36, 1260, 40320, 1088640, 21772800, 239500800, 1, 49, 2352, 105840, 4233600, 139708800, 3353011200, 43589145600, 1, 64, 4032, 241920, 13305600, 638668800, 24908083200, 697426329600, 10461394944000
Offset: 0

Views

Author

Peter Luschny, Feb 27 2024

Keywords

Comments

The definition, and also the representation T(n, k) = ff(n, k) * rf(n, k) (see the first formula), makes it natural to call this triangle the central factorial numbers.

Examples

			Triangle starts:
  [0] 1;
  [1] 1,  1;
  [2] 1,  4,   12;
  [3] 1,  9,   72,    360;
  [4] 1, 16,  240,   2880,   20160;
  [5] 1, 25,  600,  12600,  201600,   1814400;
  [6] 1, 36, 1260,  40320, 1088640,  21772800,  239500800;
  [7] 1, 49, 2352, 105840, 4233600, 139708800, 3353011200, 43589145600;
.
T(n, k) is a product where 'n' is the 'center' and 'k' is the 'half-length' of the product. For instance, T(5, 4) = (5-3)*(5-2)*(5-1)*5 * 5*(5+1)*(5+2)*(5+3) = 201600. Now consider the polynomial P(4, x) = -36*x^2 + 49*x^4 - 14*x^6 + x^8. Evaluating this polynomial at x = 5 shows P(4, 5) = 201600 = T(5, 4). The coefficients of the polynomial are row 4 of A269944.
		

Crossrefs

Diagonals: A002674, A327882.
Columns: A000290, A047928.
Cf. A370704 (row sums), A370706, A094728, A048994 (Stirling1), A130595 (order 0), A269947 (order 3)

Programs

  • Maple
    T := (n, k) -> local j; (-1)^k * mul((j - n)*(j + n), j = 0..k-1):
    seq(seq(T(n, k), k = 0..n), n = 0..8);
    # The central factorial numbers:
    cf := (n, k) -> ifelse(k = 0, 1, n*(n + k - 1)! / (n - k)! ):
    for n from 0 to 6 do seq(cf(n, k), k = 0..n) od;
    # Alternative (recurrence):
    T := proc(n, k) option remember;
    if k = 0 then 1 else T(n, k - 1)*(n^2 - (k - 1)^2) fi end:
    for n from 0 to 7 do seq(T(n, k), k = 0..n) od;
    # Illustrating the connection with the cf-polynomials and their coefficients:
    cfpoly := (n,x) -> local k; mul(x^2 - k^2, k = 0..n-1):
    A370707row := n -> local k; [seq(cfpoly(k, n), k = 0..n)]:
    A204579row := n -> local k; [seq(coeff(cfpoly(n, x), x, 2*k), k = 0..n)]:
    for n from 0 to 5 do lprint([n], A370707row(n), A204579row(n)) od;
  • Mathematica
    T[n_, k_] := If[n == 0, 1, -n Pochhammer[1 - n - k, 2 k - 1]];
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten
  • Python
    from math import prod
    def T(n, k): return (-1)**k * prod((j - n)*(j + n) for j in range(k))
    print([T(n, k) for n in range(8) for k in range(n + 1)])
  • SageMath
    def T(n, k): return falling_factorial(n, k) * rising_factorial(n, k)
    for n in range(9): print([T(n, k) for k in range(n + 1)])
    

Formula

T(n, k) = FallingFactorial(n, k) * RisingFactorial(n, k).
T(n, k) = (n*(n + k - 1)!)/(n - k)! if k > 0, and T(n, 0) = 1.
Calling the numbers in the second formula cf leads to the memorable form cf(n, k) = ff(n, k) * rf(n, k). This identity generalizes to the function
cf(x, n) = x*Gamma(x + n)/Gamma(x - n + 1) for n > 0 and cf(x, 0) = 1.
The last equation shows that the variable 'n' does not have to be an integer but can be any complex number if only the quotient remains defined (which one often can achieve by taking the limit). Indeed, in the classical Steffensen-Riordan case, n/2 is used instead of n, which leads to the complex situation Sloane discusses in A008955.
T(n, k) = -n*Pochhammer(1 - n - k, 2*k - 1) for n > 0.
T(n, k) = k!*binomial(n, k)*Pochhammer(n, k) = k!*A370706(n, k).
T(n, n) = n!*Pochhammer(n, n) (valid for n >= 0, whereas T(n, n) = (2*n)!/2 = A002674(n) is valid for n >= 1 only).
T(n, k) = T(n, k - 1)*(n^2 - (k - 1)^2) if k > 0, otherwise 1. (Recurrence)
The cf(n, k) are values of the polynomials Pcf(n, x) = Product_{k=0..n-1} (x^2 - k^2), whose coefficients vanish for odd powers and for even powers are A269944.
T(n, k) = Pcf(k, n) where Pcf(k,x) = Sum_{j=0..k} (-1)^(k-j)*A269944(k,j)*x^(2*j).
The central factorials can be described in three different ways: By the product T(n, k) = f(n, k) * rf(n, k), by the complex function cf(x, n), and through the polynomials Pcf(n, x). Although these relations are self-contained, they are regarded as only one-half of a more general notion, namely as central factorials of the first kind.
There is a fundamental connection with the Stirling numbers of first kind (A048994). The easiest way to see this is to generalize the definition: Let CF(z, s) = Product_{j=0..n-1} (z - s(j)), where s(j) is some complex sequence. Then the coefficients of CF(z, s) are equal to the Stirling_1 numbers if s = 0, 1, 2, ..., n, ..., and they are equal to the coefficients of our Pcf(n, z) polynomials if s = 0, 1, 4, ..., n^2, .... (This is also why A269944 is called the 'Stirling cycle numbers of order 2'. For completeness, if s = 1, 1, 1, ..., then the coefficients of CF(z, s), the 'Stirling cycle numbers of order 0', are the signed Pascal triangle A130595. See A269947 for order 3.)

A269946 Triangle read by rows, Lah numbers of order 3, T(n,n) = 1, T(n,k) = 0 if k<0 or k>n, otherwise T(n,k) = T(n-1,k-1)+((n-1)^3+k^3)*T(n-1, k), for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 18, 18, 1, 0, 504, 648, 72, 1, 0, 32760, 47160, 7200, 200, 1, 0, 4127760, 6305040, 1141560, 45000, 450, 1, 0, 895723920, 1416456720, 283704120, 13741560, 198450, 882, 1, 0, 308129028480, 498072032640, 106386981120, 5876519040, 106616160, 691488, 1568, 1
Offset: 0

Views

Author

Peter Luschny, Mar 22 2016

Keywords

Examples

			Triangle starts:
[1]
[0, 1]
[0, 2,       1]
[0, 18,      18,      1]
[0, 504,     648,     72,      1]
[0, 32760,   47160,   7200,    200,   1]
[0, 4127760, 6305040, 1141560, 45000, 450, 1]
		

Crossrefs

Cf. A038207 (order 0), A111596 (order 1), A268434 (order 2).

Programs

  • Maple
    T := proc(n, k) option remember;
        `if`(n=k, 1,
        `if`(k<0 or k>n, 0,
         T(n-1, k-1) + ((n-1)^3+k^3) * T(n-1, k) )) end:
    for n from 0 to 6 do seq(T(n,k), k=0..n) od;
  • Mathematica
    T[n_, n_] = 1; T[, 0] = 0; T[n, k_] /; 0 < k < n := T[n, k] = T[n-1, k-1] + ((n-1)^3 + k^3)*T[n-1, k]; T[, ] = 0;
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 20 2017 *)

Formula

T(n,k) = Sum_{j=k..n} A269947(n,j)*A269948(j,k).
T(n,1) = Product_{k=1..n} (k-1)^3+1 for n>=1 (cf. A255433).
T(n,n-1) = (n-1)^2*n^2/2 for n>=1 (cf. A163102).
Showing 1-3 of 3 results.